question

Ming-Yu Y avatar image
0 Likes"
Ming-Yu Y asked Ming-Yu Y commented

How to set the staff state in healthcare

I want to set staff state as EscortPatient when the staff escort patient tstaff state.fsmo exit.

FlexSim 21.0.8
healthcarestatesstaffstates
staff-state.fsm (67.9 KiB)
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
0 Likes"
Matthew Gillespie answered Ming-Yu Y commented

You can manually set the state of the staff by using a line of code like this:

patient.Staff.stats.state("HC States").value = "EscortPatient";

The bigger issue is that as soon as the staff starts walking he sets his own state to InTransit so it will just get overwritten if you set it before the Escort Patient activity. One thing you could do is wait a couple seconds after the Escort Patient activity starts before setting the staff's state.

staff-state_escort.fsm


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

Ming-Yu Y avatar image Ming-Yu Y commented ·

The problem you mentioned is exactly what I don't know how to solve. But the idea really helped me with my current problem. 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.