fhircore
fhircore copied to clipboard
Add the ability to Link Entities to Locations
Describe the feature request.
- Based on this discussion https://github.com/opensrp/fhircore/discussions/3034, we agreed to link Entities to locations using the LIST resources.
- This can be done in 2 ways
- Via the StructureMaps
- Via code in the app
- This ticket is to implement the code approach.
- Reasons why we would want to have this on the code instead of using StructureMaps
- This linking is key for Related Entity Location tagging to work well for CHW and HF applications
- All the tagging functionality is currently handled by the code so it will be prudent to have this handled there too
Additional context
- [ ] Things to consider while implementing this
- [ ] How to configure Questionnaires so the app knows when to create the linkage.
- [ ] Configuration to identify the field that holds the Location data.
- [ ] Configuration to identify the Entity to be linked to the Location
- [ ] We do not have editing implemented right now but having this requirement in mind while building this will help us build an extensible architecture.
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
Blocking for now.
Can describe more about how the configuration will work and discuss the pros/cons of the structure map approach. The problem I see with in code is that whether a code approach works is tightly coupled to how the Questionnaires are written, so having this in code does not provide guarantees it will work, it is still the content creators responsibility, i.e. by having this in code we're splitting the responsibility.
Blocking for now.
Can describe more about how the configuration will work and discuss the pros/cons of the structure map approach. The problem I see with in code is that whether a code approach works is tightly coupled to how the Questionnaires are written, so having this in code does not provide guarantees it will work, it is still the content creators responsibility, i.e. by having this in code we're splitting the responsibility.
@pld after our discussion I am updating this ticket to change the acceptance criteria to deliver the following
- Documentation on how to link locations tied to Entities during the Entity creation (CHW & HF).
- This includes some sample StructureMaps to generate the Entity and the LIST resource that links the Location to the Entity
- Documentation on how to create Locations and later link them to the Entities (MIcroPlanning).
- This includes some sample StructureMaps to generate the Entity and the LIST resource that links the Location to the Entity
@Wambere can pick this up once she is done with her current assignments.
@ellykits this means we do not need to handle the linkage automatically via code.
This sounds good, is it possible to have tooling that checks the location generation structure map you've written aligns with the format we expect for locations and their linking resources?
This sounds good, is it possible to have tooling that checks the location generation structure map you've written aligns with the format we expect for locations and their linking resources?
I think we can. @Wambere thoughts?