+ Reply to Thread
Results 1 to 8 of 8

Create hourly patient census in clinic with arrival and discharge times

Hybrid View

  1. #1
    Registered User
    Join Date
    12-11-2022
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    4

    Create hourly patient census in clinic with arrival and discharge times

    Greetings,

    I'm trying to create an hourly patient census computation for a clinic given the patient arrival and discharge times. The data is over a several day period. Column 1 = Patient number (sequential order), Column 2 = Arrival time in m/dd/yy hh:mm format. Column 3 Discharge time in m/dd/yy hh:mm format.

    In researching before posting, I spent several hours and found that a SUMPRODUCT formula that I found on a similar post seems to work in creating a running count of patients in the clinic:
    =SUMPRODUCT(($B$2:$B$186<=$C2+F$1)*($C$2:$C$186>=$C2+F$1))

    ...but I do not understand what time each of the resulting values corresponds.

    I want to graph data showing date & time (hourly increments) on the X-axis with patient count in the Y-axis. Accurate hourly patient census count will help inform staffing matrix, room utilization (physical plant space needs), and ability to take on new contract proposals, etc.

    Thanks for
    Attached Files Attached Files

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Create hourly patient census in clinic with arrival and discharge times

    An option:

    Please try
    Formula: copy to clipboard
    =LET(ar,B2:B186,dis,C2:C186,t,SORT(VSTACK(EXPAND(dis,,2,-1),EXPAND(ar,,2,1))),HSTACK(INDEX(t,,1),SCAN(0,INDEX(t,,2),LAMBDA(x,y,x+y))))
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-11-2022
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    4

    Re: Create hourly patient census in clinic with arrival and discharge times

    HansDouwe - That's a cool formula! I like how it makes a census count per arrival or discharge timestamp. The data very visible. I'll check the formula against another dataset tomorrow and get back to you.

    BTW, I was rooting for ORANGE! (My mother is from Hengelo)

    Thanks!

  4. #4
    Registered User
    Join Date
    12-11-2022
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    4

    Re: Create hourly patient census in clinic with arrival and discharge times

    Hello again, The data produced by the formula is an accurate patient census computation from each change in arrival or discharge time stamp. I fear there are too many data points for displaying the data. How can we display census data in 30 min intervals?

    I appreciate the help.

    Thanks!

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Create hourly patient census in clinic with arrival and discharge times

    Enter the desired interval time in cell K1 (in this example 0:30) and try this formula in K2:
    Formula: copy to clipboard
    =LET(x,K1*ROUNDUP(MAX(C2:C999)/K1,0),n,K1*ROUNDUP(MIN(B2:B999)/K1,0),s,SEQUENCE((x-n)/K1,,n,K1),HSTACK(s,MAP(s,LAMBDA(x,(SUM((B2:B999<=x)*(C2:C999>x)))))))
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-11-2022
    Location
    Colorado
    MS-Off Ver
    365
    Posts
    4

    Re: Create hourly patient census in clinic with arrival and discharge times

    HansDouwe, I have one more calculation that I'm attempting to tackle. The facility has 4 patient rooms. When a 5th patient arrives we encounter a wait time. Can you help me count wait time in a separate column? The 5th patient cannot enter a room until one of the four initial patients is discharged. A 6th or 7th patient arriving shortly afterwards adds to the queue.

    Your initial response formula seems helpful for this question, because it updates census count with each arrival or discharge timestamp.

    Thanks in advance for your assistance, I've told my team about how much you helped me.

    Kind Regards,

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,689

    Re: Create hourly patient census in clinic with arrival and discharge times

    Looking at the file attached to post #1, the first four patients could be assigned rooms 1:4.
    Patient 5 arrived at 8:22 and would have to wait until patient 4 was discharged at 8:39 so a 17-minute wait time.
    Patient 6 also arrived at 8:22 and was discharged at 8:41 which is before the next room, occupied by patient 1 was discharged at 8:43.
    If you were manually calculating the wait time for patient 6 would it be -11minutes, -2 minutes or something else?
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Create hourly patient census in clinic with arrival and discharge times

    I have found this formula for the waiting patients:
    Formula: copy to clipboard
    =LET(ar,B2:B186,dis,C2:C186,t,SORT(VSTACK(EXPAND(dis,,2,-1),EXPAND(ar,,2,1))),n,SCAN(0,INDEX(t,,2),LAMBDA(x,y,x+y)),
    q,FILTER(HSTACK(INDEX(t,,1),n),(n>4)*(INDEX(t,,2)=1)),r,INDEX(q,,1),e,MAP(r,INDEX(q,,2),LAMBDA(a,b,TAKE(DROP(SORT(FILTER(dis,a<dis)),b-5),1))),HSTACK(r,e,MAP(r,e,LAMBDA(a,b,b-a))))
    Attached Files Attached Files
    Last edited by HansDouwe; 12-20-2022 at 05:46 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help with clinic patient userform template
    By JNEWMAN in forum Excel Programming / VBA / Macros
    Replies: 57
    Last Post: 09-05-2019, 06:00 PM
  2. Hourly census by day of week
    By fftoad in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-22-2017, 02:12 PM
  3. Replies: 1
    Last Post: 03-16-2016, 08:19 PM
  4. Hourly arrival calculation
    By disneycavern in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-19-2014, 03:15 AM
  5. calculating inter arrival times and statistical distribution of these times
    By ditmar.rijk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-19-2014, 03:18 AM
  6. Hourly Census Formula
    By dreicer_Jarr in forum Excel General
    Replies: 8
    Last Post: 02-10-2009, 09:32 PM
  7. Hourly Census
    By dreicer_Jarr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2009, 09:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1