-
Notifications
You must be signed in to change notification settings - Fork 314
Closed
Description
Describe the bug
Fhir spec allows to add a boolean property 'initialSelected' to each answerOption to set that as initial when rendering questionnaire item as defined here .
Also Rule 11 specifies that "If one or more answerOption is present, initial cannot be present. Use answerOption.initialSelected instead"
Component
SDC library
To Reproduce
This questionnaire should work and allow setting initial values
{
"resourceType": "Questionnaire",
"item": [{
"linkId": "2.0",
"type": "choice",
"text": "Initially selected multiple choice",
"repeats": true,
"answerOption": [{
"valueCoding": {
"code": "1st",
"display": "First",
"system": "custom"
}
}, {
"valueCoding": {
"code": "2nd",
"display": "Second",
"system": "custom"
},
"initialSelected": true
}, {
"valueCoding": {
"code": "3rd",
"display": "Third",
"system": "custom"
},
"initialSelected": true
} ]
}, {
"linkId": "2.0",
"type": "string",
"text": "Initially provided text value",
"initial": [{
"valueString": "Here is a sample text"
}]
}
]}
Expected behavior
Above questionnaire should work and select the values marked as initialSelected in answerOption.
Would you like to work on the issue?
A PR is created and this issue would be resolved by that
FikriMilano
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Complete
Status
✅ Done