Closed anvmn closed 1 month ago
@anvmn @adamhstewart I'd have a few questions here.
@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).
@adamhstewart
Looked through current implementation. Criteria to determine if pregnancy is active on date X:
Is this what we need?
@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.
Deployed to live
Tasks: