Skip to content

Commit

Permalink
Validations from UAT feedback (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckote authored Sep 5, 2023
1 parent 23b5514 commit 44c8683
Show file tree
Hide file tree
Showing 16 changed files with 188 additions and 67 deletions.
6 changes: 4 additions & 2 deletions configuration/ampathforms/ART_Fast_Track.json
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,8 @@
"id": "doseOtherFacilities",
"questionOptions": {
"concept": "1443AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand Down Expand Up @@ -711,7 +712,8 @@
"id": "durationOtherFacilities",
"questionOptions": {
"concept": "159368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand Down
20 changes: 13 additions & 7 deletions configuration/ampathforms/CWC_Follow_Up.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@
"id": "motherVL",
"questionOptions": {
"concept": "856AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"hide": {
"hideWhenExpression": "isEmpty(primaryCaregiver) || primaryCaregiver != '970AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
Expand All @@ -188,7 +189,7 @@
"rendering": "number",
"concept": "1073AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"max": "",
"min": "",
"min": "0",
"showDate": "false",
"conceptMappings": [
{
Expand All @@ -213,7 +214,8 @@
"id": "weight",
"questionOptions": {
"concept": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand All @@ -223,7 +225,8 @@
"required": "true",
"questionOptions": {
"concept": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand All @@ -232,7 +235,8 @@
"id": "zscore",
"questionOptions": {
"concept": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"calculate": {
"calculateExpression": "calcWeightForHeightZscore(weightForHeightRef, height, weight)"
Expand Down Expand Up @@ -960,7 +964,8 @@
"id": "age",
"questionOptions": {
"concept": "163541AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand All @@ -969,7 +974,8 @@
"id": "dosage",
"questionOptions": {
"concept": "1443AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand Down
1 change: 1 addition & 0 deletions configuration/ampathforms/Cervical_Cancer_Assessment.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"label": "Name of Reviewing Officer",
"type": "obs",
"id": "nameOfficer",
"required": "true",
"questionOptions": {
"concept": "844bf107-32e6-4d5d-8d40-de8978f79cb3",
"rendering": "textarea"
Expand Down
24 changes: 16 additions & 8 deletions configuration/ampathforms/Delivery.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"id": "admNumber",
"questionOptions": {
"concept": "162054AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand All @@ -66,7 +67,8 @@
"id": "noOfAncVisits",
"questionOptions": {
"concept": "1590AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
}
]
Expand Down Expand Up @@ -211,7 +213,8 @@
"id": "gestation",
"questionOptions": {
"concept": "1789AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand All @@ -220,7 +223,8 @@
"id": "durationOfLabour",
"questionOptions": {
"concept": "159616AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand Down Expand Up @@ -572,7 +576,8 @@
"id": "birthWeight",
"questionOptions": {
"concept": "5916AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand Down Expand Up @@ -717,7 +722,8 @@
"id": "babyApgarScore1Min",
"questionOptions": {
"concept": "159603AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"hide": {
"hideWhenExpression": "isEmpty(babyCondition) || babyCondition !== '151849AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
Expand All @@ -729,7 +735,8 @@
"id": "babyAScore5Min",
"questionOptions": {
"concept": "159604AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"hide": {
"hideWhenExpression": "isEmpty(babyCondition) || babyCondition !== '151849AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
Expand All @@ -741,7 +748,8 @@
"id": "babyApgarScore10Min",
"questionOptions": {
"concept": "159605AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"hide": {
"hideWhenExpression": "isEmpty(babyCondition) || babyCondition !== '151849AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
Expand Down
6 changes: 4 additions & 2 deletions configuration/ampathforms/Family_History.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"id": "age",
"questionOptions": {
"concept": "160617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand Down Expand Up @@ -188,7 +189,8 @@
"id": "cccNumber",
"questionOptions": {
"concept": "162053AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"hide": {
"hideWhenExpression": "isEmpty(careStatus) && careStatus !== '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
Expand Down
28 changes: 17 additions & 11 deletions configuration/ampathforms/HIV_Enrollment.json
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,8 @@
"id": "cd4Count",
"questionOptions": {
"concept": "5497AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"hide": {
"hideWhenExpression": "patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || patientType === '164144AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
Expand Down Expand Up @@ -1028,7 +1029,8 @@
"id": "vl",
"questionOptions": {
"concept": "162086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"hide": {
"hideWhenExpression": "patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || lDlCopiesml !== '856AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || patientType === '164144AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
Expand Down Expand Up @@ -1241,10 +1243,11 @@
"label": "Weight (Kg)",
"type": "obs",
"id": "weight",
"required": "true",
"questionOptions": {
"concept": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number",
"required": "true"
"min": "0"
},
"hide": {
"hideWhenExpression": "patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || patientType === '164144AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
Expand All @@ -1254,10 +1257,11 @@
"label": "Height(cm)",
"type": "obs",
"id": "height",
"required": "true",
"questionOptions": {
"concept": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number",
"required": "true"
"min": "0"
},
"hide": {
"hideWhenExpression": "patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || patientType === '164144AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
Expand All @@ -1284,7 +1288,8 @@
"id": "muac",
"questionOptions": {
"concept": "1343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"hide": {
"hideWhenExpression": "pregnant !== '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || patientType === '164144AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'"
Expand All @@ -1305,17 +1310,17 @@
"rendering": "select",
"answers": [
{
"concept": "yes",
"concept": "true",
"label": "Yes"
},
{
"concept": "no",
"concept": "false",
"label": "No"
}
]
},
"hide": {
"hideWhenExpression": "patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || age >= 18"
"hideWhenExpression": "patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || age > 17"
}
},
{
Expand All @@ -1337,7 +1342,7 @@
]
},
"hide": {
"hideWhenExpression": "patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || age >= 18"
"hideWhenExpression": "patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || age > 17"
}
},
{
Expand Down Expand Up @@ -1378,7 +1383,7 @@
],
"id": "guardianSuppORT",
"hide": {
"hideWhenExpression": "patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || age >= 18"
"hideWhenExpression": "patientType === '4bd29eed-e486-426d-a2b6-7e5bb75319f6' || patientType === '159833AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || age > 17"
}
}
]
Expand Down Expand Up @@ -1449,7 +1454,8 @@
"id": "tsTelephone",
"questionOptions": {
"concept": "160642AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
}
},
{
Expand Down
9 changes: 6 additions & 3 deletions configuration/ampathforms/HIV_Green_Card.json
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,8 @@
"id": "complaint-duration",
"questionOptions": {
"concept": "159368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"validators": [],
"hide": {
Expand Down Expand Up @@ -2761,7 +2762,8 @@
"id": "parItYtErm",
"questionOptions": {
"concept": "160080AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"hide": {
"hideWhenExpression": "pregnancyOption !=='1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || mEnoPauSe !=='1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || sex !=='F' || age < 15"
Expand All @@ -2773,7 +2775,8 @@
"id": "pariTyabOrtioN",
"questionOptions": {
"concept": "1823AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "number"
"rendering": "number",
"min": "0"
},
"hide": {
"hideWhenExpression": "pregnancyOption !=='1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || mEnoPauSe !=='1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || sex !=='F' || age < 15"
Expand Down
33 changes: 32 additions & 1 deletion configuration/ampathforms/HIV_Self_Test.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,37 @@
"concept": "89828287-b96f-449c-b3ae-d518d55703e1",
"label": "FSW"
},
{
"concept": "105AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"label": "PWID"
},
{
"concept": "bd370cad-06fe-4950-a36f-ed991b280ce6",
"label": "Transgender"
},
{
"concept": "162277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"label": "People in Prison and other closed settings"
}
]
},
"validators": [],
"hide": {
"hideWhenExpression": "populationType !== 'bf850dd4-309b-4cbd-9470-9d8110ea5550' || sex !== 'F'"
}
},
{
"label": "Key Population type :",
"type": "obs",
"id": "keyPopType",
"questionOptions": {
"concept": "160581AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"rendering": "radio",
"answers": [
{
"concept": "89828287-b96f-449c-b3ae-d518d55703e1",
"label": "MSW"
},
{
"concept": "160578AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"label": "MSM"
Expand All @@ -105,7 +136,7 @@
},
"validators": [],
"hide": {
"hideWhenExpression": "populationType !== 'bf850dd4-309b-4cbd-9470-9d8110ea5550'"
"hideWhenExpression": "populationType !== 'bf850dd4-309b-4cbd-9470-9d8110ea5550' || sex !== 'M'"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion configuration/ampathforms/HTS_Client_Referral.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
},
{
"type": "js_expression",
"failsWhenExpression": "(new moment(encDate)).isAfter((new moment(myValue)), 'day')",
"failsWhenExpression": "(new moment(encDate)).isBefore((new moment(myValue)), 'day')",
"message": "Date to be enrolled can either be today or future date."
}
],
Expand Down
Loading

0 comments on commit 44c8683

Please sign in to comment.