Reputation: 1
I want an SAP Webi Universe formula to calculate the total number of re-admission patients with the same diagnosis within 14 days of discharge.
Note: I don't have specific diagnosis. I have Admit Date & Time
, Discharge Date & Time
.
I try these formulas, but I receive an error:
=Sum(If [Diagnosis Description] = Next([Diagnosis Description]; [MRN- Organization]) And (Next([Admit Date & Time]; [MRN- Organization]) - [Discharge Date & Time]) <= 14 Then 1 Else 0)
Error: Incorrect reset context at position 64. (IES 10072)
=If ([Diagnosis Description] = [Diagnosis Description] ForEach ([MRN- Organization])) And (DatesBetween([Admit Date & Time]; [Discharge Date & Time\]) <= 14) Then "Readmission within 14 days" Else "Not Readmitted"
Error: duplicate "Readmission within 14 days" where it's not met the condition
See the picture:
Upvotes: 0
Views: 29