avniproject / Adolescent-Sewa-Rural

0 stars 0 forks source link

[Adolescent Sewa Rural]: Data Fix/ Migrations Scripts to move on Production #110

Closed nupoorkhandelwal closed 4 days ago

nupoorkhandelwal commented 1 week ago

Note Please ensure that all users have synchronized their app before running the migration script.

vedfordev commented 1 week ago

@nupoorkhandelwal As discussed card 3 shows 0 count please check it.

Dinesh2019 commented 1 week ago

card 1: tested SQL Query

select * from individual i left join program_encounter pe on i.id = pe.individual_id where pe.encounter_type_id = 3171 and pe.earliest_visit_date_time BETWEEN '2023-04-01' AND '2024-03-31' and pe.encounter_date_time is null and pe.cancel_date_time is null;

SQL: school dropout

select * from individual i left join program_enrolment pe2 ON i.id = pe2.individual_id left join program_encounter pe on i.id = pe.individual_id where pe.encounter_type_id = 1342 and pe.encounter_date_time is null and pe.cancel_date_time is null and i.is_voided = false

SQL : exited adsolcent

select * from individual i left join program_enrolment pe on i.id = pe.individual_id left join program_encounter pe2 on i.id = pe2.individual_id where pe.program_exit_date_time is not null and pe2.encounter_date_time is null and pe2.cancel_date_time is null;

nupoorkhandelwal commented 5 days ago

I checked and there are no records where individuals have encounters who were in 12 standard as per last year baseline or as per baseline before that year.

So, no records are updated as part of Card 3.