Extension: unit
URL for this extension:
http://hl7.org/fhir/StructureDefinition/questionnaire-unit
Status: draft. Extension maintained by: HL7
Provides a computable unit of measure associated with numeric questions to support subsequent computation on responses. This is for use on items of type integer and decimal, and it's purpose is to support converting the integer or decimal answer into a Quantity when extracting the data into a resource.
Comment:
The human-readable unit is conveyed as a display element. This element is for computation purposes.
Context of Use: Use on Element ID Questionnaire.item or Element ID Questionnaire.item.item, with Context Invariant = type='integer' or type='decimal'
Extension Content
XML Template
<!-- unit -->
<extension xmlns="http://hl7.org/fhir"
url="http://hl7.org/fhir/StructureDefinition/questionnaire-unit" >
<!-- from Element: extension -->
<valueCoding><!--
1..1 Coding Value of extension --></valueCoding>
</extension>
JSON Template
{ // unit
// from Element: extension
"extension" : [ // sliced by value:url in the specified order, Open ]
"url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", // R!
"valueCoding" : { Coding } // C? R! Value of extension
}
XML Template
<!-- unit -->
<extension xmlns="http://hl7.org/fhir"
url="http://hl7.org/fhir/StructureDefinition/questionnaire-unit" >
<!-- from Element: extension -->
<valueCoding><!--
1..1 Coding Value of extension --></valueCoding>
</extension>
JSON Template
{ // unit
// from Element: extension
"extension" : [ // sliced by value:url in the specified order, Open ]
"url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", // R!
"valueCoding" : { Coding } // C? R! Value of extension
}
Constraints
- ele-1: All FHIR elements must have a @value or children unless an empty Parameters resource (xpath: @value|f:*|h:div|self::f:Parameters)
- ext-1: Must have either extensions or value[x], not both (xpath: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')]))
- ele-1: On Extension.extension: All FHIR elements must have a @value or children (xpath on Extension.extension: @value|f:*|h:div)
- ext-1: On Extension.extension: Must have either extensions or value[x], not both (xpath on Extension.extension: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")]))
- ele-1: On Extension.value[x]: All FHIR elements must have a @value or children (xpath on Extension.value[x]: @value|f:*|h:div)