Stream: implementers
Topic: Questionnaire.item.type extensibility
Niek van Galen (Mar 09 2020 at 15:22):
According to the item-type ValueSet in STU3 a Questionnaire item with type value 'quantity' can be extended with the unit extension. However, when I try this, it does not validate.
Looking at the same extension in R4 there is a constraint added that limits use of this extension to item types 'integer' or 'decimal'. The ValueSet in R4 however still refers to the extension on the 'quantity' item type.
Now my underlying question: what is the right way to format a Questionnaire item where you would expect a QuestionnaireResponse item of valueQuantity? E.g. when asking for a persons weight in kg.
Lloyd McKenzie (Mar 09 2020 at 17:13):
Not sure why you feel the item-type value set is related to where you can use the 'unit' extension. In both STU3 and R4 there's a constraint that limits types to integer or decimal. It's just that the rendering in STU3 didn't surface that well. If your intention is to constrain a questionnaire item to only kg, then use 'decimal' rather than Quantity as the question type. Quantity only makes sense as a question type if you need to capture both value and unit
Niek van Galen (Mar 10 2020 at 07:48):
Thank you @Lloyd McKenzie
However, I do find it kind of strange that the definition for code 'quantity' in the ValueSet states the unit questionnaire-unit extension while I can not use it on 'quantity' because of the constraint.
image.png
Grahame Grieve (Mar 10 2020 at 08:57):
you use it on the question, not the answer - that's why
Last updated: Apr 12 2022 at 19:14 UTC