Stream: questionnaire
Topic: Using answerOption.valueReference
Yunwei Wang (Jun 09 2020 at 17:17):
I have a value set contains all coding that I would like to put into a choice type item. Other than using answerValueSet, can I use answerOption.valueReference to refer that value set? The reason I am asking is that there is a bug in HAPI which could not parse canonical reference correct so the contained value set is removed if not used by a Reference type.
Lloyd McKenzie (Jun 09 2020 at 18:35):
no. valueReference is for when the answers are expected to be references. E.g. "pick a Location", "pick a Practitioner". If you had value set there, that would let the user pick a value set, not pick a code from the value set.
Oliver Egger (Jun 09 2020 at 19:45):
Yunwei Wang said:
I have a value set contains all coding that I would like to put into a choice type item. Other than using answerValueSet, can I use answerOption.valueReference to refer that value set? The reason I am asking is that there is a bug in HAPI which could not parse canonical reference correct so the contained value set is removed if not used by a Reference type.
we encountered a similar issue and worked (or better hacked?) around it by introducing an extension with a reference to the contained ValueSet ... see https://github.com/hl7ch/covid-19-prom/blob/master/input/resources/questionnaire/coronascience-question-of-the-day-QD1.xml
Yunwei Wang (Jun 09 2020 at 20:12):
This is smart! I used initial.valueReference and then remove it after HAPI serialization. It was a terrible solution. I will try yours. Thank you.
Last updated: Apr 12 2022 at 19:14 UTC