gitahi86
(Gitahi Ng'ang'a)
July 29, 2015, 4:14pm
1
How do you get the location attribute of a given location attribute type for a given location through the OpenMRS API?
I’ve looked through the LocationService and seen nothing I can use for this. Am I missing something or is there some alternative method?
darius
(Darius Jazayeri)
July 29, 2015, 5:33pm
2
LocationAttributes are subproperties of Location, and the API (only) lets
you fetch them via the Location.
Look for a method like Location.getActiveAttributes or something like that.
(It’s probably defined on a base class.)
wyclif
(Wyclif Luyima)
July 29, 2015, 5:51pm
3
I guess he is asking for a method that returns location attributes of a given attribute type and that is
Location.getActiveAttributes(CustomValueDescriptor ofType)
1 Like
riyatyagi
(Riya Tyagi)
November 4, 2020, 8:22am
5
Hi,
Is there any way to get a location by its attribute value? I am storing the id, provided by a central system in a country, for a facility as a location attribute and want to retrieve the location by attribute value.
Thanks
dkayiwa
(Daniel Kayiwa)
November 4, 2020, 11:21am
6