Closed aleksa-krolls closed 2 weeks ago
Getting this error, i will investigate further tomorrow
POST http://msf-ocg-openmrs3-dev.westeurope.cloudapp.azure.com/openmrs/ws/rest/v1/patient/cd8f0b8c-af5c-41c8-b3c8-b2b727710bb5 - 200 in 693ms
Successfully updated patient
[R/T] ✘ Failed step create-patients after 2.363s
[R/T] ✘ {
"source": "runtime",
"name": "RuntimeError",
"severity": "fail",
"subtype": "TypeError",
"message": "TypeError: Cannot read properties of undefined (reading 'uuid')"
}
Carry over to next sprint, I couldn't get to this today.
Old issue - upsert
pattern was implemented on next-staging
and is in QA. Closing this issue.
https://github.com/OpenFn/openfn-lime-pilot/blob/next-staging/workflows/wf1/3-create-patients.js#L141-L146
Background, context, and business value
Ref #1 for original WF1 specs.
Right now WF1 is sometimes failing bc test data has already been synced from DHIS2 to OMRS - see example run with error "Identifier already in use by another patient". Let's implement an "upsert" pattern to check if that OMRS patient already exists.
The specific request, in as few words as possible
Please make sure this feedback is implemented so that
address
is always mapped.Then, let's replace the create Patient() step with an "upsert Patient" step, where we should...
GET /patient?q=${patientNumber}
to look up existing patients using the dhis2patientNumber
Expected data volumes
We might expected a couple dozen of patients in the initial migration
API Documentation
Input
Credentials
MSF DHIS2 UAT - June 2024
MSF OpenMRS Demo
Data
Run
wf-1-1
to get TEIs from DHIS2Output
If DHIS2 returns X patients, then X number of patients should be created in OpenMRS. See example output payload: https://github.com/OpenFn/openfn-lime-pilot/blob/main/sample-data/pilot/openmrs_postPatientBody.json
Testing guidance
Run WF1 with input
{"manualCursor": "2024-09-13T10:00:00.00"}
Toggl
MSF 2024