I am creating an app for a non-profit medical facility serving people experiencing homelessness. The organization needs two tracking data points:
1) Total Days of Care to date
2)Total Days of Care Upon Discharge
I am have created calculations for both #1 and #2 but as you can see below, as the client is still a resident, the Total Days of Care Upon Discharge shows a negative number, which is confusing to users.
Calculation: (Updated_datetime - AdmitDate) / (60*60*24)
When the client is discharged, the Total Days of Care to date field keeps counting the days which is different from the discharge date. Again, confusing for data reporting.
Calculation: (DischargeDate - AdmitDate) / (60*60*24)
I need a calculation that zero's out (or leaves blank) the Total Days of Care Upon Discharge field when the client is still a resident and then zero's or blanks out the Total Days of Care to date when the client has been discharged.