The documentation describes how to configure a CHT application to enable health workers to register patients and collect data offline, then sync these patient records to OpenMRS for access at clinics.
I would love feedback from OpenMRS developers on this workflow—particularly on how the FHIR resources are encoded.
Patients from CHT are mapped to FHIR Patient resources and sent via POST to the OpenMRS FHIR API. This part is straightforward, apart from needing to create IdentifierTypes beforehand with the REST API.
For form submissions from CHT, an Encounter resource is created to represent the interaction between the patient and the community health worker. Any relevant data from the report is represented as Observations linked to the Encounter.
On the OpenMRS side, the single Encounter is mapped to two separate Encounters: one with type Home Visit and another with type Visit Note.
Any Observations extracted from the form submission are linked to the Visit Note encounter.
Does this approach accurately represent the OpenMRS resources with FHIR resources?
I do not seem to understand this. I am not aware of an OpenMRS feature of mapping an Encounter to other Encounters. What i am aware of is a Visit having more than one encounter.
OpenMRS Encounters don’t need to be grouped by a visit and, in this case, it may not make sense for them to. Equivalently, you only really need the “Visit Note” Encounter.
Yes. I think the harder things here will be in, e.g., the details of mapping Obs to concepts that the OpenMRS system is aware of.
In FHIR, there’s no distinction between Encounter and Visit. It’s all Encounter resources. In OpenMRS, we map both Encounter and Visit to FHIR Encounter’s. IIRC, there’s something like a tag in the meta field to distinguish between them (and if you were creating two encounters, I think you’d need to send that).
I do not seem to understand this. I am not aware of an OpenMRS feature of mapping an Encounter to other Encounters. What i am aware of is a Visit having more than one encounter.
Yes, the mapping from one Encounter (on the CHT side) to two Encounters (on the OpenMRS side) happens in an OpenHIM Mediator. What is sent to OpenMRS is two requests to the FHIR Encounter endpoint.
OpenMRS Encounters don’t need to be grouped by a visit and, in this case, it may not make sense for them to. Equivalently, you only really need the “Visit Note” Encounter.
Thanks, this is good to know, it may simplify things to only send the Visit Note Encounter without any corresponding Visit.
Yes. I think the harder things here will be in, e.g., the details of mapping Obs to concepts that the OpenMRS system is aware of.
Yes the mapping to Observations is a very manual process with this workflow; the idea is to manage concepts on OpenMRS, and change or configure the CHT forms to match those concepts. An OpenHIM mediator does the actual conversion to FHIR Observations, but it needs CHT forms to be set up correctly and use same codes as the corresponding concepts in OpenMRS.
The mediator could also do the mapping between whatever is on the CHT form and an OpenMRS concept. It may even be useful to store those mappings in something like Open Concept Lab, where they can potentially be adjusted and versioned as needed.