FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
The current LocationHierarchy endpoint returns a response with a tree format. While this is great for usage when displaying a hierarchy it poses a problem when the mobile client tries to save the location data within the tree.
We would like to support the tree and a list response from this endpoint. This will allow the client to save the location resources like any other.
Here is a high-level step-by-step process of how to achieve this.
Adding an extra request param to tell the endpoint what kind of response to return. The tree format remains the default.
We can call it responseFormat=list. Feel free to define a better name
Update the LocationHierarchy endpoint to check the request param and decide what response to return.
If the response is a list, the gateway should create a list of the location resources. The following items should be taken into consideration
Pagination should work just like any other endpoint
This list of locations should be in a bundle like other resources
Acceptance criteria
[ ] The LocationHierarchy endpoint should have the ability to return a response with a tree or list format
[ ] The list format should incorporate the correct pagination just like the other endpoints that return a bundle of resources
Area path
A list of ordered steps in the app on usage of the feature to support anyone testing it e.g. Code reviewer, QA e.g.
Login to the app
Open Navigation bar
Click on Children register
Click on Child profile
Click on Edit profile from menu
Implementation plan (For Engineers)
The plan for implementing the solution e.g. via a description or a check list for the various ordered tasks that will need to be completed.
i.e. Describe how you intend to solve the problem
Describe the feature request.
responseFormat=list
. Feel free to define a better nameAcceptance criteria
Area path A list of ordered steps in the app on usage of the feature to support anyone testing it e.g. Code reviewer, QA e.g.
Implementation plan (For Engineers) The plan for implementing the solution e.g. via a description or a check list for the various ordered tasks that will need to be completed. i.e. Describe how you intend to solve the problem