{
"description": "A quantity with defined units",
"_filename": "StructureDefinition-ch-core-quantity-with-emed-units.json",
"package_name": "ch.fhir.ig.ch-core",
"date": "2024-12-17T19:55:07+00:00",
"derivation": "constraint",
"publisher": "HL7 Switzerland",
"fhirVersion": "4.0.1",
"jurisdiction": [ {
"coding": [ {
"code": "CH",
"system": "urn:iso:std:iso:3166"
} ]
} ],
"name": "CHCoreQuantityWithEmedUnits",
"mapping": [ {
"uri": "http://hl7.org/v2",
"name": "HL7 v2 Mapping",
"identity": "v2"
}, {
"uri": "http://hl7.org/v3",
"name": "RIM Mapping",
"identity": "rim"
} ],
"abstract": false,
"copyright": "CC0-1.0",
"type": "Quantity",
"experimental": null,
"resourceType": "StructureDefinition",
"title": "CH Core Quantity with EMED Units",
"package_version": "5.0.0",
"snapshot": {
"element": [ {
"constraint": [ {
"key": "ele-1",
"human": "All FHIR elements must have a @value or children",
"xpath": "@value|f:*|h:div",
"source": "http://hl7.org/fhir/StructureDefinition/Element",
"severity": "error",
"expression": "hasValue() or (children().count() > id.count())"
}, {
"key": "qty-3",
"human": "If a code for the unit is present, the system SHALL also be present",
"xpath": "not(exists(f:code)) or exists(f:system)",
"source": "http://hl7.org/fhir/StructureDefinition/Quantity",
"severity": "error",
"expression": "code.empty() or system.exists()"
}, {
"key": "sqty-1",
"human": "The comparator is not used on a SimpleQuantity",
"xpath": "not(exists(f:comparator))",
"source": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity",
"severity": "error",
"expression": "comparator.empty()"
} ],
"path": "Quantity",
"min": 0,
"definition": "The comparator is not used on a SimpleQuantity",
"isModifier": false,
"short": "A fixed quantity (no comparator)",
"mapping": [ {
"map": "n/a",
"identity": "rim"
}, {
"map": "SN (see also Range) or CQ",
"identity": "v2"
}, {
"map": "PQ, IVL, MO, CO, depending on the values",
"identity": "rim"
} ],
"max": "*",
"id": "Quantity",
"condition": [ "ele-1" ],
"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.",
"base": {
"max": "*",
"min": 0,
"path": "Quantity"
}
}, {
"path": "Quantity.id",
"min": 0,
"definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
"isModifier": false,
"short": "Unique id for inter-element referencing",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"type": [ {
"code": "http://hl7.org/fhirpath/System.String",
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
"valueUrl": "string"
} ]
} ],
"representation": [ "xmlAttr" ],
"max": "1",
"id": "Quantity.id",
"base": {
"max": "1",
"min": 0,
"path": "Element.id"
},
"isSummary": false
}, {
"constraint": [ {
"key": "ele-1",
"human": "All FHIR elements must have a @value or children",
"xpath": "@value|f:*|h:div",
"source": "http://hl7.org/fhir/StructureDefinition/Element",
"severity": "error",
"expression": "hasValue() or (children().count() > id.count())"
}, {
"key": "ext-1",
"human": "Must have either extensions or value[x], not both",
"xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
"source": "http://hl7.org/fhir/StructureDefinition/Extension",
"severity": "error",
"expression": "extension.exists() != value.exists()"
} ],
"path": "Quantity.extension",
"min": 0,
"definition": "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 manageable, 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.",
"isModifier": false,
"short": "Additional content defined by implementations",
"mapping": [ {
"map": "n/a",
"identity": "rim"
} ],
"slicing": {
"rules": "open",
"description": "Extensions are always sliced by (at least) url",
"discriminator": [ {
"path": "url",
"type": "value"
} ]
},
"type": [ {
"code": "Extension"
} ],
"alias": [ "extensions", "user content" ],
"max": "*",
"id": "Quantity.extension",
"comment": "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.",
"base": {
"max": "*",
"min": 0,
"path": "Element.extension"
},
"isSummary": false
}, {
"constraint": [ {
"key": "ele-1",
"human": "All FHIR elements must have a @value or children",
"xpath": "@value|f:*|h:div",
"source": "http://hl7.org/fhir/StructureDefinition/Element",
"severity": "error",
"expression": "hasValue() or (children().count() > id.count())"
} ],
"path": "Quantity.value",
"requirements": "Precision is handled implicitly in almost all cases of measurement.",
"min": 1,
"definition": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.",
"isModifier": false,
"short": "Numerical value (with implicit precision)",
"mapping": [ {
"map": "SN.2 / CQ - N/A",
"identity": "v2"
}, {
"map": "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value",
"identity": "rim"
} ],
"type": [ {
"code": "decimal"
} ],
"max": "1",
"id": "Quantity.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).",
"base": {
"max": "1",
"min": 0,
"path": "Quantity.value"
},
"isSummary": true
}, {
"constraint": [ {
"key": "ele-1",
"human": "All FHIR elements must have a @value or children",
"xpath": "@value|f:*|h:div",
"source": "http://hl7.org/fhir/StructureDefinition/Element",
"severity": "error",
"expression": "hasValue() or (children().count() > id.count())"
} ],
"path": "Quantity.comparator",
"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,
"definition": "Not allowed to be used in this context",
"isModifier": true,
"short": "< | <= | >= | > - how to understand the value",
"mapping": [ {
"map": "SN.1 / CQ.1",
"identity": "v2"
}, {
"map": "IVL properties",
"identity": "rim"
} ],
"type": [ {
"code": "code"
} ],
"meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
"binding": {
"strength": "required",
"valueSet": "http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1",
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
"valueString": "QuantityComparator"
} ],
"description": "How the Quantity should be understood and represented."
},
"max": "0",
"id": "Quantity.comparator",
"base": {
"max": "1",
"min": 0,
"path": "Quantity.comparator"
},
"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
}, {
"constraint": [ {
"key": "ele-1",
"human": "All FHIR elements must have a @value or children",
"xpath": "@value|f:*|h:div",
"source": "http://hl7.org/fhir/StructureDefinition/Element",
"severity": "error",
"expression": "hasValue() or (children().count() > id.count())"
} ],
"path": "Quantity.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,
"definition": "A human-readable form of the unit.",
"isModifier": false,
"short": "Unit representation",
"mapping": [ {
"map": "(see OBX.6 etc.) / CQ.2",
"identity": "v2"
}, {
"map": "PQ.unit",
"identity": "rim"
} ],
"type": [ {
"code": "string"
} ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
"valueBoolean": true
} ],
"max": "1",
"id": "Quantity.unit",
"base": {
"max": "1",
"min": 0,
"path": "Quantity.unit"
},
"isSummary": true
}, {
"constraint": [ {
"key": "ele-1",
"human": "All FHIR elements must have a @value or children",
"xpath": "@value|f:*|h:div",
"source": "http://hl7.org/fhir/StructureDefinition/Element",
"severity": "error",
"expression": "hasValue() or (children().count() > id.count())"
} ],
"path": "Quantity.system",
"requirements": "Need to know the system that defines the coded form of the unit.",
"min": 1,
"definition": "The identification of the system that provides the coded form of the unit.",
"isModifier": false,
"short": "System that defines coded unit form",
"mapping": [ {
"map": "(see OBX.6 etc.) / CQ.2",
"identity": "v2"
}, {
"map": "CO.codeSystem, PQ.translation.codeSystem",
"identity": "rim"
} ],
"type": [ {
"code": "uri"
} ],
"max": "1",
"id": "Quantity.system",
"condition": [ "qty-3" ],
"base": {
"max": "1",
"min": 0,
"path": "Quantity.system"
},
"isSummary": true
}, {
"constraint": [ {
"key": "ele-1",
"human": "All FHIR elements must have a @value or children",
"xpath": "@value|f:*|h:div",
"source": "http://hl7.org/fhir/StructureDefinition/Element",
"severity": "error",
"expression": "hasValue() or (children().count() > id.count())"
} ],
"path": "Quantity.code",
"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,
"definition": "A computer processable form of the unit in some unit representation system.",
"isModifier": false,
"short": "Coded form of the unit",
"mapping": [ {
"map": "(see OBX.6 etc.) / CQ.2",
"identity": "v2"
}, {
"map": "PQ.code, MO.currency, PQ.translation.code",
"identity": "rim"
} ],
"type": [ {
"code": "code"
} ],
"binding": {
"strength": "preferred",
"valueSet": "http://fhir.ch/ig/ch-term/ValueSet/UnitCode"
},
"max": "1",
"id": "Quantity.code",
"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.",
"base": {
"max": "1",
"min": 0,
"path": "Quantity.code"
},
"isSummary": true
} ]
},
"status": "active",
"id": "c17d7e7e-b9b2-4af6-b0fd-df0e3d293988",
"kind": "complex-type",
"url": "http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units",
"version": "5.0.0",
"differential": {
"element": [ {
"id": "Quantity.value",
"min": 1,
"path": "Quantity.value"
}, {
"id": "Quantity.unit",
"min": 1,
"path": "Quantity.unit"
}, {
"id": "Quantity.system",
"min": 1,
"path": "Quantity.system"
}, {
"id": "Quantity.code",
"min": 1,
"path": "Quantity.code",
"binding": {
"strength": "preferred",
"valueSet": "http://fhir.ch/ig/ch-term/ValueSet/UnitCode"
}
} ]
},
"contact": [ {
"name": "HL7 Switzerland",
"telecom": [ {
"value": "https://www.hl7.ch/",
"system": "url"
} ]
}, {
"name": "HL7 Switzerland",
"telecom": [ {
"use": "work",
"value": "https://www.hl7.ch/",
"system": "url"
} ]
} ],
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
}