-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix) Resolve Error in JavaScript Expression Validation (#418)
- Loading branch information
1 parent
e8b1c5d
commit ce3dbdb
Showing
5 changed files
with
83 additions
and
13 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
__mocks__/forms/rfe-forms/js-expression-validation-form.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"name": "Js expression validation", | ||
"uuid": "xxxx", | ||
"EncounterType": "xxxx", | ||
"referencedForms": [], | ||
"processor": "EncounterFormProcessor", | ||
"pages": [ | ||
{ | ||
"label": "Page 1", | ||
"sections": [ | ||
{ | ||
"label": "Section 1", | ||
"questions": [ | ||
{ | ||
"label": "Question 1", | ||
"type": "obs", | ||
"required": false, | ||
"id": "question1", | ||
"questionOptions": { | ||
"rendering": "text", | ||
"concept": "166103AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
"conceptMappings": [ | ||
{ | ||
"relationship": "SAME-AS", | ||
"type": "PIH", | ||
"value": "2724" | ||
}, | ||
{ | ||
"relationship": "SAME-AS", | ||
"type": "SNOMED CT", | ||
"value": "397678008" | ||
}, | ||
{ | ||
"relationship": "SAME-AS", | ||
"type": "CIEL", | ||
"value": "166103" | ||
} | ||
], | ||
"showDate": true | ||
}, | ||
"validators": [ | ||
{ | ||
"type": "js_expression", | ||
"failsWhenExpression": "isEmpty(myValue)", | ||
"message": "Empty value not allowed!" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters