Stream: questionnaire
Topic: How do I use answerOption.initialSelected
Yunwei Wang (Jun 09 2020 at 17:26):
http://hl7.org/fhir/questionnaire-definitions.html#Questionnaire.item.answerOption.initialSelected states that "Use this instead of initial[v] if answerValueSet is present." So, if I am using answerValueSet, how could I select more than one default coding?
Brian Postlethwaite (Jun 10 2020 at 04:17):
That isn't possible with this structure. If the initialValue is used you could support multiple - which is what I would prefer too.
Yunwei Wang (Jun 10 2020 at 13:13):
While reading that sentence, it sounds like that if I use answerValueSet the I cannot use initial[x].
Lloyd McKenzie (Jun 10 2020 at 14:30):
Something is wrong there... You wouldn't have answerValueSet if you have an answerOption. Can you submit a change request?
Yunwei Wang (Jun 10 2020 at 17:08):
https://jira.hl7.org/browse/FHIR-27803
Ilya Beda (Jun 11 2020 at 07:01):
The type of initialSelected is boolean.
Based on definition it is also a flag Indicates whether the answer value is selected when the list of possible answers is initially shown.
So the comment is deffinatly incorrect.
However, I don't see any use case for initialSelected attribute. inital[x] seems enough.
Could somebody provide usage examples?
Why was this attribute added?
Lloyd McKenzie (Jun 11 2020 at 14:15):
The tracker is here: https://jira.hl7.org/browse/FHIR-13816
That said, I'm not clear on why initialValue being 0..* isn't sufficient...
Yunwei Wang (Jun 11 2020 at 15:38):
That brings another question, what is the reason for que-11 "If one or more answerOption is present, initial[x] must be missing"?
Paul Lynch (Jun 11 2020 at 15:40):
I think the comment on answerOption.initialSelected that reads, "Use this instead of initial[v] if answerValueSet is present" is a typo, and should read, "Use this instead of initial[v] if answerOption is present."
Paul Lynch (Jun 11 2020 at 15:43):
The advantage of answerOption.initialSelected over initial[x] is that you don't have to repeat the option's value twice (once in the list, and once for the initial value).
Lloyd McKenzie (Jun 11 2020 at 16:12):
Two ways to do something, one generic and one slightly more efficient doesn't necessarily seem worth the added complexity to me...
Paul Lynch (Jun 11 2020 at 16:46):
initialSelected is not just more efficient. It eliminates the possibility that the initial value is not in the list, and eliminates the need to update a list item in two places if the list is revised.
Yunwei Wang (Jun 11 2020 at 17:53):
Good topic for today's conference call.
Yunwei Wang (Jun 11 2020 at 20:26):
QUE-11 is address by https://jira.hl7.org/browse/FHIR-22686
Ilya Beda (Jun 15 2020 at 15:35):
I found it reasonable
Two ways to do something, one generic and one slightly more efficient doesn't necessarily seem worth the added complexity to me...
From my experience, I usually create a set of options for the choice questions as a composition of unique items from initial[v]
and answerOption
or answerValueset
.
With initial[v]
It is much easy to migrate from answerOption
to answerValueset
and wise versa.
Last updated: Apr 12 2022 at 19:14 UTC