FHIR Chat · answerOption with type String · questionnaire

Stream: questionnaire

Topic: answerOption with type String


view this post on Zulip Nitin Sabale (Mar 29 2022 at 08:47):

Is it ok to have answerOption with questionnaire item of type string?

Example :
{
"resourceType": "Questionnaire",
.
.
"item": [
{
"type": "string",
"linkId": "mobile-number",
"text": "Mobile number",
"extension": [
{
"url": "http://iprdgroup.org/fhir/extention/phoneNumber",
"valueString": "phone-number"
}
],
"answerOption": [
{
"valueCoding": {
"code": "+234",
"display": "+234"
}
},
{
"valueCoding": {
"code": "+91",
"display": "+91"
}
},
{
"valueCoding": {
"code": "+1",
"display": "+1"
}
}
]
}
]
}

view this post on Zulip Brian Postlethwaite (Mar 29 2022 at 11:29):

for that case you would still use

"answerOption":[
   { "valueString": "+234" },
   { "valueString": "+165" },
   { "valueString": "+91" }
]

You want the AnswerOption to match up with the type that you're permitting.

view this post on Zulip Brian Postlethwaite (Mar 29 2022 at 12:14):

@Lloyd McKenzie with this type of question, should the validator ensure that only one of the provided values is selected?

view this post on Zulip Lloyd McKenzie (Mar 29 2022 at 14:54):

Depends on whether the question is marked as 'repeating' or not

view this post on Zulip Brian Postlethwaite (Mar 29 2022 at 19:22):

I didn't mean the literal repeating part, I meant did it have to be from that set and not any string, as it would with an open choice.

view this post on Zulip Lloyd McKenzie (Mar 29 2022 at 20:14):

In R5, if there are options and the 'open' flag isn't set, you have to choose from the selected options (whether string, date, time, integer or coding.

view this post on Zulip Brian Postlethwaite (Mar 29 2022 at 22:32):

What about with R4?

view this post on Zulip Lloyd McKenzie (Mar 29 2022 at 23:09):

There too, but there's no way to have an 'open' choice for anything other than 'Coding'.


Last updated: Apr 12 2022 at 19:14 UTC