question

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

How do I identify the “group” which contains the location reserved by a patient?

Immediately after a patient reserves a location, I would like to identify the “group” containing this location.

I have the following command for identifying a location reserved by a patient:

getname(tonode(get (first (var (patient, VAR_PatientDestination)))))

I would like to know if this command can be made more efficient and, secondly, how do I identify the group that the reserved location belongs to?

Tee Hiett

Tee H. Hiett, Ph.D.

Professor Emeritus

Department of Health Services Administration

University of Alabama at Birmingham

Choose One
groupscommandslocationsareagetarea
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
2 Likes"
Matthew Gillespie answered Brandon Peterson commented

The getarea() command will return the integer value of the area of the location you pass in. You can use this number to look up the name of the area at that index. For example:

treenode location = tonode(get(first(getvarnode(patient, VAR_PatientDestination))));
string areaName = getname(rank(AreasNode, getarea(location)));
· 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 ·

Matthew, Thanks (belatedly)

Tee

0 Likes 0 ·

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.