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

wf2 stops running if no patients found #79

Open
aleksa-krolls opened this issue Dec 18, 2024 · 1 comment
Open

wf2 stops running if no patients found #79

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

Comments

@aleksa-krolls
Copy link
Member

Describe the bug and expected behavior

WF2 is supposed to sync modified patients OMRS encounters to DHIS2. It looks like it's only syncing encounters, if any patients have also been modified. We should assume that sometimes only encounters (and not patients) are modified in OMRS.

Specific request

If no updated patients are detected in OMRS, we should still check if encounters have been modified. Therefore I think we need to update the path conditions of the workflow as follows - but I need your help considering where the mapping step should belong.
Image

expression.js

state.json

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

To test/resolve

Run wf2 with cursor { "lastRunDateTime": "2024-12-18T08:00:00.000Z" } to make sure the encounters are synced over.

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

These changes were implemented directly from the msf-lime-next-staging project on app and synced back to GitHub on next-staging branch 3c74f17

  • Change the order of has-patients edge condition from Get Patients step to Mappings step
  • Add another edge condition for has-no-patients that will connect Mappings to Get Encounters
  • Update Get Encounters step to handle cases where we don't have encounters for a given cursor
  • Add has-encounters edge condition after Get Encounters step

See latest run for the cursor { "lastRunDateTime": "2024-12-18T08:00:00.000Z" }

@aleksa-krolls you can proceed testing the changes for this issue on app

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