question

Silvia avatar image
0 Likes"
Silvia asked Silvia commented

How to prioritize a resource according to its waiting time

23. CHEGADA MAXIMA 4.fsm

Hi,

I´m simulating a 24-hour emergency room that uses the Manchester protocol for patient classification and prioritization. I need definning a maximun waiting time for each color when prioritizing a resource.
For example:

Orange: care within 10 minutes

Yellow: care within 60 minutes

Green: care within 120 minutes

Blue: care within 240 minutes

If the waiting time for the green color exceeds 120 minutes, it can be treated as a higher priority and receive fast care. To do This, you create a business rule that checks if the green color has exceeded the maximum waiting time and then change its priority to something like "urgent green" and prioritize it over other colors that are within the expected waiting time.

Initially, I had modeled each color to have a higher priority. Howeever, the result of the waiting time for medical attention is too discrepant for each color. For example, yellow is at 15 minutes abd green is at 300 minutes.

Can anybody help me, please?

FlexSim 23.0.3
wait timeemergencypriorty
· 2
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Silvia, was Felix Möhlmann's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Silvia avatar image Silvia Jeanette F ♦♦ commented ·
Hi, the response has been accepted.
0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Silvia commented

I assume what you already tried is something like in the attached model? (Base priority dependent on color case, if patient exceeds the time, priority is increased)

Patient_Priority_fm.fsm

Another approach you could try is to assign each patient a "due time" at which the maximum wait time is reached and use that to determine the priority (patients acquire resource in order of due time). For example a blue case that came in 200min ago would have priority over a new yellow case. At the same time a blue case that came in 250min ago (10min over time) would have priority over an orange case from 15min ago (5min over time). I can't say if that would be wanted behaviour.

Patient_Priority_fm_2.fsm

To get more control over who acquires a resource you could use a standard resource activity instead of the healthcare variant. This requires some additional work to manage the labels to work with the other healthcare activities but it allows to define "Queue Strategy" that determines who gets priority. The big difference is that the expression used to order the patients is reevaluated each time the resource is assigned again, meaning the priority can vary depending on how long the token has already waited.

The example model below uses the same base approach as model "2" (ordering by due time). However it applies the case severity as an additional factor, meaning that for example each minute an orange case is over the time actually counts as 4 minutes.

1678869151612.png

This is of course just an example.

Patient_Priority_fm_3.fsm


· 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.

Silvia avatar image Silvia commented ·

23. CHEGADA MAXIMA 4.1_autosave.fsmI want to express my gratitude for your response!

I believe suggestion 2 is the most suitable for my case.

To implement in my workflow, which works as follows: the patient arrives, retrieves the ticket, is classified, and goes to reception to register. After registration, the patient goes to the consultation, which is prioritized according to their waiting time and priority level (1,2,3,4).

I used the "Walk or Wait Area" process, which was considering that the first resource acquired would be the doctor and not the examination table, as it is not possible to acquire an examination table without a doctor, since each doctor stays in their own office and during their breaks, the office is not available.

However, a new problem has arisen: the model does not take the patient to the waiting room when there is no doctor available.capturar.png

I would also like to know if it is possible to collect the waiting time of the patient after classification until they enter the doctor´s office with this new format.

Once again, I greatly appreciate your help!

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Silvia commented ·

Couple things I noticed in your model:

You assign the "casePrio" label twice and the dueTime wrong. Since the tokens are already split by priority you don't need the "Values By Case" option. To get the current model time use either "Model.time" or "model().time". The chosen times also seem wrong. My example model used seconds as time unit whereas yours uses minutes. But you divided my values by 10 instead of 60.

1678980526984.png

To have the patients go to the waiting area you have to activate the "Use Max Wait Timer" option and set where the tokens should if they couldn't acquire a resource within the allotted time. (Compare to the acquire activities in other "Walk then Process" blocks). It's important to make sure that the connection ranks are correct.

1678980760748.png

1678980785152.png

In the Resource you are currently ordering by the "casePrio" label in ascending order, meaning that case 1 (blue) would have the highest priority.

1678980830379.png

And you are missing the staff reference in the "Process" activity, which would be "token.resource" in this case. I also don't know if the chosen option in the "OnPreempt" trigger will work with the standard resource activity.

1678980932001.png

0 Likes 0 ·
1678980526984.png (37.2 KiB)
1678980760748.png (10.1 KiB)
1678980785152.png (12.3 KiB)
1678980830379.png (4.3 KiB)
1678980932001.png (11.4 KiB)
Silvia avatar image Silvia Felix Möhlmann commented ·

Thank you very much!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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