on 06-20-2014 4:04 AM
I'm trying to build a report that measures the rate a clinic exceeds standard visit resolution.
For each Clinic I need a count of patients with 1 or more visits exceeding standard or @Yes_No = "Yes"
Group 1 = Clinic Name
Group 2 = PatID
Detail fields = PatID, VisitID, Visit Start Date, Visit End Date
A patient can have several visits
Here are my formulas
Code: |
@HourstoResolve := DateDiff ("h",{@StartDateTime},{@Sh_OrderDateTime} ) |
Code: |
@Yes_No := If (ToText({@Sh_OrderDateTime}) = "" or ISNULL({@HourstoResolve}) or ISNULL({@StartDateTime}) or {@HourstoResolve} > 2) then "Yes" else "No" |
Code: |
@ExceedStandard := If {@Yes_No} = "Yes" Then 1 Else 0 |
I placed a RunningTotal Formula in the detail section but I still can't get the total by CLinic
Can anyone help?
Thanks
Steve
Hi Steve,
Are you getting 1 / 0 in detail section based on your formula ? If so, try this formulas :
Whileprintingrecords;
Numbervar pcount:=0; // Place this formula in Clinic group header
Whileprintingrecords;
Numbervar pcount:=pcount+@ExceedStandard; //Place this in detail section
Whileprintingrecords;
Numbervar pcount; // Place this formula in Clinic group footer
This will give you totals per clinic.
If you are not getting 1 / 0 in detail section then go in each formula, on top you will see 'Exceptions for Null' drop down click on drop down and select 'Default Values for Nulls.
Thanks,
Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Steve,
1) Change the @Yes_No code to:
If ({@Sh_OrderDateTime} = cdatetime(0,0,0,0,0,0) or {@HourstoResolve} = 0 or {@StartDateTime} = cdatetime(0,0,0,0,0,0) or {@HourstoResolve} > 2) then 1 |
2) Go to Insert Summary > Select this formula in the 'Field to Summarize' > Choose 'Sum' as the summary operation > Choose 'Group #1' as the Summary Location.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.