FHIR Chat · How do I use answerOption.initialSelected · questionnaire

Stream: questionnaire

Topic: How do I use answerOption.initialSelected


view this post on Zulip 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?

view this post on Zulip 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.

view this post on Zulip 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].

view this post on Zulip 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?

view this post on Zulip Yunwei Wang (Jun 10 2020 at 17:08):

https://jira.hl7.org/browse/FHIR-27803

view this post on Zulip 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?

view this post on Zulip 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...

view this post on Zulip 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"?

view this post on Zulip 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."

view this post on Zulip 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).

view this post on Zulip 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...

view this post on Zulip 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.

view this post on Zulip Yunwei Wang (Jun 11 2020 at 17:53):

Good topic for today's conference call.

view this post on Zulip Yunwei Wang (Jun 11 2020 at 20:26):

QUE-11 is address by https://jira.hl7.org/browse/FHIR-22686

view this post on Zulip 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