How to create a text label based on an acquired resource

How to create a text label based on an acquired resource

leah_r
Not applicable
81 Views
6 Replies
Message 1 of 7

How to create a text label based on an acquired resource

leah_r
Not applicable

[ FlexSim 22.1.2 ]

Hello !

I am building an operating room model.

In my model, the ORs named OR1, OR2, etc.

1655216730575.png


I created a patient flow where the patient acquires the first available OR.

1655216578499.png


How can I create a text label associated to the patient that will give me the number associated with the acquired OR ?

I created a label that can give me the OR used once the patient is in it, but this is not enough.

1655216781467.png

How can I then use this label to acquire a surgeon called Surgeon1 ?


Thanks in advance,

Leah



0 Likes
Accepted solutions (1)
82 Views
6 Replies
Replies (6)
Message 2 of 7

regan_blackett
Autodesk
Autodesk
Accepted solution

If the goal is to make sure the same surgeon is associated with an acquired OR, like OR1 patients always get Surgeon1, OR2 patients always get Surgeon2, etc. It may be easier to accomplish with a center port connection.

If you connect the OR objects with their corresponding surgeons with center port connections, in the Staff resource's "Staff" field you can write this expression:

patient.Locations[1].centerObjects[1]

This would mean that you look at the most recently acquired location object's first center port connection and acquire that staff.

Message 3 of 7

leah_r
Not applicable

That sounds great, thanks ! Could you just show me exactly what you put in the staff field ? Because I tried the following and it does not work (I'm not familiar with center port connections).

1655218853138.png


0 Likes
Message 4 of 7

regan_blackett
Autodesk
Autodesk

The code is in the right place. If this is your first time working with Port Conenctions make sure you establish the connection by holding down the 'S' key while clicking and dragging between the OR and Surgeon obejcts.

0 Likes
Message 5 of 7

leah_r
Not applicable
Oh OK ! I understand better now ! The issue is that I have two patient flow. One where the resources are linked (like in the case I am presenting here) and another one where it is not the case.


If I include the port connections, will it still work if I try to acquire specific staff in the other patient flow ?

0 Likes
Message 6 of 7

regan_blackett
Autodesk
Autodesk
Yeah that should be just fine. The connection doesn't interfere with anything else you would do with different acquire schemes or anything like that.
0 Likes
Message 7 of 7

leah_r
Not applicable
Thank you very much !
0 Likes