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

Restore data from downloaded reports - 2nd attempt #676

Closed
mahalakshme opened this issue Dec 29, 2023 · 6 comments
Closed

Restore data from downloaded reports - 2nd attempt #676

mahalakshme opened this issue Dec 29, 2023 · 6 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Dec 29, 2023

Related ticket: https://avni.freshdesk.com/a/tickets/3323

From this sheet we can restore data for the org in focus for around 180/650 active children here who miss phone numbers currently. Verified the same here by comparing myCHI Id for the presence of phone numbers.

Restore these concepts from the sheet to individual table by comparing myCHI Id concept - household no, phone no, floor

@mahalakshme mahalakshme converted this from a draft issue Dec 29, 2023
@mahalakshme mahalakshme moved this from In Analysis to Ready in Avni Product Dec 29, 2023
@mahalakshme
Copy link
Contributor Author

@petmongrels would like to know your thoughts on this card if you have any.

@mahalakshme mahalakshme moved this from Ready to Finalized for the upcoming release in Avni Product Dec 29, 2023
@petmongrels
Copy link
Contributor

we can give them a report which they can use to match MyChi id with Phone number (from older data).
merging some information will allow only recovery of only some obs not all obs.

updating data via SQL can take time and cause errors......better to avoid

@mahalakshme mahalakshme moved this from Finalized for the upcoming release to In Analysis in Avni Product Jan 2, 2024
@petmongrels petmongrels moved this from In Analysis to In Progress in Avni Product Jan 3, 2024
@petmongrels petmongrels self-assigned this Jan 3, 2024
@petmongrels
Copy link
Contributor

For household, contact number and door number fix

  1. In both the files SQL is generated from the data. Pls check the SQL.
  2. the generated SQL is present fix2.sql as well which would be run - https://github.com/avniproject/data-fixes/blob/de823e4a90091292f05d3db615579d14d50ae891/ck-ihmp-data-loss/ck/fix2.sql

@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Jan 3, 2024
@mahalakshme mahalakshme moved this from Code Review Ready to In Code Review in Avni Product Jan 4, 2024
@petmongrels petmongrels moved this from In Code Review to In Progress in Avni Product Jan 4, 2024
@mahalakshme
Copy link
Contributor Author

@petmongrels 2 things:

  1. From this sheet, I think we can also restore LMP and EDD to Mother/CK Mother enrolment and date of birth to individual registeration. Found DOB missing for 81 individuals in our DB for whom DOB is in the sheet and LMP missing for around 60 rows for whose entries present in the sheet from the program_enrolment table.
  2. Since the SQL is in github, and the data has phone numbers and houshold nos, may be we need to move it to a private page

@petmongrels
Copy link
Contributor

  1. for LMP and EDD 0 rows are getting updated so not pushed the sql for it.

@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Jan 4, 2024
@mahalakshme mahalakshme moved this from Code Review Ready to In Code Review in Avni Product Jan 4, 2024
@petmongrels petmongrels moved this from In Code Review to Code Review Ready in Avni Product Jan 4, 2024
@mahalakshme mahalakshme moved this from Code Review Ready to In Code Review in Avni Product Jan 4, 2024
@mahalakshme mahalakshme moved this from In Code Review to QA Ready in Avni Product Jan 4, 2024
@petmongrels petmongrels moved this from QA Ready to Done in Avni Product Jan 5, 2024
@mahalakshme
Copy link
Contributor Author

@petmongrels found that on running the below query

select * from individual where observations->>'1d6ac236-2ab4-4eaa-aa3d-e18924d93ba3' in
                               ('G3663','G3483','B3428','B3206','G3754','B3500','G3578','G3442','G3532','G3417','B3186','B3719','B3529','B3408','G3536','B3164','G3496','B3704','B3344','G3274','B3763','G3584','G3343','B3444','B3119','G3207','G3478','G3169','G3204','B3414','B3413','B3633','G3506','B3729','B3188','G3684','B2979','B3269','G3520','B3637','B3376','G3246','B3253','B3448','B3429','G3593','G3184','G3411','B3473','B3611','G3456','G3710','B3167','B3783','B2993','B3605','G3604','G3435','B3551','G3181','G2999','B3689','B3405','G3681','B3487','G3186','B3615','G3608','G3330','G3744','B3172','B3331','B3669','B3205','B2991','G3668','B3460','B3185','B3335','G2492','G3625','B3347','G3756','B3772','G3338','B2997','G3469','B3505','G3470','B3279','G3135','G3524','G3786','B3746','G3777','G3441','B3577','G3547','G3333','B3337','G3180','G3455','G3329','B3732','G3730','B3158','B3159','B3674','B3310','G3217','G3727','B3571','B3126','B3418','B3486','B3558','G3661','G3155','B3527','G3600','B3370','B3094','G3427','G3665','G3717','G3192','B3750','G3635','B3409','B2985','B3751','B3390','G3559','B3202','B3395','G3172','B3697','G3648','B3703','B3315','B3609','B3179','B3548','G3394','B3602','B3718','B3530','B3191','G3454','B3767','G3446','G3501','G3736','B3586','G3765','G3672','G3614','G3058','G3549','G3275','B3465','G3048','G3560','B3535','B3303','G3302','B3589','B3781','B3695','G3434','B3038','B3770','B3432','B3140','G3679','G3228','B3782','G3231','B3365','B3091','G3235','G3259','G3240','G3617','B3552','B3670','B3361','G3241','G3225','B3739','B3728','G3364','B3482','G3610','B3738','B3707','B3569','G3097','G3714','G3598','G3100','G3599','G3096','G3369','B3258','B3046','G3211','G3214','G3254','G3380','B3230','B3423','B3382','G3499','G3696','G3043','G3498','B2986','B3328','B3325','B3735','G3472','B3596','G3342','B3642','G3332','G3170','B3644','G3569','B3468','B3680','B3553','B3197','B3049','B3307','B3367','B3244','G3381','B3613','G3374','G3595','B3542','G3260','B3555','B3398','B3375','B3216','G3286','G3316','B3162','B3056','B3464','B3682','G3301','B3778','B3265','G3406','B3387','G3654','G3652','G3640','B3620','B3588','G3420','G3656','G3503','G3636','B3621','B3378','B3311','B3210','B3474','G3098','G3734','G3693','G3724','B3641','B3660','B3252','G3523','B3453','G3590','G3771','B3561','G3690','B3591','G3458','B3785','B3762','G3671','G3200','B3339','G3612','G3224','G3392','B3634','B3521','B3239','B3692','G3255','B3227','B3234','G3243','G3238','B3256','B3643','B3747','B3237','G3110','G3215','G3093','B3232','B3250','B3313','B3683','B3541','G3264','B3397','B3580','B2983','B3341','G3322','G3673','B3698','G3699','G3592','G3319','B3543','G3715','B3678','G3653','B3493','G3643','G3713','G3512','B3109','B3664','B3784','G3647','B3646','G3645','B3540','G3372','G3686','G3725','B3222','G3546','G3366','G3439','G3658','G3629','G3702','B3570','B3709','B3716','B3720','G3574','G3575','B3321','B3403','B3601','G3326','G3731','G3603')
and observations->>'82fa0dbb-92f9-4ec2-9263-49054e64d909' is null;

there are 16 rows for whom the sheet - https://docs.google.com/spreadsheets/d/1-wQTSRCR0oeBJ4RRGrCgrRm-81fW3MsNR3gmO7XoKb0/edit#gid=1309610746 has phone numbers, but it is not there in the db. So reopening this card.

@mahalakshme mahalakshme reopened this Jan 12, 2024
@github-project-automation github-project-automation bot moved this from Done to Triaged in Avni Product Jan 12, 2024
@mahalakshme mahalakshme moved this from Triaged to QA Failed in Avni Product Jan 12, 2024
@mahalakshme mahalakshme changed the title Restore data from downloaded reports Restore data from downloaded reports - 2nd attempt Jan 12, 2024
@petmongrels petmongrels moved this from QA Failed to In Progress in Avni Product Jan 12, 2024
@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Jan 12, 2024
@petmongrels petmongrels moved this from Code Review Ready to In Progress in Avni Product Jan 16, 2024
@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Jan 16, 2024
@petmongrels petmongrels moved this from Code Review Ready to Done in Avni Product Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants