cabrera01
Technical User
- Nov 24, 2008
- 15
I have a report that I wrote in crystal 10 in which I'm trying to get the total readmisson days for a patient. If the patient has multiple records, I need calculate the days difference between the Discharge and Admisson Date. The report is grouped by Dr# and Patient Record#. I can successfully calculate the readmission days using the 3 step Manual Running Totals method to get the totals of days for GF2. My problem is that I would like to know how many patients that were seen by DR# were readmitted with 7 and 30 Days (which will go in GF1).
I wrote a formula called (@7redays):
if (@Display)<=7 then 1 else 0
I tried to sum off this field, but was not able to. This is where I'm stuck. Any Suggestions?
I have a current admission date formula as:
(@testadm):
whileprintingrecords;
datevar Admit:={@admitn}
the previous discharge date formula is:
(@prevdisch):
whileprintingrecords;
datevar prevdisch:=PREVIOUS({@dischn})
(@admitn) = cdate(totext({BADPLPP.LPADT1},"00")+"/"+
totext({BADPLPP.LPADT2},"00")+"/"+
totext(2000+{BADPLPP.LPADT3},"0000"))
(@dischn) = cdate(totext({BSYRRVU.RVLDD1},"00")+"/"+
totext({BSYRRVU.RVLDD2},"00")+"/"+
totext(2000+{BSYRRVU.RVLDD3},"0000"))
I can get the number of days between days by using the formula (@redays):
if {@testADM}-{@prevDISCH}<0 then 0 else {@testADM}-{@prevDISCH}
3 Step Manual Running Totals:
//Reset in Detail DA section
whileprintingrecords;
global numbervar ReAdmittDays:=0;
//Increment in Detail DB Section
whileprintingrecords;
global numbervar ReAdmittDays:=ReAdmittDays + (@redays)
//Display In GF2 Section
whileprintingrecords;
global numbervar ReAdmittDays;
I wrote a formula called (@7redays):
if (@Display)<=7 then 1 else 0
I tried to sum off this field, but was not able to. This is where I'm stuck. Any Suggestions?
I have a current admission date formula as:
(@testadm):
whileprintingrecords;
datevar Admit:={@admitn}
the previous discharge date formula is:
(@prevdisch):
whileprintingrecords;
datevar prevdisch:=PREVIOUS({@dischn})
(@admitn) = cdate(totext({BADPLPP.LPADT1},"00")+"/"+
totext({BADPLPP.LPADT2},"00")+"/"+
totext(2000+{BADPLPP.LPADT3},"0000"))
(@dischn) = cdate(totext({BSYRRVU.RVLDD1},"00")+"/"+
totext({BSYRRVU.RVLDD2},"00")+"/"+
totext(2000+{BSYRRVU.RVLDD3},"0000"))
I can get the number of days between days by using the formula (@redays):
if {@testADM}-{@prevDISCH}<0 then 0 else {@testADM}-{@prevDISCH}
3 Step Manual Running Totals:
//Reset in Detail DA section
whileprintingrecords;
global numbervar ReAdmittDays:=0;
//Increment in Detail DB Section
whileprintingrecords;
global numbervar ReAdmittDays:=ReAdmittDays + (@redays)
//Display In GF2 Section
whileprintingrecords;
global numbervar ReAdmittDays;