What about pursuing the idea of having multiple possible location values, like we do for Obs values? E.g.,
- location_id
- location_concept
This complexity could be hidden from the user in much the same way that the Obs value is (thus if you say āthe hospital labā it might be a location_id, but āhomeā might be a location_concept)?
I considered this approach, but didnāt think the complexity for API usage might not justify the benefits. That is, if abstract locations (like āHomeā) can be created as locations, then weād avoid making location-specific concepts and avoid the complexity ā e.g., if both location_id
and location_concept
are populated which takes precedence, clients donāt know if theyāre going to get a Location or a Concept, etc. The benefit of this approach (use just using concepts instead of locations) would be localization support of concepts.
Given all this, perhaps a slight tweak of your suggestion might work, e.g.,
location_concept
(FK to Concept)specific_location_id
(FK to Location)
Meaning we anchor on collecting location as a concept, using a value set as FHIR suggests & benefiting from localization. In those cases where someone needs to provide a specific (non-abstract) location, they could choose from locations and weād store that as additional location info. Both of these would be optional fields.
Makes sense. In that case, we will prob need 1 additional attribute ālocationCodeā which can have codes from the FHIR valueset, although I do not assume such details are needed. Another option is to use the ālocation tagsā - and once you select. that, only the locations tagged with a specific tag can be shown.
this imo, will be closer to OMRS ref model.
If you would use concepts to indicate the locationCode, then we will have to have some other mapping or convention to show the list of locations that can entered in āservicerequest.locationreferenceā
at the same time, having ref to concept for codes is also ok as it provides means of mapping to different code systems.
After discussion on todayās Platform team call, we decided to implement service order (and thereby referral orders) location as a concept. Having a specific location (pointing to OpenMRS Location) can be added in the future if/when the implementation need arises.