TIP-Global-Health / eheza-app

Apache License 2.0
3 stars 1 forks source link

Eheza Reports - Prenatal #1194

Closed anvmn closed 1 month ago

anvmn commented 3 months ago

Tasks:

Selection_595

AronNovak commented 3 months ago

@anvmn @adamhstewart I'd have a few questions here.

anvmn commented 3 months ago

@AronNovak Not sure how urgent this is for @adamhstewart.

The idea is to build on top of existing PRs (not merged yet) that have already needed infrastructure in place. General idea is that every person got a field where json encoded reports data is stored. There is a mechanism that triggers data recalculation on backend, using AQ. So when app needs to present a report, backend is queried with needed scope, data for patients in scope is aggregated and passed to app, and the app applies logic to generate report from the data it got.

If you want to add new type of report, it will require extending reports data for patient. There is also a scrip that regenerated the data for all patients (part of hedley_reports module).

anvmn commented 2 months ago

@adamhstewart

Looked through current implementation. Criteria to determine if pregnancy is active on date X:

Is this what we need?

adamhstewart commented 2 months ago

@anvmn If this is the implementation in the current script, it is incorrect. It should be that Pregnancy is considered active from the date it is registered in Eheza until either 30 days after the EDD OR the pregnancy was marked as concluded.

anvmn commented 1 month ago

Deployed to live