As an OpenLMIS administrator, I want my Geographic Zones to have a representation as FHIR Location so that other systems may inter-operate with OpenLMIS through the OpenHIE mCSD profile.
From Geographic Zone -> Location:
id -> id
code -> alias
level -> identifier (see examples for using the levels URI and UUID)
name -> name
latitude & longitude -> position
Also include:
physicalType (use http://hl7.org/fhir/codesystem-location-physical-type.html 's area)
partOf link to this zone's parent's Location resource, until we're at the root Zone.
AC:
All geographic zones are represented as FHIR locations at `GET /api/Location`
(Note: This breaks our OpenLMIS API Style Guide because this matches FHIR specifications.)
Geographic zone heirarchy is naviagable by Location.partOf
don't bother with etags, returning a single resource (e.g. `/api/Location/{id}`), paging or building search capabilities
don't bother with operations other than GET
From the grooming call:
yes it is a new resource, new endpoint but populated from the facility and geographic entity (fields are mapped)
Because we work on in a response there could be additional entries related with facilities. Please ignore them until you will verify
I tested the GET/api/Location endpoint, and everything works correctly. Yet I noticed that there is also a POST/api/geographicZones/byLocation endpoint and I'm not sure if it's a part of this ticket or not. If not, this ticket can be closed.
/api/geographicZones/byLocation has nothing to do with this ticket.
On a side note, please always mention someone who can answer your questions in the ticket comment and daily Slack report so those questions are not lost.
I thought so but I had to make sure, as I didn't find any other ticket that could be related to that endpoint, which appeared new to me. All right, I will remember about it in the future. In that case, I will close the ticket.