question

Christophe Compondu avatar image
4 Likes"
Christophe Compondu asked Cliff King answered

How can we break the off schedule of a location in case of a late arrival into an outpatient clinic model ?

The problem is how to manage the late arrival in case of an outpatient clinic. If I put the off schedule more late ((to assure that all patient can be treated) it will disort my dashboard and KPI. Especially the %utilisation of the Xray area for exemple.

FlexSim HC 5.0.12
locationschedulearrivalsovertimelate arrival
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered Christophe Compondu commented

This is one of those real-life situations that is particularly hard to simulate. For example, after closing time, if patients remain to be seen, how do you decide how many staff members need to stay on? Also, depending on how you've set up your patient arrivals it can be difficult to determine when the last patient has left.

The simplest solution is to take advantage of the dashboard's ability to report utilization by hour of the day. Rather than sending the staff off schedule at closing time, keep them on and look at the dashboard charts to see how long the staff had to stay after. If there were still patients after closing time then you will see that reflected in the utilization chart in the hours after closing time.

Another approach would be to use code to set your objects (either all of them or a few that you don't hook up to a shift schedule) to off schedule. Here's some code that can be used in an OnEntry trigger of a PatientExit object to set everything to an OffSchedule state if the last patient in the model is leaving and its after 5 PM.

  1. double startminutes = get(node("/totalstartminutes", StartTime));
  2. double minute = time() + startminutes;
  3.  
  4. int year = minute / 524160; //a year is made up of 7*52 = 364 days, a will begin with the number 1 and continue indefinately
  5. minute -= year * 524160;
  6. year += 1;
  7.  
  8. int week = minute / 10080; //a week is made up of 7 days, and will have the numbers 1 through 52 within every year
  9. minute -= week * 10080;
  10. week += 1;
  11.  
  12. int day = minute / 1440; //a day is made up of 24 hours, and will have the numbers 1 through 7 within each week
  13. minute -= day * 1440;
  14. day += 1;
  15.  
  16. double hour = minute / 60; //an hour is made up of 60 minutes, and will have the numbers 0 through 23 within each day
  17.  
  18. if(!(getcensus(model)-1) && hour > 17)
  19. { forobjecttreeunder(model())
  20. {
  21. if(getobjecttype(a) == OBJECT_Staff)
  22. setobjectstate(a, STAT_OffSchedule);
  23. if(getobjecttype(a) == OBJECT_PatientProcessing)
  24. setobjectstate(a, STAT_OffSchedule);
  25. if(getobjecttype(a) == OBJECT_PatientQueuing)
  26. setobjectstate(a, STAT_OffSchedule);
  27. }
  28. }
· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Cliff King avatar image
1 Like"
Cliff King answered Adrian Haws edited

I like Matthew's first suggestion: don't force the staff to go Off Schedule at any particular time (or any particular event, such as the last patient leaving), but simply evaluate how long the staff actually did work each day by observing the staff utilization figures reported by our hour-of-day box plots.

On the other hand, for those times when you would like a little more information reported on actual hours worked in order to accurately calculate the number of overtime hours for example, you may need to do a little more. A modeling question posed to me recently by another user recently addresses these issues:

The clinic model needs to run 30 days using a 2-day repeating appointment schedule The standard hours for the clinic to be opened is from 8 a.m. to 6 p.m. each day. However, because the patient appointment schedule is fairly packed and there's the chance that some patient are late to their appointments, the clinic rarely closes its doors at 6 p.m. What I want to do is:
  1. Have the clinic automatically remain open until the last patient leaves each day.
  2. Record and display in a widget, the amount of overtime hours the clinic stays open for each day.
  3. Record and display statistics (average, standard deviation, confidence intervals, etc.) for the daily overtime experienced by the clinic over the 30 day model run.
  4. Collect stats on total work hours each day as well.
  5. Display the patient census in the clinic over time.

To answer his questions, I built a small example model (see attachment) that demonstrates how to record, calculate and display statistics for a clinic's operating hours. The main points of the model are as follows:

  1. I repeat a 2-day appointment schedule every 2880 minutes (2 days worth) and I've defined the simulation stop time to be 31:00:00 in order to stop the model after running 30 days. I applied a "variance" to the appointment arrivals of -10 + triangular(-5,20,12) in an effort to simulate patients who are told to come 10 minutes early, but some come earlier and most come later.
  2. I used three global variables in the model:
    • GV_ClosingTime_String (used to display the previous day's closing time in hh:mm format in a Display object on the screen)
    • GV_TotWork_Hours (used to record the total hours worked in the previous day)
    • GV_Overtime_Hours (used to record the overtime hours worked in the previous day)
  3. I use the Activity Finished Trigger of activity 30_Exit to set the global variables when the last patient leaves the model each day. After setting the global variables, the trigger calls the FireDelegate(DELEGATE_CUSTOM) command which triggers an event on the data collectors.
  4. I created a data collector in the Toolbox which I named OT_DataCollector. With "Custom" selected as the "Recording Event" for the data collector, it will record data for the two "Columns" I defined every time the FireDelegate(DELEGATE_CUSTOM) command is called in the model. I specified that columns 1 and 2 should record the values for the GV_Overtime_Hours and GV_TotWork_Hours global variables respectively.
  5. All the widgets except the Model Census widget in the dashboard were created with the User Defined widget at the bottom of the Dashboard Library named "Using Data Collectors". Nothing special was done to set up the graphs and charts. I simply, chose OT_DataCollector as the "Data Collector", checked the box for the desired "Reporting Columns" and made sure I added a "Sample Set" (even though the custom sample set has no filters defined for it).

· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Cliff King avatar image
0 Likes"
Cliff King answered

Similar concepts are also discussed in relation to the question here, if you are interested.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.