avniproject / calcutta-kids

0 stars 0 forks source link

Answers exists for concepts whose type is not 'Coded' #50

Open mahalakshme opened 1 year ago

mahalakshme commented 1 year ago

Current status:

The below query returns the form elements which have concepts with answers, but their data type is not Coded in "calcutta kids" organisation. One of the form elements the query returns 'Current medications' is used in "Calcutta Kids Registration Form". This was breaking the loading the form, which was fixed by making a fix in avni-server.

select * from form_element where concept_id in(select concept_id from concept_answer where concept_id in (select id from concept where organisation_id=1 and data_type != 'Coded')) and organisation_id in (1, 19);

Acceptance criteria: