From e2920d3205bf84e8eab38e7011badaba2b045901 Mon Sep 17 00:00:00 2001 From: Makombe Kennedy Date: Tue, 24 Oct 2023 08:43:53 +0300 Subject: [PATCH] Separate height && weight for BMI and Z-score calculations (#242) --- configuration/ampathforms/Triage.json | 41 +++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/configuration/ampathforms/Triage.json b/configuration/ampathforms/Triage.json index a0c5afbe..03363963 100644 --- a/configuration/ampathforms/Triage.json +++ b/configuration/ampathforms/Triage.json @@ -152,8 +152,26 @@ "rendering": "number", "max": "250", "min": "0" + }, + "hide": { + "hideWhenExpression": "!(age >= 0 && age <=5)" } }, + { + "label": "Weight(kg):", + "type": "obs", + "id": "weightForBMI", + "required": "true", + "questionOptions": { + "concept": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "number", + "max": "250", + "min": "0" + }, + "hide": { + "hideWhenExpression": "age <= 5" + } + }, { "label": "Height(cm):", "type": "obs", @@ -165,7 +183,26 @@ "max": "272", "min": "10" }, - "historicalExpression": "HD.getObject('prevEnc').getValue('5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')" + "historicalExpression": "HD.getObject('prevEnc').getValue('5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')", + "hide": { + "hideWhenExpression": "!(age >= 0 && age <=5)" + } + }, + { + "label": "Height(cm):", + "type": "obs", + "required": "true", + "id": "heightForBMI", + "questionOptions": { + "concept": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "rendering": "number", + "max": "272", + "min": "10" + }, + "historicalExpression": "HD.getObject('prevEnc').getValue('5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')", + "hide": { + "hideWhenExpression": "age <= 5" + } }, { "label": "BMI (Kg/m2)", @@ -177,7 +214,7 @@ "max": "100", "min": "0", "calculate": { - "calculateExpression": "calcBMI(height,weight)" + "calculateExpression": "calcBMI(heightForBMI,weightForBMI)" } }, "hide": {