OpenFn / openfn-lime-pilot

MSF LIME Project - OpenFn Workflows for Iraq Pilot
1 stars 0 forks source link

wf2/3-get-encounters fails with Type error #37

Closed aleksa-krolls closed 1 month ago

aleksa-krolls commented 1 month ago

Describe the bug and expected behavior

Fails with error TypeError: Cannot read properties of undefined (reading 'flat'). I think it's failing when 0 patient or 0 encounter records are returned...

To Reproduce

  1. See run failure
  2. To replicate, use this cursor: { "lastRunDateTime": "2024-09-30T12:00:00.000Z" }

expression.js

3-get-encounters.js I was testing on staging... not sure if you want to branch off of that, or if we should first merge your other changes pending code review (bc Joe will be out for >1 week). Let's discuss.

Toggl

MSF 2024

mtuchi commented 1 month ago

@aleksa-krolls i have update the edge conditions in this PR #39, When you merge make sure to re-run the workflow from beginning