question

Chandler avatar image
0 Likes"
Chandler asked Jeanette F commented

Escort OR Transport Patient, based on a label value?

I have tried this several ways using sub flows, and I keep getting errors that are slightly beyond my ability to understand. I'm strongly considering doing it the dumb way... but I know the capability is in here.

Before I get too deep into troubleshooting, is there an accepted way to do this?

I want to transport only patients that need it and escort others (or have them walk). For example, this occurs frequently when having patients walk to the waiting area or exiting the model from a low acuity room in our project. It is cumbersome to have a decision that sorts out those needing transport and then have them move by a different process (escort vs. transport).

Transport and Escort themselves are sub-flows. I tried to simply hybridize them, but I keep getting errors stemming from not being able to access some label values which seem to be applied within the Escort/Transport objects, so I can't figure out how to match that structure completely.

Is this a sub-flow thing? Or would there be a simpler way?

Thanks!

FlexSim 23.1.0
healthcare
· 4
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 Matthew Gillespie commented

This looks pretty good to me, but you should change the Release Transport so that it says "token.transport" in the Transport Resource field. That field needs to point at the resource you're releasing from.

You also don't have to create a new needsTransport label in the Escort x Transport activity. The Decide activity could just reference patient.needsTransport directly.

If you want to get the last X acquired objects on a label you could use the Array.slice() method like

patient.Staff.slice(1, X +1) (since the last acquired are at the start of the array)

So to get the last 3 you would say

  1. patient.Staff.slice(1, 4)
· 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.