-
Notifications
You must be signed in to change notification settings - Fork 26
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
Issues in CK migration #675
Comments
Discussion Notes related to Issue 1:
|
The root cause of the issues 1 and 2 mentioned in the description of this card for instances where the fields are not Read-only are as followsDuring CK migration, we have not migrated the non_applicable_form_element table entries to point their form_element_id column to new values after migration. For an Org extending Openchs Org (Org1), "non_applicable_form_element" table is used to selectively void a Form_element of a form inherited from Organisation_id 1 from not being applicable for the Child Organisation. This non_applicable_form_element(NAFE) is made use of in both Avni-server and ETL-server to weed-out form-elements which have this mapping present, so that they are either shown as voided(in Avni-server forms API response) Or ignored during Table generation (in ETL-server). Executing the below command, on Prod and Pre-release environment return the Outputs Listed below, which are useful in demonstrating the root-cause.set role calcutta_kids;
select c.id,
c.name,
fe.id,
f.name,
fe.name,
feg.name,
(nafe is null or nafe.is_voided = true) as is_shown
from form_element fe
join form_element_group feg on fe.form_element_group_id = feg.id
join form f on f.id = feg.form_id
join concept c on fe.concept_id = c.id
left join non_applicable_form_element nafe on fe.id = nafe.form_element_id
where c.name = 'Cried soon after birth'
and f.name = 'Birth form'
and fe.is_voided = false
and feg.is_voided = false
order by 4, 2; SQL Commands OutputPrerelease
Prod
|
… new org form_element_ids
Post the fix ETL ran successfully for Calcutta_kids, after having dropped the ETL schema for that org in Pre-release env..
|
… form_element_id in non_applicable_form_element
The only concept which is duplicated across multiple form_elements in a single form is the Placeholder Concept 'Placeholder for counselling form element'. set role calcutta_kids;
select c.uuid = 'b4e5a662-97bf-4846-b9b7-9baeab4d89c4' is_placeholder_concept, f.name as form, c.name as concept , c.id concept_id ,count(*) repetitions, min(fe.id)
from form f
join form_element_group feg on f.id = feg.form_id
join form_element fe on feg.id = fe.form_element_group_id
join concept c on fe.concept_id = c.id
left join non_applicable_form_element nafe on fe.id = nafe.form_element_id
where f.is_voided = false
and feg.is_voided = false
and fe.is_voided = false
and (nafe is null or nafe.is_voided = true)
-- and c.name != 'Placeholder for counselling form element'
group by f.name,c.id
having count(*) > 1; Output:
|
@AchalaBelokar , as part of QA, test that |
Answers for these questions are as below:
|
As part of migration run for this in prerelease, the below issues have been raised:
Issue 1
Issue 2
As part of this card, the above issues need to be fixed.
The text was updated successfully, but these errors were encountered: