Skip to content

Commit

Permalink
OHRI-1743 Fix COVID Lab view action issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ODORA0 committed Aug 11, 2023
1 parent 9833881 commit 5c9bf48
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@
"readonly": "true"
}
]
}
},
"behaviours": [
{
"intent": "COVID_LAB_CANCELLATION_EMBED",
"hide": {
"hideWhenExpression": "true"
}
}
]
},
{
"label": "Order Cancellation",
Expand Down Expand Up @@ -52,6 +60,15 @@
"hideWhenExpression": "false"
},
"validators": []
},
{
"intent": "COVID_LAB_CANCELLATION_EMBED",
"required": "true",
"unspecified": "true",
"hide": {
"hideWhenExpression": "false"
},
"validators": []
}
]
},
Expand Down Expand Up @@ -150,6 +167,15 @@
"hideWhenExpression": "false"
},
"validators": []
},
{
"intent": "COVID_LAB_CANCELLATION_EMBED",
"required": "true",
"unspecified": "true",
"hide": {
"hideWhenExpression": "false"
},
"validators": []
}
]
},
Expand Down Expand Up @@ -196,6 +222,15 @@
"hideWhenExpression": "false"
},
"value": "165170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
{
"intent": "COVID_LAB_CANCELLATION_EMBED",
"required": "false",
"unspecified": "false",
"hide": {
"hideWhenExpression": "false"
},
"value": "165170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}
]
}
Expand All @@ -208,6 +243,10 @@
{
"intent": "*",
"display": "COVID Lab Order Cancellation"
},
{
"intent": "COVID_LAB_CANCELLATION_EMBED",
"display": "COVID Lab Cancellation Embed"
}
],
"processor": "EncounterFormProcessor",
Expand Down
79 changes: 76 additions & 3 deletions distro/configuration/ampathforms/covid_lab_result_v1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@
"behaviours": [
{
"intent": "*",
"subform_intent": "COVID_LAB_ORDER_RESULT_EMBED",
"subform_intent": "COVID_LAB_ORDER_EMBED",
"readonly": "true"
}
]
}
},
"behaviours": [
{
"intent": "COVID_LAB_RESULT_EMBED",
"hide": {
"hideWhenExpression": "true"
}
}
]
},
{
{
"label": "Lab Result",
"sections": [
{
Expand Down Expand Up @@ -56,6 +64,11 @@
"intent": "*",
"required": "true",
"unspecified": "true"
},
{
"intent": "COVID_LAB_RESULT_EMBED",
"required": "true",
"unspecified": "true"
}
]
},
Expand Down Expand Up @@ -254,6 +267,13 @@
"hide": {
"hideWhenExpression": "wasTheTestPerformed !== '488b58ff-64f5-4f8a-8979-fa79940b1594'"
}
},
{
"intent": "COVID_LAB_RESULT_EMBED",
"required": "true",
"hide": {
"hideWhenExpression": "wasTheTestPerformed !== '488b58ff-64f5-4f8a-8979-fa79940b1594'"
}
}
]
},
Expand All @@ -278,6 +298,13 @@
"hideWhenExpression": "wasTheTestPerformed !== 'cf82933b-3f3f-45e7-a5ab-5d31aaee3da3'"
},
"value": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
{
"intent": "COVID_LAB_RESULT_EMBED",
"hide": {
"hideWhenExpression": "wasTheTestPerformed !== 'cf82933b-3f3f-45e7-a5ab-5d31aaee3da3'"
},
"value": "1267AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}
]
},
Expand Down Expand Up @@ -307,6 +334,23 @@
"failsWhenExpression": "isDateBefore(myValue, '2020-01-01')"
}
]
},
{
"intent": "COVID_LAB_RESULT_EMBED",
"required": "true",
"hide": {
"hideWhenExpression": "wasTheTestPerformed !== 'cf82933b-3f3f-45e7-a5ab-5d31aaee3da3'"
},
"validators": [
{
"type": "date",
"allowFutureDates": "false"
},
{
"type": "js_expression",
"failsWhenExpression": "isDateBefore(myValue, '2020-01-01')"
}
]
}
]
},
Expand All @@ -331,6 +375,13 @@
"hideWhenExpression": "wasTheTestPerformed !== '488b58ff-64f5-4f8a-8979-fa79940b1594'"
},
"value": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
{
"intent": "COVID_LAB_RESULT_EMBED",
"hide": {
"hideWhenExpression": "wasTheTestPerformed !== '488b58ff-64f5-4f8a-8979-fa79940b1594'"
},
"value": "1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}
]
},
Expand Down Expand Up @@ -397,6 +448,13 @@
"hide": {
"hideWhenExpression": "testRequested !== '165852AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || wasTheTestPerformed !== 'cf82933b-3f3f-45e7-a5ab-5d31aaee3da3'"
}
},
{
"intent": "COVID_LAB_RESULT_EMBED",
"required": "true",
"hide": {
"hideWhenExpression": "testRequested !== '165852AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || wasTheTestPerformed !== 'cf82933b-3f3f-45e7-a5ab-5d31aaee3da3'"
}
}
]
},
Expand Down Expand Up @@ -462,6 +520,13 @@
"hide": {
"hideWhenExpression": "testRequested !== '165840AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || wasTheTestPerformed !== 'cf82933b-3f3f-45e7-a5ab-5d31aaee3da3'"
}
},
{
"intent": "COVID_LAB_RESULT_EMBED",
"required": "true",
"hide": {
"hideWhenExpression": "testRequested !== '165840AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' || wasTheTestPerformed !== 'cf82933b-3f3f-45e7-a5ab-5d31aaee3da3'"
}
}
]
},
Expand All @@ -488,6 +553,10 @@
{
"intent": "*",
"required": "false"
},
{
"intent": "COVID_LAB_RESULT_EMBED",
"required": "false"
}
]
}
Expand All @@ -500,6 +569,10 @@
{
"intent": "*",
"display": "Lab Result"
},
{
"intent": "COVID_LAB_RESULT_EMBED",
"display": "COVID Lab Result Embed"
}
],
"processor": "EncounterFormProcessor",
Expand Down
79 changes: 79 additions & 0 deletions distro/configuration/ampathforms/covid_sample_collection_v1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
"hideWhenExpression": "false"
},
"validators": []
},
{
"intent": "COVID_SAMPLE_COLLECTION_EMBED",
"required": "false",
"hide": {
"hideWhenExpression": "true"
},
"validators": []
}
]
},
Expand Down Expand Up @@ -63,6 +71,16 @@
"hideWhenExpression": "false"
},
"validators": []
},
{
"intent": "COVID_SAMPLE_COLLECTION_EMBED",
"required": "false",
"unspecified": "true",
"readonly": "true",
"hide": {
"hideWhenExpression": "true"
},
"validators": []
}
]
}
Expand Down Expand Up @@ -101,6 +119,15 @@
"hideWhenExpression": "false"
},
"validators": []
},
{
"intent": "COVID_SAMPLE_COLLECTION_EMBED",
"required": "true",
"unspecified": "true",
"hide": {
"hideWhenExpression": "false"
},
"validators": []
}
]
},
Expand Down Expand Up @@ -143,6 +170,15 @@
"hideWhenExpression": "false"
},
"validators": []
},
{
"intent": "COVID_SAMPLE_COLLECTION_EMBED",
"required": "true",
"unspecified": "true",
"hide": {
"hideWhenExpression": "false"
},
"validators": []
}
]
},
Expand Down Expand Up @@ -172,6 +208,15 @@
"hideWhenExpression": "!includes('specimenType','5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')"
},
"validators": []
},
{
"intent": "COVID_SAMPLE_COLLECTION_EMBED",
"required": "true",
"unspecified": "true",
"hide": {
"hideWhenExpression": "!includes('specimenType','5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')"
},
"validators": []
}
]
}
Expand Down Expand Up @@ -204,6 +249,15 @@
"hideWhenExpression": "false"
},
"validators": []
},
{
"intent": "COVID_SAMPLE_COLLECTION_EMBED",
"required": "false",
"unspecified": "true",
"hide": {
"hideWhenExpression": "false"
},
"validators": []
}
]
},
Expand Down Expand Up @@ -293,6 +347,15 @@
"hideWhenExpression": "false"
},
"validators": []
},
{
"intent": "COVID_SAMPLE_COLLECTION_EMBED",
"required": "true",
"unspecified": "true",
"hide": {
"hideWhenExpression": "false"
},
"validators": []
}
]
},
Expand All @@ -318,6 +381,13 @@
"hideWhenExpression": "!includes('isSpecimenSentToLab', '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')"
},
"validators": []
},
{
"intent": "COVID_SAMPLE_COLLECTION_EMBED",
"hide": {
"hideWhenExpression": "!includes('isSpecimenSentToLab', '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')"
},
"validators": []
}
]
},
Expand Down Expand Up @@ -349,6 +419,15 @@
"hideWhenExpression": "false"
},
"validators": []
},
{
"intent": "COVID_SAMPLE_COLLECTION_EMBED",
"required": "false",
"unspecified": "false",
"hide": {
"hideWhenExpression": "false"
},
"validators": []
}
]
}
Expand Down

0 comments on commit 5c9bf48

Please sign in to comment.