FHIR © HL7.org  |  Server Home  |  XIG Home  |  Server Source  |  FHIR  

FHIR IG Statistics: StructureDefinition/ch-emed-epr-amount-quantity

Packagech.fhir.ig.ch-emed-epr
TypeStructureDefinition
Idch-emed-epr-amount-quantity
FHIR VersionR4
Sourcehttp://fhir.ch/ig/ch-emed-epr/http://fhir.ch/ig/ch-emed-epr/2.0.0/StructureDefinition-ch-emed-epr-amount-quantity.html
URLhttp://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-amount-quantity
Version2.0.0
Statusdraft
Date2025-01-21T10:58:28+00:00
NameCHEMEDEPRAmountQuantity
TitleAmount Quantity
Realmch
Authorityhl7
DescriptionA quantity with an amount unit (no time unit)
CopyrightCC0-1.0
TypeQuantity
Kindcomplex-type

Resources that use this resource

StructureDefinition
ch-emed-epr-amount-rangeAmount Range
ch-emed-epr-dosage-medicationrequestDosage (MedicationRequest)
ch-emed-epr-dosage-splitDosage Split
ch-emed-epr-dosageDosage (MedicationStatement / MedicationDispense)
ch-emed-epr-medication-request-changed-listPML Changed Medication Request
ch-emed-epr-medicationdispense-listPML MedicationDispense
ch-emed-epr-medicationdispenseDIS MedicationDispense
ch-emed-epr-medicationrequest-changedPADV Changed MedicationRequest
ch-emed-epr-medicationrequest-listPML MedicationRequest
ch-emed-epr-medicationrequestPRE MedicationRequest
ch-emed-epr-ratio-amount-per-amountRatio (Amount / Amount)
ch-emed-epr-ratio-amount-per-timeRatio (Amount / Time)

Resources that this resource uses

StructureDefinition
ch-core-quantity-with-emed-unitsCH Core Quantity with EMED Units
ValueSet
ch-emed-epr-amount-quantity-unit-codeAmount Quantity Unit Codes

Narrative

Note: links and images are rebased to the (stated) source

Generated Narrative: StructureDefinition ch-emed-epr-amount-quantity

NameFlagsCard.TypeDescription & Constraintsdoco
.. Quantity 0..*CHCoreQuantityWithEmedUnitsA fixed quantity (no comparator)
... id D0..1string✕ This element is not supported
... extension D0..*Extension✕ This element is not supported
... value C1..1decimalNumerical value (with implicit precision)
amount-quantity-int-or-simple-decimal: 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.)
... comparator 0..0code
... code 1..1codeCoded form of the unit
Binding: Amount Quantity Unit Codes (required)

doco Documentation for this format

Source

{
  "resourceType": "StructureDefinition",
  "id": "ch-emed-epr-amount-quantity",
  "text": {
    "status": "extensions",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-amount-quantity",
  "version": "2.0.0",
  "name": "CHEMEDEPRAmountQuantity",
  "title": "Amount Quantity",
  "status": "draft",
  "date": "2025-01-21T10:58:28+00:00",
  "publisher": "CARA",
  "contact": [
    {
      "name": "CARA",
      "telecom": [
        {
          "system": "url",
          "value": "https://www.cara.ch"
        }
      ]
    }
  ],
  "description": "A quantity with an amount unit (no time unit)",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "urn:iso:std:iso:3166",
          "code": "CH",
          "display": "Switzerland"
        }
      ]
    }
  ],
  "copyright": "CC0-1.0",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    }
  ],
  "kind": "complex-type",
  "abstract": false,
  "type": "Quantity",
  "baseDefinition": "http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units",
  "derivation": "constraint",
  "snapshot": {
    "element": [
      {
        "id": "Quantity",
        "path": "Quantity",
        "short": "A fixed quantity (no comparator)",
        "definition": "The comparator is not used on a SimpleQuantity",
        "comment": "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": 0,
        "max": "*",
        "base": {
          "path": "Quantity",
          "min": 0,
          "max": "*"
        },
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "qty-3",
            "severity": "error",
            "human": "If a code for the unit is present, the system SHALL also be present",
            "expression": "code.empty() or system.exists()",
            "xpath": "not(exists(f:code)) or exists(f:system)",
            "source": "http://hl7.org/fhir/StructureDefinition/Quantity"
          },
          {
            "key": "sqty-1",
            "severity": "error",
            "human": "The comparator is not used on a SimpleQuantity",
            "expression": "comparator.empty()",
            "xpath": "not(exists(f:comparator))",
            "source": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
          }
        ],
        "isModifier": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "SN (see also Range) or CQ"
          },
          {
            "identity": "rim",
            "map": "PQ, IVL<PQ>, MO, CO, depending on the values"
          }
        ]
      },
      {
        "id": "Quantity.id",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "draft"
          }
        ],
        "path": "Quantity.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "✕ This element is not supported",
        "definition": "Implementers should not set or read this element. \nThis element is only kept as optional to allow submission of documents that would contain a value, \nsince those documents are still readable by others.\nThe meaning of this element is undefined in this profile.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Quantity.extension",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "draft"
          }
        ],
        "path": "Quantity.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "✕ This element is not supported",
        "definition": "Implementers should not set or read this element. \nThis element is only kept as optional to allow submission of documents that would contain a value, \nsince those documents are still readable by others.\nThe meaning of this element is undefined in this profile.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Quantity.value",
        "path": "Quantity.value",
        "short": "Numerical value (with implicit precision)",
        "definition": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.",
        "comment": "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": "Precision is handled implicitly in almost all cases of measurement.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Quantity.value",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "decimal"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "amount-quantity-int-or-simple-decimal",
            "severity": "warning",
            "human": "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": "$this.toString().contains('.').not() or $this.toString().endsWith('.25') or $this.toString().endsWith('.5') or $this.toString().endsWith('.75')",
            "source": "http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-amount-quantity"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "SN.2  / CQ - N/A"
          },
          {
            "identity": "rim",
            "map": "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value"
          }
        ]
      },
      {
        "id": "Quantity.comparator",
        "path": "Quantity.comparator",
        "short": "< | <= | >= | > - how to understand the value",
        "definition": "Not allowed to be used in this context",
        "comment": "All modifiers SHALL be documented in the profile, in order to be usable.",
        "requirements": "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.",
        "min": 0,
        "max": "0",
        "base": {
          "path": "Quantity.comparator",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": true,
        "isModifierReason": "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",
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "QuantityComparator"
            }
          ],
          "strength": "required",
          "description": "How the Quantity should be understood and represented.",
          "valueSet": "http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1"
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "SN.1  / CQ.1"
          },
          {
            "identity": "rim",
            "map": "IVL properties"
          }
        ]
      },
      {
        "id": "Quantity.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Quantity.unit",
        "short": "Unit representation",
        "definition": "A human-readable form of the unit.",
        "requirements": "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Quantity.unit",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "(see OBX.6 etc.) / CQ.2"
          },
          {
            "identity": "rim",
            "map": "PQ.unit"
          }
        ]
      },
      {
        "id": "Quantity.system",
        "path": "Quantity.system",
        "short": "System that defines coded unit form",
        "definition": "The identification of the system that provides the coded form of the unit.",
        "requirements": "Need to know the system that defines the coded form of the unit.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Quantity.system",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "uri"
          }
        ],
        "condition": [
          "qty-3"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "(see OBX.6 etc.) / CQ.2"
          },
          {
            "identity": "rim",
            "map": "CO.codeSystem, PQ.translation.codeSystem"
          }
        ]
      },
      {
        "id": "Quantity.code",
        "path": "Quantity.code",
        "short": "Coded form of the unit",
        "definition": "A computer processable form of the unit in some unit representation system.",
        "comment": "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": "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": 1,
        "max": "1",
        "base": {
          "path": "Quantity.code",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.ch/ig/ch-emed-epr/ValueSet/ch-emed-epr-amount-quantity-unit-code"
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "(see OBX.6 etc.) / CQ.2"
          },
          {
            "identity": "rim",
            "map": "PQ.code, MO.currency, PQ.translation.code"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "Quantity",
        "path": "Quantity"
      },
      {
        "id": "Quantity.id",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "draft"
          }
        ],
        "path": "Quantity.id",
        "short": "✕ This element is not supported",
        "definition": "Implementers should not set or read this element. \nThis element is only kept as optional to allow submission of documents that would contain a value, \nsince those documents are still readable by others.\nThe meaning of this element is undefined in this profile."
      },
      {
        "id": "Quantity.extension",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "draft"
          }
        ],
        "path": "Quantity.extension",
        "short": "✕ This element is not supported",
        "definition": "Implementers should not set or read this element. \nThis element is only kept as optional to allow submission of documents that would contain a value, \nsince those documents are still readable by others.\nThe meaning of this element is undefined in this profile."
      },
      {
        "id": "Quantity.value",
        "path": "Quantity.value",
        "constraint": [
          {
            "key": "amount-quantity-int-or-simple-decimal",
            "severity": "warning",
            "human": "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": "$this.toString().contains('.').not() or $this.toString().endsWith('.25') or $this.toString().endsWith('.5') or $this.toString().endsWith('.75')",
            "source": "http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-amount-quantity"
          }
        ]
      },
      {
        "id": "Quantity.comparator",
        "path": "Quantity.comparator",
        "comment": "...All modifiers SHALL be documented in the profile, in order to be usable."
      },
      {
        "id": "Quantity.code",
        "path": "Quantity.code",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.ch/ig/ch-emed-epr/ValueSet/ch-emed-epr-amount-quantity-unit-code"
        }
      }
    ]
  }
}