Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Help with Crystal Report Formulas Post Reply Post New Topic
Author Message
calhouns
Newbie
Newbie
Avatar

Joined: 15 May 2009
Location: United States
Online Status: Offline
Posts: 2
Quote calhouns Replybullet Topic: Help with Crystal Report Formulas
     Posted: 15 May 2009 at 11:11am

I want to do the following in a Crystal Reports and I'm not sure where to start with the calculations once I have the raw data points.

 

Raw Data Points:

Admit Date/Time

Patient Seq Number (Same number follows then through all hospitals in our system)

Patient ID (a new number assigned at each new visit)

Facility ID

Department

 

The report needs to give a list of patient that have has multiple visits within a designated time frame.  However, it needs to only list patients where a visit started in an ER department and then they were re-admitted within 72 hours at any department or facility.  I will also need to do a count of all patients that had re-admits.

 

The 1st example would only list the second two encounters on the report

The 2nd example would not list any encounters on the report

 

 

Pat Seq     Patient ID  Patient Name      Facility ID Department  Admit Date/Time

1067943     7880065656  John Doe          P           OP          3/31/2009 20:12

1067943     8600914788  John Doe          H           ER          4/01/2009 15:23

1067943     9001300060  John Doe          P           ICU         4/03/2009 06:44

 

Pat Seq     Patient ID  Patient Name      Facility ID Department  Admit Date/Time

1071185     2799369415  Jane Goodall      H           ER          3/03/2009 14:06

1071185     4554811511  Jane Goodall      H           ER          4/17/2009 08:00

1071185     6544151541  Jane Goodall      P           OP          4/24/2009 23:14

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 May 2009 at 12:43pm
Create to parameters and add to your select statement to limit data to your time frames.
Group on your Pat Seq.
Sort on admit date/time
Create a running total as a distinctcount of pat seq
evaluated as a formula:
departemnt=ER and pat seq=next(pat seq) and datediff("h",admitdate,next(admitdate))<73
Reset as never
Place on report footer


Edited by DBlank - 15 May 2009 at 12:44pm
IP IP Logged
calhouns
Newbie
Newbie
Avatar

Joined: 15 May 2009
Location: United States
Online Status: Offline
Posts: 2
Quote calhouns Replybullet Posted: 15 May 2009 at 12:51pm

Great, Thank You.  I'm going to go through your steps now.

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