Details
-
Enhancement
-
Status: Closed
-
Must
-
Resolution: Fixed
-
FM2 1.2.0
-
None
-
None
-
Medium
-
March, April 2021 FHIR
Description
We currently don't support creating encounters through the FHIR API. This is down to two things:
1. Encounter in FHIR maps to OpenMRS Encounter but also to OpenMRS Visit
2. We need the encounter type to be able to create the encounter or the visit type to be able to create the visit.
Thanks to FM2-332, we now have a way to represent the encounter type in FHIR and with the completion of FM2-350, we will have a way to represent the visit type in FHIR. Thus, we should be able to solve both of those problems.
To implement this fully we need to:
1. Update getEncounterByUuid() to return either the encounter matching that UUID or the visit matching that UUID.
2. Update deleteEncounter the same way.
3. In createEncounter determine if the encounter submitted is an encounter or visit (based on the provided Encounter.type field. If the Encounter.type field is not provided, the request should be rejected.
4. Modify updateEncounter in the same way as createEncounter described above.
To determine if an incoming encounter is an Encounter or a Visit, we should look at the Encounter.type field. If the system property of that field is matches the ENCOUNTER_TYPE_SYSTEM_URI constant then it is an encounter. If it matches the VISIT_TYPE_SYSTEM_URI, then it is a visit. If it is anything else, it should be rejected.
Gliffy Diagrams
Attachments
Issue Links
- depends on
-
FM2-350 Add support for mapping visit types to the Encounter.type field
-
- Closed
-