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.

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.