question

Miguel M7 avatar image
0 Likes"
Miguel M7 asked Matthew Gillespie commented

How can I edit destination by case when escorting patient?

I am trying to save a room for a critical patient for after he/she completes getting diagnostics work. I want my patient to be escorted to their old room, but I want to account for the possibility of using a different shared asset. flowhelp.png

I created the label RoomType and assigned values 1, 2, 3. I thought I could manage destination by Object by case, using the case function: token.RoomType. I tried to set up the cases with getlastacquiredresource("Trauma Room",current), getlastacquiredresource("Standard Room",current), and getlastacquiredresource("Rooms",current) respectively, but I have been getting the following errors:

"Flexscript ErrorMODEL:/Tools/ProcessFlow/CriticalPatients/Escort Patient~8>variables/destinationRef Line 14Incorrect string type for parameter 1 in call to command getlastacquiredresource, expecting node Flexscript ErrorMODEL:/Tools/ProcessFlow/CriticalPatients/Escort Patient~8>variables/destinationRef Line 15Incorrect string type for parameter 1 in call to command getlastacquiredresource, expecting node Flexscript ErrorMODEL:/Tools/ProcessFlow/CriticalPatients/Escort Patient~8>variables/destinationRef Line 16Incorrect string type for parameter 1 in call to command getlastacquiredresource, expecting node Flexscript ErrorMODEL:/Tools/ProcessFlow/CriticalPatients/Escort Patient~8>variables/destinationRef Could not finish parsing because of previous errors."

I believe I need the correct application of getlastrecquiredresource(), or maybe another way to manage destination by case.

final-project-model-v1.fsm

FlexSim 19.2.2
healthcaresimulationpatient flowescort patient
flowhelp.png (261.4 KiB)
· 1
5 |100000

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

Miguel M7 avatar image Miguel M7 commented ·
0 Likes 0 ·

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Matthew Gillespie commented

I modified your model to do what I think you're trying to do. I changed the first Go To Room container to only have one Location Resource called "Room" and it defines it's Location with a By Case function that uses a different group for each different RoomType. That way you can then just have the patient escorted to the acquired location from the Room resource.

roombycase.fsm


roombytype.png (44.2 KiB)
roombycase.fsm (587.7 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.

Miguel M7 avatar image Miguel M7 commented ·

HI @Matthew Gillespie

I finished creating the model. Most things look accurate, but I noticed that for the Critical Patients, even though the logic is programmed to let the patient take the first available room, they are only subject to TraumaRooms. Could you help me figure out why this is happening? It is easier to observe this on 11/15/19 at night on the model.

Thank you!

final-project-final-v.fsm

1 Like 1 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Miguel M7 commented ·

Oh, we still need to uncheck the Same As Last Acquired box on the Acquire Standard Room and the Acquire Empty Room activities.

24132-final-project-final-v2.fsm

0 Likes 0 ·
Miguel M7 avatar image Miguel M7 commented ·

That solves my problem. Thank you so much!

0 Likes 0 ·