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

Cancelled rows stay as zombies in the encounter* table #95

Closed
Tracked by #1538
vinayvenu opened this issue Apr 8, 2024 · 4 comments
Closed
Tracked by #1538

Cancelled rows stay as zombies in the encounter* table #95

vinayvenu opened this issue Apr 8, 2024 · 4 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@vinayvenu
Copy link
Member

vinayvenu commented Apr 8, 2024

When an encounter or program_encounter is cancelled, then the corresponding row in the etl's encounter* table is left as a zombie and never updated.

The cancel_date_time is mentioned in the encounter* tables, but anything with a cancel_date_time is never updated. For those querying the table, it feels as if there is a planned encounter that never got done, but it is actually cancelled, but the row was never updated in the table.

A side impact of this behaviour is that if a row was cancelled before the first run of ETL, then it will show up only on the _cancel table and not on the encounter table. This makes behaviour inconsistent.

Fix

  • All rows are expected to be in the encounter* table. Update the cancel_date_time in encounter* table
@github-project-automation github-project-automation bot moved this to New Issues in Avni Product Apr 8, 2024
@vinayvenu vinayvenu added bug Something isn't working user reported labels Apr 8, 2024
@mahalakshme mahalakshme moved this from New Issues to Ready in Avni Product Apr 10, 2024
@mahalakshme mahalakshme removed bug Something isn't working user reported labels Apr 10, 2024
@vinayvenu vinayvenu added the good first issue Good for newcomers label Apr 12, 2024
@BEULAHEVANJALIN BEULAHEVANJALIN self-assigned this Apr 12, 2024
BEULAHEVANJALIN added a commit that referenced this issue Apr 12, 2024
vinayvenu added a commit that referenced this issue Apr 12, 2024
#95 | cancelDateTime updated in ETL tables
@vinayvenu vinayvenu moved this from Ready to QA Ready in Avni Product Apr 12, 2024
@vinayvenu
Copy link
Member Author

There is a corresponding migration that has not been done as part of this card.

@vinayvenu vinayvenu moved this from QA Ready to In QA in Avni Product May 3, 2024
@vinayvenu vinayvenu moved this from In QA to Done in Avni Product May 3, 2024
@mahalakshme
Copy link
Contributor

@vinayvenu we could have deleted the row in encounter table to keep it consistent instead of updating the cancel_date_time? Was there a reason we didn't do it that way?

@vinayvenu
Copy link
Member Author

@mahalakshme some reports are expecting cancel datetime in the encounter table. We will be breaking the contract by removing the rows

@mahalakshme
Copy link
Contributor

@vinayvenu oh okay got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Archived in project
Development

No branches or pull requests

3 participants