Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WF1 errors - no paging in getTeis step & datetime RangeError #78

Open
aleksa-krolls opened this issue Dec 18, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@aleksa-krolls
Copy link
Member

aleksa-krolls commented Dec 18, 2024

Describe the bug and expected behavior

Given that there is more test data, WF1 is currently failing in Aissatou's recent tests because of issues newly discovered.

To Reproduce

  1. Run wf1 with cursor { "lastRunDateTime": "2024-12-17T00:00:00.000Z" } --> only 50 patients are returned. No paging has been implemented --> please correct this in the job 2-get-teis-and-locations.js.
  2. See run with cursor { "lastRunDateTime": "2024-12-17T00:00:00.000Z" } where Create Patients stepfails with error RangeError: Invalid time value

expression.js

state.json

  • DHIS2 - see LP: MSF DHIS2 UAT - June 2024
  • OpenMRS - see LP: MSF OpenMRS Demo

To test/resolve

WF1 should successfully sync a list of qualifying DHIS2 patients to OpenMRS.

Toggl

MSF 2024

@aleksa-krolls aleksa-krolls added the bug Something isn't working label Dec 18, 2024
@mtuchi
Copy link
Collaborator

mtuchi commented Dec 19, 2024

Implementation Notes
I have worked on this issue on app and sync the changes back to GitHub, See e3920ce. However we are encountering a new error when creating a patient in OpenMRS. See failed run here. From quick debug it seems to be related to attributes mapping.

Here is the quick summary of the changes

  • Fixed the paging issue by adding skipPaging: true param. See docs here
  • Added updateAfter: $.cursor to make sure we are fetching the latest teis. See docs here
  • I have fixed the Invalid date range issue by returning undefined if the age value is undefined when we are calculating birthdate

cc @aleksa-krolls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants