I want to use the People Setting labelset data in the token...

I want to use the People Setting labelset data in the token...

support5CRPZ
Advocate Advocate
17 Views
3 Replies
Message 1 of 4

I want to use the People Setting labelset data in the token...

support5CRPZ
Advocate
Advocate

[ FlexSim 19.1.1 ]

I am making an HC example model using 2019 update 2.

I want to use the People Setting labelset data as the token's same label name value.

I can't copy the patient's label and value to token. How can I do it?

hc-up2-tuto11.fsm

0 Likes
Accepted solutions (1)
18 Views
3 Replies
Replies (3)
Message 2 of 4

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

The People Settings labels are all copied onto the patient in the 3D view. So you don't really need to have the labels on the token, you can just enter patient.WalkAmbu whenever you need to reference that label value.

If you really want to copy that value to the token you can do this, but the PersonLabels statistics table only tracks when the label on the patient changes so I wouldn't recommend doing this. If you just want to copy one label you can use an Assign Labels activity and assign the token a WalkAmbu label with the value of patient.WalkAmbu. If you want to copy all the patient labels you would want to use a Custom Code activity with a for loop like this:

treenode patient = current;

for(int i = 1; i < labels(patient).subnodes.length; i++) {
	treenode patientLabel = labels(patient).subnodes;
	token.labels.assert(patientLabel.name).value = patientLabel.value;
}


Matthew Gillespie
FlexSim Software Developer

Message 3 of 4

support5CRPZ
Advocate
Advocate

Thank you @Matthew Gillespie

In Assign activity, I can't assign token.Patient.WalkAmbu to token.WalkAmbu.

token.WalkAmbu has null value.

I want to several patient flow in one PatientTrack like attached.

22008-decide.png

I should use the patient label value in the PF activities.

But I found it is possible in the case of using General PF of FlexSIm not HC environment of Person instance.

How can I control it in HC environment?

hc-up2-ex11-1.fsm

It is made by 2019 update 2.

0 Likes
Message 4 of 4

Matthew_Gillespie
Autodesk
Autodesk

Because you're in an instanced flow you don't say token.Patient, you just say patient which is the attached object. Like I said before, there's no real need to copy the label from the patient to the token. You can just type patient.WalkAmbu directly in fields like in this model:

patientlabel.fsm

However, if you really want a token label you just type the exact same thing in the Assign Labels activity:

tokenlabel.fsm



Matthew Gillespie
FlexSim Software Developer