Automating data exchange workflows between DHIS2
, OpenMRS
, and Open Concept Lab (OCL)
.
Note that commits to main
will be auto-deployed to the connected project configuration hosted on OpenFn.org. Always work on a branch and submit a pull request when ready to release!
- Clone the repo to work with it locally
- Locally create
/tmp
folder locally with astate.json
file that you don't commit to github - start writing and testing jobs locally with the relevant adaptor
To prototype automated data exchange workflows between MSF's global DHIS2 system and locally-deployed OpenMRS instances, we implemented the OpenFn DPG for this prototype--specifically the platform v1
hosted on OpenFn.org.
If MSF hopes to pilot this solution with real-world sites, then it may choose to locally deloy the v2
of the OpenFn platform--OpenFn/Lightning. See below for what the proposed architecture might look like for this solution running at scale.
For the LIME-Project
, two workflows were prototyped. These workflows leverage the OpenFn dhis2
, openmrs
, and ocl
adaptors (see OpenFn/Docs), and connect with demo instances of the target systems.
- See below diagrams for a functional overview, or see the diagrams directory for the technical versions of these diagrams, which also detail the specific API steps.
- See this document for the data element mapping specifications, which detail how specific data points are mapped between systems.
- See this sheet for the test cases used to validate the workflows.
This workflow #1 is powered by by the following OpenFn jobs:
- wf1-1-getTEIs.j (using
dhis
adaptor) - wf1-2-createPatients.js (using
openmrs
adaptor) - wf1-3-updateTEIs.js (using
dhis2
adaptor)
See the WF 1 technical diagrams for documentation on the specific API endpoints and operations automated in the job code.
This workflow #2 is powered by by the following OpenFn jobs:
- wf2-1-getPatients.js (using
openmrs
adaptor) - wf2-2-upsertTEIs.js (using
dhis
adaptor) - wf2-3-getEncounters.js (using
openmrs
adaptor) - wf2-4-getOclMap.js (using
ocl
adaptor) - wf2-5-createEvents.js (using
dhis
adaptor)
See the WF 2 technical diagram for documentation on the specific API endpoints and operations automated in the job code.
In Workflow 2, there is a step to dynamically export mapping specifications from OCL via its API.
- See this lime-project collection on the OCL hosted app to view how mappings were configured.
- See below diagram for an overview of how this works. For the prototype, this was implemented for the attributes
Entry triage color
andFinal diagnosis
(data that is collected when new OMRSencounters
are created).
Contact support@openfn.org for questions or help.