Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Re-occuring patient admissions Post Reply Post New Topic
Author Message
TorLang
Groupie
Groupie


Joined: 13 Jun 2012
Location: United States
Online Status: Offline
Posts: 50
Quote TorLang Replybullet Topic: Re-occuring patient admissions
     Posted: 17 Sep 2012 at 5:49am
Lets see if I can explain what I am looking for....
I am trying to figure out how to write a report that is run for a time span of admit dates (hospital setting) for patients. The report will be looking for patients that have been re-admitted within 30 days.

Patients have unique visit numbers pr. visit, but a medical record number that stays with the patient:

Medical record number 00100
Visit 100000
Visit 100001
Visit 100002

So if the medical record number shows up more than once within the date range (admission dates) I run the report for,  it will tell me that the patient has been re-admitted within the date range.

I just don't know how to get Crystal to run through the admission records, and look for re-occurring med. rec. numbers.
 
Anyone have a suggestion as to where to start....
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Sep 2012 at 7:34am
can you write a stored proc or command for this instead? it will likely not give you want you the direction you are heading.
IP IP Logged
TorLang
Groupie
Groupie


Joined: 13 Jun 2012
Location: United States
Online Status: Offline
Posts: 50
Quote TorLang Replybullet Posted: 17 Sep 2012 at 8:45am
Interesting. I though I could use......Previous( ....or something similar...maybe not....:-),,,,not good news...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Sep 2012 at 8:52am

you might be able to get to where you want but I think the 'easiest' solution would be to make a command, add teh table to it twice,

join on
record number=record number
visit id <> visit id
admit date between admitdate and dateadd(day,30,admitdate)
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 17 Sep 2012 at 8:01pm
Hi
 
Well, you have a parameter filter to filter the records based on Admission Date.
So, it will get bunch of records which are in the date range.
 
Now, create a group on Medical Record Number and place Visit ID in detail section.  To find out / filter who is re-joining within the date range do the following :
 
Create a count on group like : Count({visitID},{MedicalRecordNumber}) and place on your group header.
 
Now go in Group filter through-- Report--Group-- then give a filter condition like
Count({visitID},{MedicalRecordNumber})  > 1
 
 
 
 
 
 
 
 
Thanks,
Sastry
IP IP Logged
TorLang
Groupie
Groupie


Joined: 13 Jun 2012
Location: United States
Online Status: Offline
Posts: 50
Quote TorLang Replybullet Posted: 18 Sep 2012 at 2:08am
Sastry,

That helped a bunch. It looks the way I intended it to look, and is pulling the correct data according to my current selection.  However, I need to figure out how to do this(try to follow my logic):

The report will only pull patients with a discharge date 30 days or less before a new admit occurs.

Example:
If I run the report for say admit dates of 7/1/12 - 7/31/12, and patient ZZZ  got admitted 7/10/12, he would be on the report. BUT, if that same patient got discharged 6/20/12 (for a previous visit), this visit also needs to be on the report. (Less than 30 days from 6/20 discharge to 7/10 new admit)
 
In other words, if the time from previous discharge date is 30 days or less to next admit date, the visit needs to be included.

I hope you can give me some additional pointers here as a start.....
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Sep 2012 at 3:23am
You have to pull 60 days worth of data to be able to check the full range of what youa re looking for and then you have to use previous or next functions per row wich cannot be used a select statement. This is why i recommnded going a different route.
IP IP Logged
TorLang
Groupie
Groupie


Joined: 13 Jun 2012
Location: United States
Online Status: Offline
Posts: 50
Quote TorLang Replybullet Posted: 19 Sep 2012 at 8:00am
I don't think that's possible either,,, without selecting a wider adm. date range. There is no way of capturing the admit if it's not in selection, I wouldn't think...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Sep 2012 at 8:05am

yes, I was assuming a 60 days as 30 for the range + 30 for checking.

You can use params and use the begin date and endate + 30 days.
Again, if you use a command or store proc youdon't have to worry abnout it. Much simpler and likely more efficient.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum