PackagesCanonicalsLogsProblems
    Packages
    ch.fhir.ig.ch-emed-epr@2.0.0
    http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-time-quantity
{
  "description": "A quantity with a time unit (a duration)",
  "_filename": "StructureDefinition-ch-emed-epr-time-quantity.json",
  "package_name": "ch.fhir.ig.ch-emed-epr",
  "date": "2025-01-21T10:58:28+00:00",
  "derivation": "constraint",
  "publisher": "CARA",
  "fhirVersion": "4.0.1",
  "jurisdiction": [ {
    "coding": [ {
      "code": "CH",
      "system": "urn:iso:std:iso:3166",
      "display": "Switzerland"
    } ]
  } ],
  "name": "CHEMEDEPRTimeQuantity",
  "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": "Time Quantity",
  "package_version": "2.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": "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.",
      "isModifier": false,
      "short": "✕ This element is not supported",
      "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"
        } ]
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode": "draft"
      } ],
      "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": "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.",
      "isModifier": false,
      "short": "✕ This element is not supported",
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode": "draft"
      } ],
      "max": "*",
      "id": "Quantity.extension",
      "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())"
      }, {
        "key": "time-quantity-strict-positive",
        "human": "A time quantity shall have a strictly positive value",
        "source": "http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-time-quantity",
        "severity": "error",
        "expression": "$this > 0"
      }, {
        "key": "time-quantity-only-integer",
        "human": "A time quantity shall only have an integer value",
        "source": "http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-time-quantity",
        "severity": "error",
        "expression": "$this.toString().convertsToInteger()"
      } ],
      "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",
      "comment": "All modifiers SHALL be documented in the profile, in order to be usable.",
      "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"
      },
      "patternUri": "http://unitsofmeasure.org",
      "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": "required",
        "valueSet": "http://fhir.ch/ig/ch-emed-epr/ValueSet/ch-emed-epr-time-quantity-unit-code"
      },
      "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": "draft",
  "id": "b02d37d7-7d52-4246-9c82-a0656a6ecf0d",
  "kind": "complex-type",
  "url": "http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-time-quantity",
  "version": "2.0.0",
  "differential": {
    "element": [ {
      "id": "Quantity.id",
      "path": "Quantity.id",
      "short": "✕ This element is not supported",
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode": "draft"
      } ],
      "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",
      "path": "Quantity.extension",
      "short": "✕ This element is not supported",
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode": "draft"
      } ],
      "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": "time-quantity-strict-positive",
        "human": "A time quantity shall have a strictly positive value",
        "source": "http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-time-quantity",
        "severity": "error",
        "expression": "$this > 0"
      }, {
        "key": "time-quantity-only-integer",
        "human": "A time quantity shall only have an integer value",
        "source": "http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-time-quantity",
        "severity": "error",
        "expression": "$this.toString().convertsToInteger()"
      } ]
    }, {
      "id": "Quantity.comparator",
      "path": "Quantity.comparator",
      "comment": "...All modifiers SHALL be documented in the profile, in order to be usable."
    }, {
      "id": "Quantity.system",
      "path": "Quantity.system",
      "patternUri": "http://unitsofmeasure.org"
    }, {
      "id": "Quantity.code",
      "path": "Quantity.code",
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-emed-epr/ValueSet/ch-emed-epr-time-quantity-unit-code"
      }
    } ]
  },
  "contact": [ {
    "name": "CARA",
    "telecom": [ {
      "value": "https://www.cara.ch",
      "system": "url"
    } ]
  } ],
  "baseDefinition": "http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units"
}