Release 5

This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4

Example StructureDefinition/Quantity (Turtle)

Modeling and Methodology Work GroupMaturity Level: N/AStandards Status: Informative

Raw Turtle (+ also see Turtle/RDF Format Specification)

StructureDefinition for Quantity

@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

# - resource -------------------------------------------------------------------

[] a fhir:StructureDefinition ;
  fhir:id [ fhir:v "Quantity"] ;
  fhir:text [
     fhir:status [ fhir:v "generated" ]
  ] ;
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
     fhir:value [ fhir:v "normative" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
     fhir:value [ fhir:v "4.0.0" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics" ] ;
     fhir:value [ fhir:v "has-range" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics" ] ;
     fhir:value [ fhir:v "is-continuous" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics" ] ;
     fhir:value [ fhir:v "can-bind" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics" ] ;
     fhir:value [ fhir:v "has-units" ]
  ] ) ;
  fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/Quantity"], [ fhir:v "http://hl7.org/fhir/StructureDefinition/Quantity"] ;
  fhir:version [ fhir:v "5.0.0"], [ fhir:v "5.0.0"] ;
  fhir:name [ fhir:v "Quantity"], [ fhir:v "Quantity"] ;
  fhir:status [ fhir:v "active"], [ fhir:v "active"] ;
  fhir:experimental [ fhir:v "false"], [ fhir:v "false"] ;
  fhir:date [ fhir:v "2023-03-26T15:21:02+11:00"], [ fhir:v "2023-03-26T15:21:02+11:00"] ;
  fhir:publisher [ fhir:v "HL7 FHIR Standard"], [ fhir:v "HL7 FHIR Standard"] ;
  fhir:contact ( [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir" ]
     ] )
  ] ) ;
  fhir:description [ fhir:v "Quantity Type: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."], [ fhir:v "Quantity Type: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."] ;
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] ) ;
  fhir:purpose [ fhir:v "Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD."], [ fhir:v "Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD."] ;
  fhir:fhirVersion [ fhir:v "5.0.0"] ;
  fhir:mapping ( [
     fhir:identity [ fhir:v "v2" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v2" ] ;
     fhir:name [ fhir:v "HL7 V2 Mapping" ]
  ] [
     fhir:identity [ fhir:v "rim" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v3" ] ;
     fhir:name [ fhir:v "RIM Mapping" ]
  ] ) ;
  fhir:kind [ fhir:v "complex-type"] ;
  fhir:abstract [ fhir:v "false"] ;
  fhir:type [ fhir:v "Quantity"] ;
  fhir:baseDefinition [ fhir:v "http://hl7.org/fhir/StructureDefinition/DataType"] ;
  fhir:derivation [ fhir:v "specialization"] ;
  fhir:snapshot [
     fhir:element ( [
       fhir:id [ fhir:v "Quantity" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "normative" ]
       ] [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
         fhir:value [ fhir:v "4.0.0" ]
       ] ) ;
       fhir:path [ fhir:v "Quantity" ] ;
       fhir:short [ fhir:v "A measured or measurable amount" ] ;
       fhir:definition [ fhir:v "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies." ] ;
       fhir:comment [ fhir:v "The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] [
         fhir:key [ fhir:v "qty-3" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If a code for the unit is present, the system SHALL also be present" ] ;
         fhir:expression [ fhir:v "code.empty() or system.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Quantity" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a,PQ, IVL<PQ>, MO, CO, depending on the values" ]
       ] [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "SN (see also Range) or CQ" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.id" ] ;
       fhir:path [ fhir:v "Quantity.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "id" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.extension" ] ;
       fhir:path [ fhir:v "Quantity.extension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
       fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] [
         fhir:key [ fhir:v "ext-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
         fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Extension" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.value" ] ;
       fhir:path [ fhir:v "Quantity.value" ] ;
       fhir:short [ fhir:v "Numerical value (with implicit precision)" ] ;
       fhir:definition [ fhir:v "The value of the measured amount. The value includes an implicit precision in the presentation of the value." ] ;
       fhir:comment [ fhir:v "The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books)." ] ;
       fhir:requirements [ fhir:v "Precision is handled implicitly in almost all cases of measurement." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity.value" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "decimal" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "SN.2  / CQ - N/A" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.comparator" ] ;
       fhir:path [ fhir:v "Quantity.comparator" ] ;
       fhir:short [ fhir:v "< | <= | >= | > | ad - how to understand the value" ] ;
       fhir:definition [ fhir:v "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value." ] ;
       fhir:requirements [ fhir:v "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity.comparator" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:meaningWhenMissing [ fhir:v "If there is no comparator, then there is no modification of the value" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "This is labeled as \"Is Modifier\" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/binding-definition" ] ;
           fhir:value [ fhir:v "How the Quantity should be understood and represented." ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "QuantityComparator" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "How the Quantity should be understood and represented." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/quantity-comparator|5.0.0" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "SN.1  / CQ.1" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "IVL properties" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.unit" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ] ;
         fhir:value [ fhir:v "true" ]
       ] [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ] ;
         fhir:value [ fhir:v "true" ]
       ] ) ;
       fhir:path [ fhir:v "Quantity.unit" ] ;
       fhir:short [ fhir:v "Unit representation" ] ;
       fhir:definition [ fhir:v "A human-readable form of the unit." ] ;
       fhir:requirements [ fhir:v "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity.unit" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(see OBX.6 etc.) / CQ.2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ.unit" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.system" ] ;
       fhir:path [ fhir:v "Quantity.system" ] ;
       fhir:short [ fhir:v "System that defines coded unit form" ] ;
       fhir:definition [ fhir:v "The identification of the system that provides the coded form of the unit." ] ;
       fhir:requirements [ fhir:v "Need to know the system that defines the coded form of the unit." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity.system" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "uri" ]
       ] ) ;
       fhir:condition ( [ fhir:v "qty-3" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(see OBX.6 etc.) / CQ.2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "CO.codeSystem, PQ.translation.codeSystem" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.code" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/no-binding" ] ;
         fhir:value [ fhir:v "true" ]
       ] ) ;
       fhir:path [ fhir:v "Quantity.code" ] ;
       fhir:short [ fhir:v "Coded form of the unit" ] ;
       fhir:definition [ fhir:v "A computer processable form of the unit in some unit representation system." ] ;
       fhir:comment [ fhir:v "The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency.  The context of use may additionally require a code from a particular system." ] ;
       fhir:requirements [ fhir:v "Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity.code" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:condition ( [ fhir:v "qty-3" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(see OBX.6 etc.) / CQ.2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ.code, MO.currency, PQ.translation.code" ]
       ] )
     ] )
  ] ;
  fhir:differential [
     fhir:element ( [
       fhir:id [ fhir:v "Quantity" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "normative" ]
       ] [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ] ;
         fhir:value [ fhir:v "4.0.0" ]
       ] ) ;
       fhir:path [ fhir:v "Quantity" ] ;
       fhir:short [ fhir:v "A measured or measurable amount" ] ;
       fhir:definition [ fhir:v "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies." ] ;
       fhir:comment [ fhir:v "The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "qty-3" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If a code for the unit is present, the system SHALL also be present" ] ;
         fhir:expression [ fhir:v "code.empty() or system.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Quantity" ]
       ] ) ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "SN (see also Range) or CQ" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ, IVL<PQ>, MO, CO, depending on the values" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.value" ] ;
       fhir:path [ fhir:v "Quantity.value" ] ;
       fhir:short [ fhir:v "Numerical value (with implicit precision)" ] ;
       fhir:definition [ fhir:v "The value of the measured amount. The value includes an implicit precision in the presentation of the value." ] ;
       fhir:comment [ fhir:v "The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books)." ] ;
       fhir:requirements [ fhir:v "Precision is handled implicitly in almost all cases of measurement." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "decimal" ]
       ] ) ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "SN.2  / CQ - N/A" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.comparator" ] ;
       fhir:path [ fhir:v "Quantity.comparator" ] ;
       fhir:short [ fhir:v "< | <= | >= | > | ad - how to understand the value" ] ;
       fhir:definition [ fhir:v "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value." ] ;
       fhir:requirements [ fhir:v "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:meaningWhenMissing [ fhir:v "If there is no comparator, then there is no modification of the value" ] ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "This is labeled as \"Is Modifier\" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value" ] ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/binding-definition" ] ;
           fhir:value [ fhir:v "How the Quantity should be understood and represented." ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "QuantityComparator" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "How the Quantity should be understood and represented." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/quantity-comparator|5.0.0" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "SN.1  / CQ.1" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "IVL properties" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.unit" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ] ;
         fhir:value [ fhir:v "true" ]
       ] [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ] ;
         fhir:value [ fhir:v "true" ]
       ] ) ;
       fhir:path [ fhir:v "Quantity.unit" ] ;
       fhir:short [ fhir:v "Unit representation" ] ;
       fhir:definition [ fhir:v "A human-readable form of the unit." ] ;
       fhir:requirements [ fhir:v "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(see OBX.6 etc.) / CQ.2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ.unit" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.system" ] ;
       fhir:path [ fhir:v "Quantity.system" ] ;
       fhir:short [ fhir:v "System that defines coded unit form" ] ;
       fhir:definition [ fhir:v "The identification of the system that provides the coded form of the unit." ] ;
       fhir:requirements [ fhir:v "Need to know the system that defines the coded form of the unit." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "uri" ]
       ] ) ;
       fhir:condition ( [ fhir:v "qty-3" ] ) ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(see OBX.6 etc.) / CQ.2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "CO.codeSystem, PQ.translation.codeSystem" ]
       ] )
     ] [
       fhir:id [ fhir:v "Quantity.code" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/no-binding" ] ;
         fhir:value [ fhir:v "true" ]
       ] ) ;
       fhir:path [ fhir:v "Quantity.code" ] ;
       fhir:short [ fhir:v "Coded form of the unit" ] ;
       fhir:definition [ fhir:v "A computer processable form of the unit in some unit representation system." ] ;
       fhir:comment [ fhir:v "The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency.  The context of use may additionally require a code from a particular system." ] ;
       fhir:requirements [ fhir:v "Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:condition ( [ fhir:v "qty-3" ] ) ;
       fhir:isSummary [ fhir:v "true" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(see OBX.6 etc.) / CQ.2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ.code, MO.currency, PQ.translation.code" ]
       ] )
     ] )
  ] .

# -------------------------------------------------------------------------------------


Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.