Open aleksa-krolls opened 2 weeks ago
@aleksa-krolls any update here ?
@mtuchi the Create Events
step is failing, see run. I was attempting to sync a new MSF Mental Health - mhGAP Closure
submission for the patient with MSF ID: IQ146-24-000-742
.
hey @mtuchi I've updated this issue description with my issues of the errors thrown in recent run failures. Please address these and then hand back to Aicha for testing.
@daissatou2 please see this video for guidance on how to troubleshoot and record any other errors like these going forward. Thanks!
EOD Update
trackedEntity
and enrollment
and logged the patient idencountersMapping
payload on create events
step. no
to FALSE
and yes
to TRUE
@mtuchi good news is that I was able to resolve most of the event
errors! Will walk you through it tomorrow.
But now the wf is failing on next-staging
when trying to update the TEI's gender
in the last step. See run failure and error.
Failed step Update TEIs after 202ms
{
"message": "TypeError: Cannot destructure property 'trackedEntity' of 'TEIs[answer.person.uuid]' as it is undefined.",
"name": "RuntimeError",
"severity": "fail",
"source": "runtime",
"subtype": "TypeError"
}
Hey @aleksa-krolls i have filtered person without trackedEntity
in update-teis
step and add a log of the person uuid. The changes are already synced to app you can proceed with testing
Issue
I added back console.logs so we can actually see the
events
payload you're sending to the dhis2 api... here is the latest payload causing errors.See run failure with these errors:
My Errors Analysis
There are 4 issues here:
For the error
Enrollment value is null
, only 1 of these events is linked to a TEI or enrollment (see L222). I think this means something is wrong in theUpsert TEI
step or the mappings. **The other events are not linked to atrackedEntity
at all!enrollment
in the programw9MSPn5oSqp
, and if not - we enroll them in step wf2/2-upsert-teis.js.enrollment
has an id, which we should include in this events mapping like this:Error
"message": "Value 2 is not a valid option for tsFOVnlc6lz DataElement in option set 0_4,5_9,10_14,15_19,>20",
2
instead of0_4
... why? We should send0_4
as per the getRangePhq custom transformation.For the errors related to
Data Element c4TiPRUQ56A
cgi-s_score|0
.For the errors related to
Data Element iEdamWl0wzQ
cgi-s_score|0