{
"description": "This profile represents the constraint applied to the Quantity data type by the PS-CA project to use UCUM as the code system for units. Informed by the constraints of the [Quantity IPS-UV profile](http://hl7.org/fhir/uv/ips/StructureDefinition-Quantity-uv-ips.html).",
"_filename": "StructureDefinition-Quantity-ca-ps.json",
"package_name": "ca.infoway.io.psca",
"date": "2022-01-17T01:23:00-08:00",
"derivation": "constraint",
"publisher": "Canada Health Infoway",
"fhirVersion": "4.0.1",
"jurisdiction": [ {
"coding": [ {
"code": "CA",
"system": "urn:iso:std:iso:3166"
} ]
} ],
"name": "QuantityPSCA",
"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": "Copyright © 2021,2022 Canada Health Infoway. All rights reserved. [Terms of Use and License Agreements](https://ic.infoway-inforoute.ca/en/about/tou). [Privacy Policy](https://www.infoway-inforoute.ca/en/legal/privacy-policy).",
"type": "Quantity",
"experimental": "false",
"resourceType": "StructureDefinition",
"title": "Quantity (PS-CA)",
"package_version": "1.1.0-DFT-Ballot",
"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()"
} ],
"path": "Quantity",
"min": 0,
"definition": "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.\r\nThis profile imposes that the code system for units be UCUM.",
"isModifier": false,
"short": "A measured amount using UCUM",
"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": 0,
"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": "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.",
"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": "1",
"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": 0,
"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": "UCUM system for units",
"fixedUri": "http://unitsofmeasure.org",
"mapping": [ {
"map": "(see OBX.6 etc.) / CQ.2",
"identity": "v2"
}, {
"map": "CO.codeSystem, PQ.translation.codeSystem",
"identity": "rim"
} ],
"type": [ {
"code": "uri"
} ],
"mustSupport": true,
"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"
} ],
"mustSupport": true,
"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": "fa32bfd0-28a6-455d-8f46-2075b9989ce2",
"kind": "complex-type",
"url": "http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/Quantity-ca-ps",
"version": "1.0.0",
"differential": {
"element": [ {
"id": "Quantity",
"path": "Quantity",
"short": "A measured amount using UCUM",
"definition": "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.\r\nThis profile imposes that the code system for units be UCUM."
}, {
"id": "Quantity.system",
"min": 1,
"path": "Quantity.system",
"short": "UCUM system for units",
"fixedUri": "http://unitsofmeasure.org",
"mustSupport": true
}, {
"id": "Quantity.code",
"min": 1,
"path": "Quantity.code",
"mustSupport": true
} ]
},
"contact": [ {
"name": "National Standards Release Centre",
"telecom": [ {
"value": "http://www.infoway-inforoute.ca",
"system": "url"
}, {
"value": "standards@infoway-inforoute.ca",
"system": "email"
} ]
} ],
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Quantity"
}