These changes can be done only when all of the phulwaris are registerred with right name.
[x] Remove "Enrol to"/Phulwari option from child enrolment. Instead show the group phulwari concept.
Add the new phulwari group concept and answer to the already existing enrolments
~Note - There are phulwaris with same name as well ,so will need to add a check for lowest address level as well~
~Script to add phulwari group obs to existing enrolments--
_with audits as(
update program_enrolment
set observations = observations ||
jsonb_build_object('3fd6a9b4-6698-4206-86e6-1c74d190dda5',
concept_uuid(single_select_coded((observations ->> '6129d59e-17ee-4e0d-a48d-df00b0df326b')::text)))
where single_select_coded((observations ->> '6129d59e-17ee-4e0d-a48d-df00b0df326b')::text) notnull
returning audit_id
)
update audit
set last_modified_date_time = current_timestamp
where id in (select auditid from audits);~
[x] Add one more script to add children as member to respective phulwari group.
[x] Remove the "Day of the month to visit this Phulwari" from child enrolment and update the visit scheduling for growth monitoring to pick this from PHULWARI group subject of that child.
All form changes and visit scheduling changes are done on staging.
We need to clear these things before migrating to prod.
There are some duplicate phulwari in the same location, they need to void those before migrating to prod.
There are some enrolments done where phulwari is assigned which does not belong to that location. How do we handle those cases? Either users need to create these phulwaries in that location or we need some way to handle these cases.
All the details are shared with @garimadosar5
Moving the card on hold till we are clear on above two points.
These changes can be done only when all of the phulwaris are registerred with right name.
[x] Remove "Enrol to"/Phulwari option from child enrolment. Instead show the group phulwari concept. Add the new phulwari group concept and answer to the already existing enrolments ~Note - There are phulwaris with same name as well ,so will need to add a check for lowest address level as well~ ~Script to add phulwari group obs to existing enrolments-- _with audits as( update program_enrolment set observations = observations || jsonb_build_object('3fd6a9b4-6698-4206-86e6-1c74d190dda5', concept_uuid(single_select_coded((observations ->> '6129d59e-17ee-4e0d-a48d-df00b0df326b')::text))) where single_select_coded((observations ->> '6129d59e-17ee-4e0d-a48d-df00b0df326b')::text) notnull returning audit_id ) update audit set last_modified_date_time = current_timestamp where id in (select auditid from audits);~
[x] Add one more script to add children as member to respective phulwari group.
[x] Remove the "Day of the month to visit this Phulwari" from child enrolment and update the visit scheduling for growth monitoring to pick this from PHULWARI group subject of that child.