Skip to main content

Quantity

Question with a combination of a numeric value and unit, potentially with a comparator (< , >, etc.) as an answer. (valueQuantity).

There is an extension "http://hl7.org/fhir/StructureDefinition/questionnaire-unit" that can be used to define what unit should be captured (or the unit that has a ucum conversion from the provided unit).

You can use the UnitOption extension to specify a list of options for the unit of a quantity item.

Basic usage​

Questionnaire-only​

With Response​

Advanced usage​

With multiple unitOptions​

With a single unitOption​

tip

It is recommended to use the "questionnaire-unit" extension instead when there is only one unit to choose from.

Calculations​

note

CalculatedExpression should evaluate to an integer or decimal value, which becomes valueQuantity.value. Unit, code and system will default to the unit provided via the "questionnaire-unit" extension.

View more advanced usages in Storybook's SDC section.

SDC Supported extensions​

CodeUsage
variablehttp://hl7.org/fhir/StructureDefinition/variable
initialExpressionhttp://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression
- InitialExpression should evaluate to a Quantity value.
calculatedExpressionhttp://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression
- CalculatedExpression should evaluate to an integer or decimal value (valueQuantity.value). Unit, code and system will default to the unit provided via extension "http://hl7.org/fhir/StructureDefinition/questionnaire-unit"
enableWhenExpressionhttp://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression
rendering-stylehttp://hl7.org/fhir/extensions/StructureDefinition-rendering-style.html
rendering-markdownhttp://hl7.org/fhir/extensions/StructureDefinition-rendering-markdown.html
rendering-xhtmlhttp://hl7.org/fhir/StructureDefinition/rendering-xhtml
hiddenhttp://hl7.org/fhir/StructureDefinition/questionnaire-hidden
entryFormathttp://hl7.org/fhir/StructureDefinition/entryFormat
requireditem.required
repeatsitem.repeats
readOnlyitem.readOnly
maxLengthitem.maxLength
minLengthhttp://hl7.org/fhir/StructureDefinition/minLength
regexhttp://hl7.org/fhir/StructureDefinition/regex
minQuantityhttp://hl7.org/fhir/uv/sdc/StructureDefinition-sdc-questionnaire-minQuantity.html
maxQuantityhttp://hl7.org/fhir/uv/sdc/StructureDefinition-sdc-questionnaire-maxQuantity.html
maxDecimalPlaceshttp://hl7.org/fhir/StructureDefinition/maxDecimalPlaces
unitOptionhttp://hl7.org/fhir/R4/extension-questionnaire-unitoption.html
initialitem.initial
enableWhenitem.enableWhen
enableBehavioritem.enableBehavior
textitem.text
unitOptionhttp://hl7.org/fhir/R4/extension-questionnaire-unitoption.html