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

Need enrolment ID in Program Exit and Program Encounters #86

Closed
nupoorkhandelwal opened this issue Jan 31, 2024 · 1 comment
Closed
Labels
enhancement New feature or request user reported

Comments

@nupoorkhandelwal
Copy link

Within reports, implementors come across a lot of scenarios where an individual is enrolled to same program multiple times. And while writing a report around program encounter & exit details it is not clear how to map it to the right/corresponding program enrolment.

One work around for example we used recently is -

Instead of -

LEFT JOIN individual_mother_exit on individual_mother_exit.individual_id = enl.individual_id
we replaced it with and extra condition

LEFT JOIN individual_mother_exit on individual_mother_exit.individual_id = enl.individual_id and enl.enrolment_date_time = individual_mother_exit.enrolment_date_time

This is quite difficult for (external/internal) implementors to understand, hence we need a clear enrolment ID in the respective program encounter & exit tables.

@vinayvenu
Copy link
Member

@nupoorkhandelwal it looks like what you need already exists in the tables.

In program_exit tables, the id column is the enrolment id
In program_encounter tables, program_enrolment_id is already present

Closing this card. Reopen if you feel you see any issues.

@github-project-automation github-project-automation bot moved this from New Issues to Done in Avni Product Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request user reported
Projects
Status: Done
Development

No branches or pull requests

2 participants