Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone
I'm having trouble with a new diagram. I need your help.
I need to count the number of patients in the hospital per hour. The admissions hours are from 07:00 to 07:00 the following day.
For example:
id in out
1 13.08.2025 07:00 13.08.2025 08:00
2 13.08.2025 08:00 13.08.2025 08:59
So at 7 there was one patient, and at 8 there were two patients.
Thank you in advance.
Thank you in advance.
RG.
you need to generate a calendar of several timestamps (1 every hour/half hour)
and then use intervalmatch to "match" those timestamps with the in and out timestamps of your admissions.
also - careful with "short" admissions (less than one hour) that wouldn't be caught by that technique.
possibly use floor(timeIn,1/24) (or similar) to ensure that each admission is caught at least by one "master" timestamp.