diff --git a/configuration/ampathforms/Covid19_Assessment.json b/configuration/ampathforms/Covid19_Assessment.json index 1012b1c6..a5411004 100644 --- a/configuration/ampathforms/Covid19_Assessment.json +++ b/configuration/ampathforms/Covid19_Assessment.json @@ -71,10 +71,133 @@ "rendering": "repeating", "concept": "1421AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" }, - "id": "__Dw6nMErGG", + "id": "vaccination_details", "validators": [], - "required": "true", - "questions": [] + "questions": [ + { + "label": "Vaccine", + "type": "obs", + "id": "vaccine", + "questionOptions": { + "concept": "984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "select", + "answers": [ + { + "concept": "166156AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Astrazeneca" + }, + { + "concept": "166355AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Johnson and Johnson" + }, + { + "concept": "166154AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Moderna" + }, + { + "concept": "166155AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Pfizer" + }, + { + "concept": "166157AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Sputnik" + }, + { + "concept": "166379AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Sinopharm" + }, + { + "concept": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Unknown" + }, + { + "concept": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Other(Specify)" + } + + ] + }, + "validators":[ + { + "type": "js_expression", + "failsWhenExpression": "isEmpty(myValue) && !isEmpty(patientVaccinated) && patientVaccinated === '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'", + "message": "Vaccine type should not be empty." + } + ] + }, + { + "label": "Vaccine name", + "type": "obs", + "id": "otherVaccine", + "questionOptions": { + "concept": "161550AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "text" + }, + "validators": [], + "hide": { + "hideWhenExpression": "isEmpty(vaccine) || vaccine !== '5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' " + } + }, + { + "label": "Dose", + "type": "obs", + "id": "dose", + "questionOptions": { + "concept": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "select", + "answers": [ + { + "concept": "1", + "label": "First" + }, + { + "concept": "2", + "label": "Second" + } + + ] + } + }, + { + "label": "Date/Estimated", + "type": "obs", + "id": "vaccinationDate", + "questionOptions": { + "concept": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "date" + }, + "validators": [ + { + "type": "date", + "allowFutureDate": "false" + }, + { + "type": "js_expression", + "failsWhenExpression": "isEmpty(myValue) && !isEmpty(patientVaccinated) && patientVaccinated === '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'", + "message": "Vaccine date is required" + } + ] + }, + { + "label": "Verified", + "type": "obs", + "id": "verified", + "questionOptions": { + "concept": "164464AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "checkbox", + "answers": [ + { + "concept": "164134AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Verified" + } + ] + } + } + + ], + "hide": { + "hideWhenExpression": "isEmpty(patientVaccinated) || patientVaccinated !== '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'" + } }, { "label": "Vaccination Status", @@ -94,8 +217,16 @@ ] }, "id": "completionStatus", - "validators": [], - "required": "true" + "validators": [ + { + "type": "js_expression", + "failsWhenExpression": "isEmpty(myValue) && !isEmpty(patientVaccinated) && patientVaccinated === '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'", + "message": "Please specify final vaccination status." + } + ], + "hide": { + "hideWhenExpression": "isEmpty(patientVaccinated) || patientVaccinated !== '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'" + } }, { "label": "Have you received a booster COVID -19 dose?", @@ -116,19 +247,132 @@ }, "id": "boosterReceived", "validators": [], - "required": "true" + "hide": { + "hideWhenExpression": "isEmpty(patientVaccinated) || patientVaccinated !== '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'" + } }, { - "label": "Booster dose received", + "label": "Booster COVID -19 dose", "type": "obsGroup", "questionOptions": { - "rendering": "group", + "rendering": "repeating", "concept": "1184AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" }, - "id": "__vLKx5LFIn", + "id": "boosterDose", "validators": [], - "required": "true", - "questions": [] + "questions": [ + { + "label": "Vaccine", + "type": "obs", + "id": "booster", + "questionOptions": { + "concept": "984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "select", + "answers": [ + { + "concept": "166156AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Astrazeneca" + }, + { + "concept": "166355AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Johnson and Johnson" + }, + { + "concept": "166154AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Moderna" + }, + { + "concept": "166155AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Pfizer" + }, + { + "concept": "166157AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Sputnik" + }, + { + "concept": "166379AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Sinopharm" + }, + { + "concept": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Unknown" + }, + { + "concept": "5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Other(Specify)" + } + + ] + } + }, + { + "label": "Vaccine name", + "type": "obs", + "id": "otherVaccine", + "questionOptions": { + "concept": "161550AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "text" + }, + "validators": [], + "hide": { + "hideWhenExpression": "isEmpty(booster) || booster !== '5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' " + } + }, + { + "label": "Dose", + "type": "obs", + "id": "dose", + "questionOptions": { + "concept": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "select", + "answers": [ + { + "concept": "1", + "label": "First" + }, + { + "concept": "2", + "label": "Second" + } + + ] + } + }, + { + "label": "Date/Estimated", + "type": "obs", + "id": "vaccinationDate", + "questionOptions": { + "concept": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "date" + }, + "validators": [ + { + "type": "date", + "allowFutureDate": "false" + } + ] + }, + { + "label": "Verified", + "type": "obs", + "id": "verified", + "questionOptions": { + "concept": "164464AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "checkbox", + "answers": [ + { + "concept": "164134AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "label": "Verified" + } + ] + } + } + + ], + "hide": { + "hideWhenExpression": "isEmpty(boosterReceived) || boosterReceived !== '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'" + } } ] }, @@ -179,7 +423,9 @@ }, "id": "testResult", "validators": [], - "required": "true" + "hide": { + "hideWhenExpression": "isEmpty(testStatus) || testStatus !== '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'" + } }, { "label": "Date tested ", @@ -190,7 +436,10 @@ }, "id": "dateTested", "validators": [], - "required": "true" + "hide": { + "hideWhenExpression": "isEmpty(testResult) || testResult !== '703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'" + } + }, { "label": "Presentation of Covid-19", @@ -211,7 +460,10 @@ }, "id": "presentationStatus", "validators": [], - "required": "true" + "hide": { + "hideWhenExpression": "isEmpty(testResult) || testResult !== '703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'" + } + }, { "label": "Hospital admission",