ch-emed-epr-amount-quantity
type: StructureDefinition
node role: treeRoot
id:
  v: ch-emed-epr-amount-quantity
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition ch-emed-epr-amount-quantity Name Flags Card. Type Description & Constraints Quantity 0..* CHCoreQuantityWithEmedUnits A fixed quantity (no comparator) #xD; id D 0..1 string ✕ This element is not supported #xD; extension D 0..* Extension ✕ This element is not supported #xD; value <a style="padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;; padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;" href="http://hl7.org/fhir/R4/conformance-rules.html#constraints" title="This element has or is affected by constraints ( amount-quantity-int-or-simple-decimal )">C 1..1 decimal Numerical value (with implicit precision) Constraints: amount-quantity-int-or-simple-decimal #xD; comparator 0..0 code < | <= | >= | > - how to understand the value #xD; code 1..1 code Coded form of the unit Binding: Amount Quantity Unit Codes (required) #xD; Documentation for this format
url:
  v: http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-amount-quantity
  l: ch-emed-epr-amount-quantity
version:
  v: 3.0.0
name:
  v: CHEMEDEPRAmountQuantity
title:
  v: Amount Quantity
status:
  v: draft
date:
  v: 2026-02-11T07:01:54+00:00
publisher:
  v: CARA
contact:
  name:
    v: CARA
  telecom:
    system:
      v: url
    value:
      v: https://www.cara.ch
description:
  v: A quantity with an amount unit (no time unit)
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
      l: 3166
    code:
      v: CH
    display:
      v: Switzerland
copyright:
  v: CC0-1.0
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: v2
  uri:
    v: http://hl7.org/v2
    l: v2
  name:
    v: HL7 v2 Mapping
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
    l: v3
  name:
    v: RIM Mapping
kind:
  v: complex-type
abstract:
  v: false
type:
  v: Quantity
  l: Quantity
base definition:
  v: http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units
  l: ch-core-quantity-with-emed-units
derivation:
  v: constraint
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
      l: snapshot-base-version
    value: String
      v: 6.0.0
  element:
    id:
      v: Quantity
    path:
      v: Quantity
    short:
      v: A fixed quantity (no comparator)
    definition:
      v: The comparator is not used on a SimpleQuantity
    comment:
      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.
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Quantity
      min:
        v: 0
      max:
        v: *
    condition:
      v: ele-1
    constraint:
      key:
        v: ele-1
      severity:
        v: error
      human:
        v: All FHIR elements must have a @value or children
      expression:
        v: hasValue() or (children().count() > id.count())
      xpath:
        v: @value|f:*|h:div
      source:
        v: http://hl7.org/fhir/StructureDefinition/Element
        l: Element
    constraint:
      key:
        v: qty-3
      severity:
        v: error
      human:
        v: If a code for the unit is present, the system SHALL also be present
      expression:
        v: code.empty() or system.exists()
      xpath:
        v: not(exists(f:code)) or exists(f:system)
      source:
        v: http://hl7.org/fhir/StructureDefinition/Quantity
        l: Quantity
    constraint:
      key:
        v: sqty-1
      severity:
        v: error
      human:
        v: The comparator is not used on a SimpleQuantity
      expression:
        v: comparator.empty()
      xpath:
        v: not(exists(f:comparator))
      source:
        v: http://hl7.org/fhir/StructureDefinition/SimpleQuantity
        l: SimpleQuantity
    is modifier:
      v: false
    mapping:
      identity:
        v: rim
      map:
        v: n/a
    mapping:
      identity:
        v: v2
      map:
        v: SN (see also Range) or CQ
    mapping:
      identity:
        v: rim
      map:
        v: PQ, IVL<PQ>, MO, CO, depending on the values
  element:
    id:
      v: Quantity.id
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
        l: structuredefinition-standards-status
      value: Code
        v: draft
    path:
      v: Quantity.id
    representation:
      v: xmlAttr
    short:
      v: ✕ This element is not supported
    definition:
      v: Implementers should not set or read this element. This element is only kept as optional to allow submission of documents that would contain a value, since those documents are still readable by others. The meaning of this element is undefined in this profile.
    min:
      v: 0
    max:
      v: 1
    base:
      path:
        v: Element.id
      min:
        v: 0
      max:
        v: 1
    type:
      extension:
        value: Url
      code:
        v: http://hl7.org/fhirpath/System.String
        l: System.String
    is modifier:
      v: false
    is summary:
      v: false

Url
v: string
l: string

identity:
  v: rim
map:
  v: n/a

id:
  v: Quantity.extension
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
    l: structuredefinition-standards-status
  value: Code
    v: draft
path:
  v: Quantity.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: ✕ This element is not supported
definition:
  v: Implementers should not set or read this element. This element is only kept as optional to allow submission of documents that would contain a value, since those documents are still readable by others. The meaning of this element is undefined in this profile.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Quantity.value
path:
  v: Quantity.value
short:
  v: Numerical value (with implicit precision)
definition:
  v: The value of the measured amount. The value includes an implicit precision in the presentation of the value.
comment:
  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).
requirements:
  v: Precision is handled implicitly in almost all cases of measurement.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Quantity.value
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
    l: decimal
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: amount-quantity-int-or-simple-decimal
  severity:
    v: warning
  human:
    v: An amount quantity should be either an integer, or a decimal that ends with '.25', '.5', or '.75' for non-scientific units (like tablets, pillules, ampules, etc.)
  expression:
    v: $this.toString().contains('.').not() or $this.toString().endsWith('.25') or $this.toString().endsWith('.5') or $this.toString().endsWith('.75')
  source:
    v: http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-amount-quantity
    l: ch-emed-epr-amount-quantity
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: SN.2 / CQ - N/A
mapping:
  identity:
    v: rim
  map:
    v: PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value

id:
  v: Quantity.comparator
path:
  v: Quantity.comparator
short:
  v: < | <= | >= | > - how to understand the value
definition:
  v: Not allowed to be used in this context
comment:
  v: ...All modifiers SHALL be documented in the profile, in order to be usable.
requirements:
  v: Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.
min:
  v: 0
max:
  v: 0
base:
  path:
    v: Quantity.comparator
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
meaning when missing:
  v: If there is no comparator, then there is no modification of the value
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  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
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: QuantityComparator
  strength:
    v: required
  description:
    v: How the Quantity should be understood and represented.
  value set:
    v: http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1
    l: http://hl7.org/fhir/ValueSet/quantity-comparator
mapping:
  identity:
    v: v2
  map:
    v: SN.1 / CQ.1
mapping:
  identity:
    v: rim
  map:
    v: IVL properties

id:
  v: Quantity.unit
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
    l: elementdefinition-translatable
  value: Boolean
    v: true
path:
  v: Quantity.unit
short:
  v: Unit representation
definition:
  v: A human-readable form of the unit.
requirements:
  v: There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Quantity.unit
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: (see OBX.6 etc.) / CQ.2
mapping:
  identity:
    v: rim
  map:
    v: PQ.unit

id:
  v: Quantity.system
path:
  v: Quantity.system
short:
  v: System that defines coded unit form
definition:
  v: The identification of the system that provides the coded form of the unit.
requirements:
  v: Need to know the system that defines the coded form of the unit.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Quantity.system
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
condition:
  v: qty-3
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: (see OBX.6 etc.) / CQ.2
mapping:
  identity:
    v: rim
  map:
    v: CO.codeSystem, PQ.translation.codeSystem

id:
  v: Quantity.code
path:
  v: Quantity.code
short:
  v: Coded form of the unit
definition:
  v: A computer processable form of the unit in some unit representation system.
comment:
  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.
requirements:
  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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Quantity.code
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://fhir.ch/ig/ch-emed-epr/ValueSet/ch-emed-epr-amount-quantity-unit-code
    l: ch-emed-epr-amount-quantity-unit-code
mapping:
  identity:
    v: v2
  map:
    v: (see OBX.6 etc.) / CQ.2
mapping:
  identity:
    v: rim
  map:
    v: PQ.code, MO.currency, PQ.translation.code

element:
  id:
    v: Quantity
  path:
    v: Quantity
element:
  id:
    v: Quantity.id
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
      l: structuredefinition-standards-status
    value: Code
      v: draft
  path:
    v: Quantity.id
  short:
    v: ✕ This element is not supported
  definition:
    v: Implementers should not set or read this element. This element is only kept as optional to allow submission of documents that would contain a value, since those documents are still readable by others. The meaning of this element is undefined in this profile.
element:
  id:
    v: Quantity.extension
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
      l: structuredefinition-standards-status
    value: Code
      v: draft
  path:
    v: Quantity.extension
  short:
    v: ✕ This element is not supported
  definition:
    v: Implementers should not set or read this element. This element is only kept as optional to allow submission of documents that would contain a value, since those documents are still readable by others. The meaning of this element is undefined in this profile.
element:
  id:
    v: Quantity.value
  path:
    v: Quantity.value
  constraint:
    key:
      v: amount-quantity-int-or-simple-decimal
    severity:
      v: warning
    human:
      v: An amount quantity should be either an integer, or a decimal that ends with '.25', '.5', or '.75' for non-scientific units (like tablets, pillules, ampules, etc.)
    expression:
      v: $this.toString().contains('.').not() or $this.toString().endsWith('.25') or $this.toString().endsWith('.5') or $this.toString().endsWith('.75')
    source:
      v: http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-amount-quantity
      l: ch-emed-epr-amount-quantity
element:
  id:
    v: Quantity.comparator
  path:
    v: Quantity.comparator
  comment:
    v: ...All modifiers SHALL be documented in the profile, in order to be usable.
element:
  id:
    v: Quantity.code
  path:
    v: Quantity.code
  binding:
    strength:
      v: required
    value set:
      v: http://fhir.ch/ig/ch-emed-epr/ValueSet/ch-emed-epr-amount-quantity-unit-code
      l: ch-emed-epr-amount-quantity-unit-code