-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix) fix error editing obs group with more than one repeating group (#…
…149) * Add ability to edit obs group with more than one node * add unit tests
- Loading branch information
Showing
8 changed files
with
434 additions
and
264 deletions.
There are no files selected for viewing
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,137 @@ | ||
{ | ||
"name": "ObsGroup Test Form", | ||
"version": "1", | ||
"published": true, | ||
"retired": false, | ||
"pages": [ | ||
{ | ||
"label": "Introduction", | ||
"sections": [ | ||
{ | ||
"label": "", | ||
"isExpanded": "true", | ||
"questions": [ | ||
{ | ||
"type": "markdown", | ||
"questionOptions": { | ||
"rendering": "markdown" | ||
}, | ||
"id": "fooMarkdown", | ||
"value": [ | ||
"**Use this form to:** Test Obs Group behaviour" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"label": "Obs Group Page", | ||
"sections": [ | ||
{ | ||
"label": "Group Section", | ||
"isExpanded": "true", | ||
"questions": [ | ||
{ | ||
"id": "myGroup", | ||
"label": "My Group", | ||
"type": "obsGroup", | ||
"questionOptions": { | ||
"rendering": "repeating", | ||
"concept": "1c70c490-cafa-4c95-9fdd-a30b62bb78b8" | ||
}, | ||
"behaviours":[ | ||
{ | ||
"intent":"*", | ||
"required":"false", | ||
"unspecified":"false", | ||
"hide":{ | ||
"hideWhenExpression":"" | ||
}, | ||
"validators":[] | ||
} | ||
], | ||
"questions": [ | ||
{ | ||
"label": "Sex", | ||
"type":"obs", | ||
"required":"true", | ||
"questionOptions":{ | ||
"rendering":"radio", | ||
"concept":"1587AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
"answers":[ | ||
{ | ||
"concept":"1535AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
"label":"Female" | ||
}, | ||
{ | ||
"concept":"1534AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
"label":"Male" | ||
} | ||
] | ||
}, | ||
"id":"childSex", | ||
"behaviours":[ | ||
{ | ||
"intent":"*", | ||
"required":"true", | ||
"unspecified":"true", | ||
"hide":{ | ||
"hideWhenExpression":"false" | ||
}, | ||
"validators":[] | ||
} | ||
] | ||
}, | ||
{ | ||
"label": "Date of Birth", | ||
"type": "obs", | ||
"questionOptions": { | ||
"rendering": "date", | ||
"concept": "164802AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
"weeksList": "" | ||
}, | ||
"id": "birthDate", | ||
"behaviours": [ | ||
{ | ||
"intent": "*", | ||
"required": "true", | ||
"unspecified": "true", | ||
"hide": { | ||
"hideWhenExpression": "false" | ||
}, | ||
"validators": [ | ||
{ | ||
"type": "date", | ||
"allowFutureDates": "false" | ||
}, | ||
{ | ||
"type": "js_expression", | ||
"failsWhenExpression": "!isDateEqualTo(myValue, useFieldValue('visit_date'))", | ||
"message": "Child birth date should be the same as the visit date!" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"availableIntents": [ | ||
{ | ||
"intent": "*", | ||
"display": "ObsGroup Test Form" | ||
} | ||
], | ||
"processor": "EncounterFormProcessor", | ||
"uuid": "8f713e0e-94a0-3c57-9024-69520933802a", | ||
"referencedForms": [], | ||
"encounterType": "7e54cd64-f9c3-11eb-8e6a-57478ce139b0", | ||
"encounter": "Obs Group Test", | ||
"allowUnspecifiedAll": true | ||
} | ||
|
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
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
Oops, something went wrong.