avniproject / JSSCP

0 stars 0 forks source link

[Report] Incomplete data/numbers mismatch #302

Open sachsk opened 1 year ago

sachsk commented 1 year ago

FD ticket: https://avni.freshdesk.com/a/tickets/2667

Our current logic only calculates the individual who has scheduled or completed encounters in the particular timeframe (filter). But that eliminates individual which don't have the encounter in the current month so we have to consider those in the "Not calculated" indicator. We need to check all reports and fix.

sachsk commented 1 year ago

as per data in db our report showing correct values with data as ( select individual_id, single_select_coded(observations->>'1060c24d-e75a-43b0-9834-142b5961fb32'), row_number() over (partition by individual_id order by encounter_date_time desc ) row_no from program_encounter enc where encounter_date_time notnull and encounter_type_id=728 and enc.earliest_visit_date_time between '04/01/2023'::date and '04/30/2023'::date ) select * from data where row_no = 1

sachsk commented 1 year ago

need to check with pratishta once, tried to call her but phone is not reachable.

nupoorkhandelwal commented 1 year ago

Moved this card back as the reports are mid way, some are in new ETL folder and some in the older view, not sure how to go on making changes

arjunk commented 2 months ago

@nupoorkhandelwal what would be the next steps on this?