question

Lou Keller avatar image
0 Likes"
Lou Keller asked Matthew Gillespie answered

How do I transfer label information in any sequence from patients to locations to item objects?

In a certain model, Patients are given a patient-unique Lab sample processing time initially drawn from a PCI table distribution and subsequently assigned to the patient's label, "LabProcessTm." How do I transfer that value from the patient's label to the item object's label by the same name when the item object is generated as a result of a "Process>Send Item" activity? 2. What would be the correct statement if I wanted to transfer the content of an item object's label (namely, "InterestingValue") to a location's label (namely, "GreatValue")? How about subsequently to a patient's label (namely, "CaseValue")?

FlexSim HC 5.1.0
labelshealthcareitem objects
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

In the Item Created Trigger you'd use the getlabel command to get the value and then use the setlabel command to set a label value on the other object.

setlabel(item, "LabProcessTm", getlabel(patient, "LabProcessTm"));

You would do something similar for the other two cases.

setlabel(Bed1, "GreatValue", getlabel(item, "InterestingValue"));
setlabel(patient, "CaseValue", getlabel(item, "InterestingValue"));

If you were doing the last case using the created item you could look up the patient off the "patient' label on the item.

setlabel(getlabel(item, "patient"), "CaseValue", getlabel(item, "InterestingValue"));
5 |100000

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