From 89bfadab925fc26168fdb371d3d07121e00e5484 Mon Sep 17 00:00:00 2001 From: kajambiya Date: Thu, 20 Jul 2023 08:05:51 -0500 Subject: [PATCH] fix lab order sub form in covid case assessment form --- .../covid_case_assessment_v1.0.json | 69 ++++++++++++++- .../ampathforms/covid_lab_order_v1.0.json | 83 ++----------------- 2 files changed, 74 insertions(+), 78 deletions(-) diff --git a/distro/configuration/ampathforms/covid_case_assessment_v1.0.json b/distro/configuration/ampathforms/covid_case_assessment_v1.0.json index a328fb9bf..fb504b3c5 100644 --- a/distro/configuration/ampathforms/covid_case_assessment_v1.0.json +++ b/distro/configuration/ampathforms/covid_case_assessment_v1.0.json @@ -1970,6 +1970,65 @@ ] } ] + }, + { + "label": "Lab Order Details", + "isExpanded": "true", + "questions": [ + { + "label": "Add Covid Lab Order?", + "type": "obs", + "questionOptions": { + "rendering": "toggle", + "concept": "2dbf01ab-77f6-4b35-aa2c-46dfc14b0af0", + "toggleOptions": { + "labelTrue": "Yes", + "labelFalse": "No" + }, + "conceptMappings": [ + { + "type": "OCT", + "value": "LabOrdered" + } + ], + "answers": [ + { + "concept": "cf82933b-3f3f-45e7-a5ab-5d31aaee3da3", + "label": "Yes", + "conceptMappings": [ + { + "type": "CIEL", + "value": "1065" + }, + { + "type": "AMPATH", + "value": "1065" + }, + { + "type": "PIH", + "value": "1065" + }, + { + "type": "SNOMED CT", + "value": "CT: 373066001" + } + ] + }, + { + "concept": "488b58ff-64f5-4f8a-8979-fa79940b1594", + "label": "No", + "conceptMappings": [] + } + ] + }, + "id": "labOrderToggle", + "behaviours": [ + { + "intent": "*", + "required": "false" + } + ] + }] } ] }, @@ -1992,7 +2051,15 @@ "readonly": "true" } ] - } + }, + "behaviours": [ + { + "intent": "*", + "hide": { + "hideWhenExpression": "labOrderToggle == '488b58ff-64f5-4f8a-8979-fa79940b1594'" + } + } + ] } ], "availableIntents": [ diff --git a/distro/configuration/ampathforms/covid_lab_order_v1.0.json b/distro/configuration/ampathforms/covid_lab_order_v1.0.json index b644db8fb..b404b95dd 100644 --- a/distro/configuration/ampathforms/covid_lab_order_v1.0.json +++ b/distro/configuration/ampathforms/covid_lab_order_v1.0.json @@ -11,77 +11,6 @@ "label": "Lab Order Details", "isExpanded": "true", "questions": [ - { - "label": "Order Labs", - "type": "obs", - "questionOptions": { - "rendering": "toggle", - "concept": "2dbf01ab-77f6-4b35-aa2c-46dfc14b0af0", - "toggleOptions": { - "labelTrue": "Yes", - "labelFalse": "No" - }, - "conceptMappings": [ - { - "type": "OCT", - "value": "LabOrdered" - } - ], - "answers": [ - { - "concept": "cf82933b-3f3f-45e7-a5ab-5d31aaee3da3", - "label": "Yes", - "conceptMappings": [ - { - "type": "CIEL", - "value": "1065" - }, - { - "type": "AMPATH", - "value": "1065" - }, - { - "type": "PIH", - "value": "1065" - }, - { - "type": "SNOMED CT", - "value": "CT: 373066001" - } - ] - }, - { - "concept": "488b58ff-64f5-4f8a-8979-fa79940b1594", - "label": "No", - "conceptMappings": [] - } - ] - }, - "id": "orderLabs", - "behaviours": [ - { - "intent": "*", - "required": "false", - "hide": { - "hideWhenExpression": "true" - } - }, - { - "intent": "COVID_LAB_ORDER_EMBED", - "required": "false", - "hide": { - "hideWhenExpression": "false" - } - }, - { - "intent": "COVID_LAB_ORDER_RESULT_EMBED", - "required": "false", - "hide": { - "hideWhenExpression": "true" - } - } - ] - }, { "label": "Order date", "type": "obs", @@ -116,7 +45,7 @@ "intent": "COVID_LAB_ORDER_EMBED", "required": "false", "hide": { - "hideWhenExpression": "orderLabs == '488b58ff-64f5-4f8a-8979-fa79940b1594'" + "hideWhenExpression": "false" } } ] @@ -211,7 +140,7 @@ "intent": "COVID_LAB_ORDER_EMBED", "required": "false", "hide": { - "hideWhenExpression": "orderLabs == '488b58ff-64f5-4f8a-8979-fa79940b1594'" + "hideWhenExpression": "false" } } ] @@ -264,7 +193,7 @@ "intent": "COVID_LAB_ORDER_EMBED", "required": "false", "hide": { - "hideWhenExpression": "orderLabs == '488b58ff-64f5-4f8a-8979-fa79940b1594'" + "hideWhenExpression": "false" } } ] @@ -391,7 +320,7 @@ "intent": "COVID_LAB_ORDER_EMBED", "required": "false", "hide": { - "hideWhenExpression": "orderLabs == '488b58ff-64f5-4f8a-8979-fa79940b1594'" + "hideWhenExpression": "false" } } ] @@ -436,7 +365,7 @@ "intent": "COVID_LAB_ORDER_EMBED", "required": "false", "hide": { - "hideWhenExpression": "orderLabs == '488b58ff-64f5-4f8a-8979-fa79940b1594'" + "hideWhenExpression": "false" } } ] @@ -512,7 +441,7 @@ { "intent": "COVID_LAB_ORDER_EMBED", "hide": { - "hideWhenExpression": "orderLabs == '488b58ff-64f5-4f8a-8979-fa79940b1594'" + "hideWhenExpression": "false" } } ]