question

Marzia C avatar image
0 Likes"
Marzia C asked Marzia C commented

Patient Allocation

Hi,

I want to build logic on Flexsim. No other patients will enter the isolation zone (for PCI 1) when any patients are present in that zone. But when the isolation zone is empty, PCI 2 patients can enter in isolation zone.

How to build that logic?

I really appreciate the help.

Flexsim.fsm

FlexSim 21.1.5
patient flow
flexsim.fsm (75.5 KiB)
· 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.

Ryan Clark avatar image Ryan Clark commented ·
Hi @Marzia C,

Could you please explain a bit more on the logic you're trying to implement. I see that there are two types of patients and two groups of beds, but I'm not certain what your constraints are on who can access the beds. Can only one Isolation patient be in a group of beds? Or can Isolation patients be together, but PCI 2 patients cannot?

If you could explain your desired logic a bit more, that would enable us to help you more. Thanks!

0 Likes 0 ·
Marzia C avatar image Marzia C commented ·

Hi Ryan,

I want to build an isolation zone for COVID-19 patients (PCI-1). When COVID-19 patients are treated in isolation zone, the non-COVID-19 patients will go to POD-A. But I also want to use isolation zone for non-COVID patients (PCI-2), when there is no COVID-19 (PCI-1) patient in isolation zone. Mainly, PCI-2 patients cant not use isolation zone when there is PCI-1 patients, but PCI 2 patients can use isolation zone when there is no PCI-1 patients.

Right now, I use only two stream flow for PCI 1 and PCI 2 patients. But i do want to build that logic. Is it possible?

Thanks!

0 Likes 0 ·

1 Answer

·
Jeanette F avatar image
0 Likes"
Jeanette F answered Marzia C commented

Hello @Marzia C,

There are several concepts that I implemented to accomplish this. When you are reviewing the model, If I seem to have missed one in my explanation please let me know.

For starters all the beds have a label called Iso on it to indicate whether or not an isolation patient is using a bed in that area.

1646953311458.png

I implemented a pull from list activity that looks at the beds and check for an empty bed that has an Isolation label set to 0. You will notice that this activity has a max wait timer set on it and the tokens cycle through it till they successfully pull a label. Every time a token enters the activity it reevaluates the list. If this cycle was not implemented then the token would stay on the activity even though a bed became available. Normally the list would be reevaluated when a new value is pushed to the list, however this does not occur in your model. The list always has all the locations on it and the labels are dynamic.

1646953703713.png

The next parts that I will explain are to control setting the label on the Isolation beds.

When a patient enters the isolation block of activities all the beds will have the Iso label set to 1. The sub flow looks at the number of beds in the isolation group and creates a token for each bed and assigns a bed to each token. The tokens then run through the sub flow that assigns the labels on the bed to 1.

1646953880721.png

The last part of the isolation activity block uses a custom code activity to look at the list of locations. It queries for each bed that has an owner that is in the isolation group. The next line looks to see how many beds it found and returns that as a label to the token.

1646954147659.png

The token then goes through a decide activity to check to see if that label set above is zero and if so then no isolation patients are in the isolation area and all the Iso labels on the bed can be set to zero.

1646954250636.png

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

Marzia C avatar image Marzia C commented ·

Hi Jeanette,

My problem looked so complicated but you made it easy. Thanks!!

0 Likes 0 ·
Ryan Clark avatar image Ryan Clark Marzia C commented ·

Hi @Marzia C,

I'm glad @Jeanette F's answer was able to help you! In the future, please post any replies to answers as comments on those answers rather than as new answers. Please see Best practices for using this Answers site - FlexSim Community for more info. Thanks!

0 Likes 0 ·
Marzia C avatar image Marzia C Ryan Clark commented ·
Thanks for the note!
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.