question

Tee Hiett avatar image
0 Likes"
Tee Hiett asked Tee Hiett commented

get name pf patient reserving a location

Occasionally, when I am debugging a program, I would like to get the name of the patient in the waiting room who has a specific location reserved. How can I use commands to do this?

Thanks,

Tee

FlexSim HC 5.1.0
healthcarecommandstreenode
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

Cliff King avatar image
0 Likes"
Cliff King answered Tee Hiett commented

To get the name of the patient currently reserving Bed1, use the following statement:

getname(tonode(getvarnum(Bed1,VAR_ReservedForPatient)))

To get the name of the location that "patient" is reserving, use the following statement:

getname(tonode(get(first(getvarnode(patient,VAR_PatientDestination)))))
· 1
5 |100000

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

Tee Hiett avatar image Tee Hiett commented ·

Thanks, Cliff,

What I was missing was the tonode step. I never thought about converting the varnumber to a node but I could clearly see that the varnumber was a number and not a treenode.

Little by little.

Tee

0 Likes 0 ·