question

David Seo avatar image
0 Likes"
David Seo asked Matthew Gillespie commented

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

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

FlexSim 19.1.1
labelspeople modulepeople settings
hc-up2-tuto11.fsm (425.1 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
1 Like"
Matthew Gillespie answered Matthew Gillespie commented

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[i];
	token.labels.assert(patientLabel.name).value = patientLabel.value;
}
· 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.

David Seo avatar image David Seo commented ·

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.

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 0 ·
hc-up2-ex11-1.fsm (426.7 KiB)
decide.png (33.3 KiB)
decide.png (33.3 KiB)
Matthew Gillespie avatar image Matthew Gillespie ♦♦ David Seo commented ·

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

1 Like 1 ·
patientlabel.fsm (426.5 KiB)
tokenlabel.fsm (426.7 KiB)