question

Chandler avatar image
1 Like"
Chandler asked Chandler commented

(HC) Queue for multple processes, do first available, but remain in queue?

I am completing some model logic and need to find a better solution for something.

Currently, at registration/triage, my patients get a list of the imaging types that they will need. Once they get to the imaging process group they go through a sequence of Decide components that checks whether they need certain imaging processes.

  • 1.1 They check to see if they need an imaging step.
    • a. If they don't need that one, they will proceed to check the next imaging process
    • b If they do need that one they branch off
      • i. If they succeed at acquiring the resource, they go through the process and the imaging tyoe is removed from their list
      • ii. If they fail at acquiring the resource, they bounce back out and move to check for the next process. (2.1, 3.1...)
  • 2. If they do not need any or fail to acquire all imaging, they check to see if they still need any imaging.
    • a. If they do, they go back through this loop
    • b. If they don't (imaging all complete), they exit the loop.

What I need is a way to have a patient who needs an imaging process but fails to acquire it to remain in the queue (but still advance to check for the next imaging. If Xray is backed up but CT is free, we need to have the patient do CT while waiting for xray)

I would think that this is managed in a list for each imaging room... on a failed acquire, the token is pushed to the list. At the same time, all attempts to acquire can only succeed/be made by the person who is last on the list. (It has to be their turn)

I think I could make that logic, but I think it's odd that I can't push to the end of a list with built in components and I wonder if it's a signal that I'm thinking about this wrong.

  • I'd rather say: if patient == list[1]
  • than: if patient == list[list.length]

--

Would a global list be the correct way to manage this? Do I need to create a child token to sit in the queue?

Thanks!

FlexSim 23.1.1
healthcarelistsqueuing
· 7
5 |100000

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

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Chandler commented

My thoughts on this:

The third point from your comment is what makes this somewhat tricky. Since a 'better' patient might arrive, a location should only ever get acquired by a patient that can start to use it immediately. With a list, you would have to keep track of the current 'best' candidate, who gets to acquire the location as soon as both him and the location are free.

Keeping track of that best candidate doesn't really get any easier by using a list. So in the attached model I don't actually use any list.

A patient token creates a child token for each process the patient has to go through. These run through a subflow where they first check if the respective location is currently available (denoted by a label on the location object). Either because nobody has reserved it yet or because the new patient has a higher "Acuity" value than the one that current is pending to use the location.

If the location is available the token can continue. It has to enter a zone that only lets a single token per patient enter at a time. Tokens that wait in the "Enter Zone" activity can thus be preempted by newly arriving patients.

If the location is not available, the token is send to a "Wait for Event" activity (so are tokens that are preempted during their wait to enter the zone). Whenever a patient finishes a process, a message is send to the Process Flow and the tokens that need to acquired that location are released from the "Wait for Event" to try to 'acquire' it again. Another zone orders them by their "StartTime" label (age of the token) and spaces them out using a "Breathe" delay, so any label updates after the check happen before the next token enters the Decide activity.

flexible-process-order-fm.fsm


· 5
5 |100000

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