Closed f-odhiambo closed 4 months ago
TBD From where do we retrieve the Location ID - this needs to follow a configurable approach
Some thoughts
For the case of SID maybe create a group and then save the location to the shared pref. For subsequent family member addition, the use the stored group location id in pref. To avoid issues we will not have location selection in the add member form.
Every time we switch to a new group update the location is in the shared preference. i.e. new Family selection
I rewrote to abstract this a bit.
Related Entity Location
TBD From where do we retrieve the Location ID - this needs to follow a configurable approach
- From the Location selection profile view in the case of EUSM
- Get Location selection from newly created Group/Patient in the case of SID
Some thoughts
For the case of SID maybe create a group and then save the location to the shared pref. For subsequent family member addition, the use the stored group location id in pref. To avoid issues we will not have location selection in the add member form.
Every time we switch to a new group update the location is in the shared preference. i.e. new Family selection
@pld @f-odhiambo I think this is defined here. The idea is to also find the subject of the data being created and then find the Location linked to it based on the linkage defined here
We can decide to use the Questionnaire subject to find the Entity the data belongs to. This will however break for use on workflows that do not need a questionnaire to be filled.
I update the issue to add more details
@dubdabasoduba @f-odhiambo
Can you confirm the system used for this new resource tag.
{
"system": "https://smartregister.org/patient-location-tag-id",
"code": "1a8ae4f2-c94b-4366-ac31-f55ccf3168a2",
"display": "Related Entity Location"
}
The strings for the other tags are hardcoded in the string.xml
file for the app. So we need to get it right.
@ellykits here you go
{
"system": "https://smartregister.org/related-entity-location-tag-id",
"code": "1a8ae4f2-c94b-4366-ac31-f55ccf3168a2",
"display": "Related Entity Location"
}
Update needed for Resources created from the patient's profile. At the moment the Related Entity Location Tag is not cascaded when you start a workflow from the profile
CC @ellykits
Background & Context
As a health practitioner, I want to be able to distinguish patients based on the location they are located at.
As a data collector or service monitor, I want to be able to distinguish information related to a point of interest based on its connection to that point of interest.
Also see discussion item
Proposed Solution
High level:
meta.tag
calledRelated Entity Location
to every resource generated on the app that is tied to a related entity that could be a Patient, a Group, or a Location (eg representing a service point or POI).Assigning a value to
meta.tag: "Related Entity Location"
can happen in 3 waysmeta.tag: "Related Entity Location"
of the related entity (in this case the related entity is the entity itself).subject
or similar field links the newly saved resource to the related entity[new resource].meta.tag: "Related Entity Location"
=[related entity].meta.tag: "Related Entity Location"
Example meta tag:
Patient resource with meta-tag: