Skip to content

Commit

Permalink
Add missing vaccination details && fixed validations covid assessment…
Browse files Browse the repository at this point in the history
… form (#152)

Co-authored-by: Makombe <makombe>
  • Loading branch information
makombe authored Aug 1, 2023
1 parent a3a28aa commit fe3e457
Showing 1 changed file with 266 additions and 14 deletions.
280 changes: 266 additions & 14 deletions configuration/ampathforms/Covid19_Assessment.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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?",
Expand All @@ -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'"
}
}
]
},
Expand Down Expand Up @@ -179,7 +423,9 @@
},
"id": "testResult",
"validators": [],
"required": "true"
"hide": {
"hideWhenExpression": "isEmpty(testStatus) || testStatus !== '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
}
},
{
"label": "Date tested ",
Expand All @@ -190,7 +436,10 @@
},
"id": "dateTested",
"validators": [],
"required": "true"
"hide": {
"hideWhenExpression": "isEmpty(testResult) || testResult !== '703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
}

},
{
"label": "Presentation of Covid-19",
Expand All @@ -211,7 +460,10 @@
},
"id": "presentationStatus",
"validators": [],
"required": "true"
"hide": {
"hideWhenExpression": "isEmpty(testResult) || testResult !== '703AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
}

},
{
"label": "Hospital admission",
Expand Down

0 comments on commit fe3e457

Please sign in to comment.