question

Mark S2 avatar image
0 Likes"
Mark S2 asked Cliff King commented

Rescheduling Patients

Hi all,

I am trying to model a primary healthcare clinic. New patients arrive via a set schedule and are seen by a nurse practitioner (resource). After their first appointment, those patients go "home" (process) and a certain amount of time elapses before they require a new appointment. Once this time has elapsed they need to visit the same resource.

I see two ways to approach this and am wondering which is feasible in FlexSim:

1) The patients are dynamically scheduled into unbooked time slots in the nurse's schedule (every 30 min).

2) The patients move into a queue and are served FIFO by the nurse, but their appointment start times would need to coincide with new patients' schedules such that the return appointments would not overlap a new appointment time, a lunch break, the end of the day, etc.

Complications:

We need to factor in same-day access (walk-in appointments), where appointments are left open each day in case urgent patients arrive and need treatment....My best guess is to create an alternative resource group, with the same resource as before, but make a different schedule.

Any thoughts or clarification needed?

Thanks!

FlexSim HC 5.1.0
healthcarescheduling
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

I'm very much interested in working through this appointment scheduling problem with you. It sounds very interesting. It'd sure be nice if we could come up with a small example model to work through as we test out our assumptions and ideas for implementation.

It sounds like the basic functionality we need is the ability to dynamically assign a patient to a future appointment slot based on 1) a minimum required delay time between the current time and a future appointment time, 2) what staff member the patient needs to see, 3) first available appointment slot after the required minimum delay period.

I know that some modelers have chosen to account for multiple visits by the same patient by simply scheduling separate patient arrivals for the return visit, and then using sepaate PCI assignments for New Patients versus Return Patients. However, I realize there are times when this sort of approach would be less than ideal, so let's try to solve it more realistically!

In modeling this, we need to decide whether we would rather stage patients in a queue while waiting for their return visit, or destroy the patient and recreate a new patient at a specified time dynamically during the simulation. Both are possible, and both have their advantages and disadvantages.

To start with, let's try to get a sample model built that has all the aspects we need in it. How do you want to kick off this model with it's initial flow of patients? Do you want to have all "New Patients" arrive in the model via one of the standard arrival tables available on the Patient Arrivals object such as the Appointment Table or the Custom Arrivals table? You mentioned a certain number of same-day access (walk-ins) patients. Could these also be scheduled with one of the standard arrival tables? We could then either stage those patients who need a return visit, or let them leave the model and then we auto-generate a new patient at the scheduled time for the return visit.

If we use the standard arrival tables to generate patients, then we will need to populate a master appointment schedule that we can keep track of in a Global Table within the model. This is so that we can accurately search for an available appointment slot when scheduling a return visit for return patient. I'm wondering whether we should have one master schedule for the whole clinic, or whether we should have separate appointment logs for each of the nurse practitioners. Any ideas? The closer it matches what they have in real-life, the better. Because I can devise a scheme for creating all our patient arrivals during the course of a simulation, based on what's filled out in these appointment schedule(s), we could do away with any of the standard arrivals tables in our model, but let's not begin that way. How about you try building a simple model with representative patient arrivals for "Scheduled New Patients" and "Walk-in New Patients" using the standard arrival tables and let's go from there. I'd also like you to create an Excel spreadsheet or similar that can represent what we might want our Patient Appointment Log or Logs to look like. I'm assuming the spreadsheet would include some of the following columns: AppointmentType, AppointmentDateTime, EstimatedAppointmentDuration, AssignedNurse.

5 |100000

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

Mark S2 avatar image
0 Likes"
Mark S2 answered Cliff King commented

Thank you!

Our overarching goal is to experiment with different new patient scheduling strategies as a function of time that would balance:

1) Rate of new patient intake

2) Wait times for return patients

3) Resource idle time

For example, we could implement a strategy that schedules only new patients the first two weeks (because the nurse would have just started her position), then 10 new patients per week for the following ten weeks, etc.)

Some additional details that might help you determine whether we stage or destroy patients are:

1) Each nurse practitioner manages his or her own workload, so there is no master clinic schedule. There is normally no sharing of patient between nurse practitioners.

2) Same-day/Next-day access patients are return patients who need an appointment more quickly than the current wait time for an open (non same-day/next-day access) appointment slot…sorry walk-in is not quite the correct term. Therefore, we cannot pre-schedule these same-day/next-day appointment slots…(for this could we assign a low priority dummy process/patient to these same-day access appointment, and then when a higher priority patient arrives bump the dummy off?)

3) Some new patients may require several follow-up appointments (e.g. if they have not had a family Dr. for 5 years, or if lab tests came back with troubling results) before settling into a more consistent schedule.

When you say “auto-generate a new patient at the scheduled time for the return visit’, can we also carry over their attributes from before (first nurse seen, patient track, etc.)?

Given this information, what do you think the best way to generate patient arrivals?

I have attached a very simple model phc-v1-3.fsm(I am very new to FlexSim). For the Patient Appointment Log, would this be information be from before the appointment or after it (i.e. recording the outcome of the appointment to determine the processing time until the next appointment, e.g. urgent follow-up required?). For now we are not concerned with the intra-day operations, so EstimatedAppointmentDuration will not be an issue.

I have a feeling we will need to understand the FlexSim coding language for this. Is there any tutorial or resources to help understand the syntax, logic, etc?


phc-v1-3.fsm (158.3 KiB)
· 3
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 Cliff King commented ·

This is great. I'm glad you're game for working out a solution together. I have no time to dive more into it today, but hopefully tomorrow. We may even want to get together via a web conference so we can freely discuss ideas. I'll let you know. Either way, we'll try to keep the community informed on this post of our progress...

1 Like 1 ·
Cliff King avatar image Cliff King commented ·

I forgot to answer your question regarding help with learning the coding language (i.e. flexscript) of the software. There is a section in the User Manual called FlexScript Coding that you should browse through (see: Help > User Manual > Reference Manual > FlexScript Coding). To better understand some of the variable types and commands, it's important to recognize that all the data associated with a model is contained in a tree, so you might want to open the model tree view (View > Model Tree) and familiarize yourself a little with the tree. A tree is made up of several types of nodes. The icon of the node gives you an idea of the type of node it is. The nodes that represent objects will have an icon of an overlapping square, triangle and circle. This type of node will have object data that can be viewed in a sub tree by clicking on the node and then clicking the > symbol to the left of the node icon.

1 Like 1 ·
Cliff King avatar image Cliff King commented ·

For anyone who may still be following this thread, Mark and I have continued to discuss and work through this particular modeling scenario, so if you have specific questions, please ask.

As for dynamically creating patients on-the-fly, I created a little example model demonstrating one way to do this. In the attached model I dynamically create patient arrivals by starting out with just a single row in the Custom Arrivals Table, and then update the "Number of Arrivals" column of the row using User Events (see toolbox). The trick is that I must update the Custom Arrivals Table just before the software reads the table to create the next block of arrivals at the start of each "Repeat Interval" (every 1440 minutes). This approach allows for 0 patient arrivals in any given day, unlike the starter model I did for you. Let me know if you need anything explained in the model. It's a very small model with the only code found in the two User Events I made. I unfortunately couldn't get away with a single repeating User Event starting at time 0 and repeating every 1440 minutes because the User Event would fire AFTER the software reads the Custom Arrivals Table. Therefore one of the User Events fires on the model Reset event only and the other one fires at 1439 and repeats every 1440 minutes thereafter.

arrivals-generated-dynamically-from-global-table.fsm
0 Likes 0 ·