Closed aleksa-krolls closed 2 months ago
Good progress on the mapping of mhpssFollowup
form, See WIP #23
EOD Update
I have fix merge conflicts and rebase latest changes from staging
. But i have commented out the create()
operation. @aleksa-krolls let's sync tomorrow to test this
Background, context, and business value
Ref #2 for the original WF2 specs., and ref #12 for how we implemented logic to handle multiple forms.
The specific request, in as few words as possible
Given the new MHPSS Followup form and extended mappings for
mhGAP Baseline
form, we need to make to make the following changes... please branch off ofstaging
3-get-encoutners
We have a new
MHPSS Followup
form to map, so add theuuid: be8c12f9-e6fd-369a-9bc7-46a191866f15
Remember: There will be other encounters belonging to other form uuids. Discard these encounters --> we only want to hold onto the encounters for the forms in our list.
4-get-options-map
We need to add more mappings for (1) mhGAP Baseline form, and (2) new form MHPSS Followup. See updated mapping spec.
mhGAP Baseline
form to the mappings list instate.mhgapMap
state.mhpssFollowupMap
for the new formMHPSS Followup
Note on custom transformations & refactoring the logic
The
PHQ9 Score
question has custom transformation logic, for which I drafted a function for - see getRangePhq(). Please6-create-events
Now that we're mapping 3 forms/encoutners, we need to insert 3 different types of events. (And remember, eventually there will be up to 6 types of forms/events.). Each event type will have (1) its own
programStage
and (2) different mappings fordataValues
(bc each event has a different set of questions).Here is the mapping for the NEW
MHPSS Followup
eventAPI Documentation
Input
Credentials
MSF DHIS2 UAT - June 2024
MSF OpenMRS Demo
Data
Run
wf2-1
with cursor{"manualCursor": "2024-09-16T10:00:00.00"}
Output
If OMRS returns X patients, then X number of patients should be upserted in DHIS2. For each Patient, we will query for Encounters and then filter by
form.uuid
. If Z Encounters are returned, then Z Events should be created in DHIS2.Testing guidance
Run
wf2-1
with cursor{"manualCursor": "2024-09-16T10:00:00.00"}
to find patients where these new forms have been filled out.Katrina Dima
is an example OMRS patient who should be returned and has all 3 forms (MHPSS Baseline, MHPSS Followup, and mhGAP Baseline) completed. http://msf-ocg-openmrs3-dev.westeurope.cloudapp.azure.com/openmrs/spa/patient/9ef373a2-3267-4171-89ce-5b5dd0da0b3c/chart/Patient%20SummaryToggl
MSF 2024