[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1037
  • Last Modified:

Readmits to hospital within 90 days of discharge on Crystal 10

Hello:

I have been asked to create a report showing those patients that are discharged at one point; let's say 3/1/06 will be the patient's discharge date, and readmitted to the hospital within 90 days of that discharge. (That would be an admission date by 6/1/06 - this is an example.)  I will be using a CPI which is a common patient identifier - it is a number assigned to a patient that spans across all facilities.  There are '4' hospitals involved in our study.  I've looked at Aged61to90days but that really doesn't fit my needs.  Any suggestions???  Thank you.  Maria
0
Cleopatra1014
Asked:
Cleopatra1014
  • 10
  • 6
  • 3
  • +2
1 Solution
 
bdreed35Commented:
Can you provide some sample data that would demonstrate how the information is stored?
0
 
Cleopatra1014Author Commented:
Would my SQL suffice?
Maria
0
 
bdreed35Commented:
You can post the SQL but I would also like to see a few records from the db if you can do that.
0
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 
bdreed35Commented:
Just to clarify, it doesn't have to be actual data, you can dummy it as long as it reflects what actual data would be like.
0
 
frodomanCommented:
Your SQL should suffice.  Really we just need to know how the data is organized - specifically is the discharge and re-admit date part of the same record or will it be two different records?

Assuming it's two records then you won't be able to select based on this criteria but you can sort by admit date and then use a formula like the one below to calculate the days.  Once you've done that you can suppress records based on the results of the formula.

// DaysBetweenFormula
{AdmitDate} - Previous({DischargeDate})


frodoman
0
 
frodomanCommented:
By the way, that's a simplification for a single patient.  You'll need to check to make sure you aren't subtracting between groups but bdreed or I can give more details once you post your sample data.

0
 
Cleopatra1014Author Commented:
This is very rough SQL since I'm still constructing the report.  DRG is assigned to patient's based on diagnosis and is used in reimbursement.

 SELECT "c_cmb_vst_v_20050303"."age", "c_cmb_vst_v_20050303"."len_of_stay", "c_cmb_vst_v_20050303"."prim_pract_no", "c_cmb_vst_v_20050303"."dsch_date", "c_cmb_vst_v_20050303"."prin_dx_cd_desc", "c_cmb_vst_v_20050303"."drg_no", "c_cmb_vst_v_20050303"."nurs_sta", "c_cmb_vst_v_20050303"."hosp_svc", "c_cmb_vst_v_20050303"."prim_pyr_cd", "c_cmb_vst_v_20050303"."drg_serv_line", "c_cmb_vst_v_20050303"."tot_chg_amt", "c_cmb_vst_v_20050303"."vst_type_cd", "c_cmb_vst_v_20050303"."orgz_cd", "c_cmb_vst_v_20050303"."cpi"
 FROM   "SMSPHdssp0r0"."smsdss"."c_cmb_vst_v_20050303" "c_cmb_vst_v_20050303"
 WHERE  ("c_cmb_vst_v_20050303"."drg_no"=218 OR "c_cmb_vst_v_20050303"."drg_no"=219) AND "c_cmb_vst_v_20050303"."hosp_svc"<>'hsp' AND  NOT ("c_cmb_vst_v_20050303"."prim_pyr_cd"='j24' OR "c_cmb_vst_v_20050303"."prim_pyr_cd"='k01' OR "c_cmb_vst_v_20050303"."prim_pyr_cd"='n15') AND  NOT ("c_cmb_vst_v_20050303"."drg_serv_line"='Behavioral Health' OR "c_cmb_vst_v_20050303"."drg_serv_line"='Rehab' OR "c_cmb_vst_v_20050303"."drg_serv_line"='ungroupable') AND "c_cmb_vst_v_20050303"."len_of_stay"<>0 AND "c_cmb_vst_v_20050303"."tot_chg_amt"<>0 AND "c_cmb_vst_v_20050303"."vst_type_cd"='i' AND ("c_cmb_vst_v_20050303"."orgz_cd"='8070' OR "c_cmb_vst_v_20050303"."orgz_cd"='80a0' OR "c_cmb_vst_v_20050303"."orgz_cd"='80z0' OR "c_cmb_vst_v_20050303"."orgz_cd"='p0b0')

I tried to copy the report and paste it here but I'm not able to. I hope this helps.  Please advise.  Maria

 

0
 
wykabryanCommented:
something like this shoudl work.  

readmitdate between admitdate and dateadd("d",90,admitdate)

or you could create a flag in your sql statement to mark which records were readmitted.  Something like this

case when readmitdate between admitdate and dateadd("d",90,admitdate) then 1 else 0 end as Admit_Flag

then if you choose you can filter in the report or in the sql statement on this column.

Hope this helps.
0
 
Cleopatra1014Author Commented:
Frodoman:

specifically is the discharge and re-admit date part of the same record or will it be two different records?  I'm not sure what you mean by this???  There are '2' distinct patient records.  As there are '2' distinct patient admissions.  However; the discharge date and the readmit date are critical in the formula when evaluating for patients who fall into the 90 day readmit window.  Does that help? Please advise. Maria
0
 
janmariniCommented:
BTW - It appears that your sql above is not retrieving the admit date?

Does patient get the same CPI each time they are admitted, or is there a chance that a new ID could be assigned?

In your report are you just showing patient info for those that are re-admitted 90 days after previous discharge, or are you showing admission and discharge history?

What happens if the patient is then again re-admitted?  Show all of the below, or just the last 2?

CPI           Admit                       Discharge
CPI1      2/28/06            3/1/06
CPI1      9/1/06            9/3/06               =90 days from previous
CPI1      9/15/06            9/18/06             = < 90 days from previous
0
 
frodomanCommented:
>>> specifically is the discharge and re-admit date part of the same record or will it be two different records?  I'm not sure what you mean by this???  

Never mind - I can see this from your SQL.  We're getting closer - if you can answer janmarini's questions we'll be in good shape.
0
 
Cleopatra1014Author Commented:
Hello:

The patient gets the same CPI each time.  It is a universal number throughout all 4 facilities so if he/she is admitted to any of the 4 hospitals we could locate information regarding that patient by the CPI.
If the patient is readmitted we typically will show pt info such as cpi, name, age, medical record number, physician number, diagnosis, nurse unit, length of stay, but we will also show the admit date and discharge date.  Is there any way I can attach a screen print of the Crystal report.  That may help visualize what I'm getting at.  I've done something with a 30 day readmit that may help you.  We have indicators built for 30 days but not for 90 or 60 days as this nurse/physician have requested. Please advise. Maria
0
 
janmariniCommented:

If you already have a report that's nearly the same, can you copy the 30 day report and just change the 30 day indicators to 60, and then do the same for a 90 day report?

Or if that can't be done, can you describe how the 30 day report works?

Thanks,
Jan

0
 
Cleopatra1014Author Commented:
Janmarini:

I haven't been able to cut and paste the report so I'm going to dummy a report for you:

Hosp   PT Name  Age  LOS  PHYS  ADM DT  DSCH DT  Diag Code
CPI

OHBC
123456  MARIA   36    4.0   Clark   2/22/06  2/28/06    824.5
              PAWL
123456  MARIA
              PAWL    36    7.0   Clark   2/9/06    2/15/06    824.4

This is what they are looking for.  But on a 90 day basis.  Notice that the 2/15 discharge and the 2/22 readmit are within the 30 day readmit window.  We cannot change the 30 day indicator to '60' or '90'.  It is currently hard coded.  That's why I'm looking for a formula to accomplish this.  Does this example help?  I've only been using Crystal for a year and am still learning it.  Formulas throw me at times.....Thanks. Maria
0
 
janmariniCommented:
Can you describe what you mean by the 30 day indicator is hard-coded?  Is it in the SQL, record selection, parameter, or something else?

Thanks
0
 
Cleopatra1014Author Commented:
Janmarini:

What a programmer has done here is built a custom, combined, view that we write Crystal reports against.  By combined I mean they include cost, financial, charge, medical record, patient data.  Here is something I copied from that table:

ind_readm_15                = f.ind_readm_15,               -- oth
ind_readm_30                = f.ind_readm_30,               -- oth
ind_readm_30_samedrg = f.ind_readm_30_samedrg,  -- oth
ind_readmit                 = f.ind_readmit,                      -- oth

ind_readmit_30 (tinyint, NotNull)
ind_readmit_15 (tinyint, NotNull)

I hope this helps.  Maria   PS The programmer is not here today.
0
 
janmariniCommented:

Look like this has a re-admit indicator for 15 and 30 days... Any chance they could modify this view to include  _60 and _90 day as well?  That would be the most direct route since it will be tougher to do what you need in the report itself.

But if you have to do it in the report have you tried Frodoman's recommendation above - see
// DaysBetweenFormula
{AdmitDate} - Previous({DischargeDate})
0
 
Cleopatra1014Author Commented:
Janmarini

Like I said, I haven't been working on Crystal for very long.  Please bear with me.  I understand his formula but where do I indicate the 90 days? Maria
0
 
janmariniCommented:

The DaysBetweenFormula returns the number of days from the previous admissision, and you could use this number to test if it is <= 90.

However, I don't think this is really going to work for you completely.  I still think it would be better if your programmer could incorporate this into the datasource is is being done for 15 and 30 day readmits.

I tried using this formula (also had to test if a group changed):

Grouped by CPI, Sort by AdmitDate -

// DaysBetween
If {yourtable.CPI} = previous({yourtable.CPI}) then
{yourtable.AdmitDate}- previous({yourtable.DischargeDate})   //Returns days since last discharge
else
999    //Dummy Number - Will always be this on the first record for each change in the group

Then I could conditionally supress the record if the DaysBetween > 90 (will not suppress any records having 0 - 90 days since the last discharge)

Howerver, this still reports all the group headers for each CPI.  Trying to figure out how to suppress these as well.

I couldn't use a record selection formula as the DaysBetween formula wansn't available in the selection.

Wondering if I could see your Crystal SQL for the 30 day report that is working?  Might give us some ideas on a new approach...

0
 
janmariniCommented:
You could try this:

Add a summary field to count AdmitDate for each group.  
Copy the summary field from the Group Footer to the Header.  
Delete the summary field from the footer and suppress it in the header.

In the Section Expert create a suppress formula for the Group Header:
{YourSummaryField} < 2  - this will suppress all groups that have fewer than 2 admit dates.

However, you will still get group headings and no detail for pts having readmits > 90 days - but it should get you closer to what you want.

The best approach would be to have your programmer modify to your datasource, or copy it entirely to include the logic for 60 and 90 day readmits.  Trying to do this in Crystal to be 100% accurate may not be possible.
0
 
Cleopatra1014Author Commented:
Janmarini:

OK Jan I will give your suggestions a try.  I have been looking for that 30 day report and have not been able to find it.  Wouldn't you know.   Maria
0
 
Cleopatra1014Author Commented:
Jan:

Please take a look at this syntax.  I don't mean to belabor this but I've been trying different things and would appreciate your advice. c_cmb_vst_20050303_past. is my first admission which takes into account my discharge date.  The next view is my second admission with 90 days since my discharge date.  I've put this into a formula; however when I try to check for errors i get the message:
"Not enough arguments have been given to this function."   What am I doing wrong??
{c_cmb_vst_v_20050303_Past.dsch_date} - {c_cmb_vst_v_20050303.adm_date} and dateadd("d",90) Thanks. Maria
0
 
Cleopatra1014Author Commented:
Janmarini:

I think I've resolve this.  Sorry to bother you.  Thanks. maria
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 10
  • 6
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now