question

Leah R avatar image
0 Likes"
Leah R asked Leah R commented

How to create a text label based on an acquired resource

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



FlexSim 22.1.2
labelspatient flow
1655216578499.png (11.6 KiB)
1655216730575.png (13.6 KiB)
1655216781467.png (16.0 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

·
Regan Blackett avatar image
1 Like"
Regan Blackett answered Leah R commented

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.

· 5
5 |100000

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

Leah R avatar image Leah R commented ·

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 0 ·
1655218853138.png (12.2 KiB)
Regan Blackett avatar image Regan Blackett ♦ Leah R commented ·

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 0 ·
Leah R avatar image Leah R Regan Blackett ♦ commented ·
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 0 ·
Show more comments

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.