Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I have to find the date for every 7 days between two dates. The two dates vary by record. They are the admission date and end date.
For example:
Admission Date: 12/2/2020
Discharge Date: 12/22/2020
Total days = 21
I need the dates from admission date for every 7 days (including admit date): 12/8/2020, 12/15/2020 and 12/22/2020 .
Mission: Get number of time patient had 3 hrs of therapy a day, for 5 out of 7 days.
I think I would get the dates in a load statement, but I just can't figure it out...
I have it flagged if their total therapy time was 3 hrs or more,
=Count(if(aggr(sum(therapy_time), pat_mrn_id, pat_enc_csn_id, calendar_dt) >=180, 1)) BUT, my aggr needs to group by the 7 day Date.. whatever that may be....
Help!
Thanks!
HI @mscull10n
Try like below
Sum({<calendar_dt={$(=chr(39)&Concat(Date(ValueLoop(Admission_dt, Discharge_dt, 7)),chr(39)&','&chr(39))&chr(39))}>}therapy_time)
Hope Admission_dt & Discharge_dt is user input / date selection.
valueloop helps to calculate between from date (Value) and to date(Value) based on steps.
I think, you will get some idea from here to proceed further.
HI @mscull10n
Try like below
Sum({<calendar_dt={$(=chr(39)&Concat(Date(ValueLoop(Admission_dt, Discharge_dt, 7)),chr(39)&','&chr(39))&chr(39))}>}therapy_time)
Hope Admission_dt & Discharge_dt is user input / date selection.
valueloop helps to calculate between from date (Value) and to date(Value) based on steps.
I think, you will get some idea from here to proceed further.
Hi,
admission_dt and discharge_dt are not user input fields. they could select a date range, but essentially, the dates are driven off the date the therapist entered the therapy time, not the admission/dc . I'll try the above code. I thank you for your reply and support. I'll let you know if it works!
Michelle
It works to display the dates. Thank you!