{
  "resourceType": "StructureDefinition",
  "id": "94d3f606-acc3-48b0-9e46-16afd3e2ee72",
  "meta": {
    "lastUpdated": "2018-02-05T14:27:43.857+00:00"
  },
  "url": "http://devices.fhir.org/StructureDefinition/NumericObservation",
  "name": "NumericObservation",
  "title": "Numeric Observation Profile",
  "status": "draft",
  "date": "2017-11-25T09:06:04.018+00:00",
  "description": "StructureDefinition for a Numeric Observation resource",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "constraint": [
          {
            "key": "pocd-obs-1",
            "severity": "error",
            "human": "If there is no value a dataAbsentReason shall be present",
            "expression": "value.exists() or dataAbsentReason.exists()"
          }
        ]
      },
      {
        "id": "Observation.extension",
        "path": "Observation.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.extension:measurementStatus",
        "path": "Observation.extension",
        "sliceName": "measurementStatus",
        "short": "Measurement status",
        "definition": "The Measurement Status extension provides more detailed status information about observed values. It gets a code from the Measurement Status value set.",
        "type": [
          {
            "code": "Extension",
            "profile": "http://devices.fhir.org/StructureDefinition/observation-measurement-status"
          }
        ]
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "short": "Numeric type",
        "definition": "Observation.code shall have a coding from the ISO/IEEE 11073 MDC metrics nomenclature. The Rosetta Terminology Mapping Management System (RTMMS) lists available codes. Depending on the type of measurement, the Vital Signs profiles may require an additional LOINC code."
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Observation.code.coding:11073MDC",
        "path": "Observation.code.coding",
        "sliceName": "11073MDC",
        "short": "11073 MDC code",
        "definition": "Code defined by the ISO/IEEE 11073-10101 Nomenclature",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.code.coding:11073MDC.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "urn:iso:std:iso:11073:10101"
      },
      {
        "id": "Observation.code.coding:11073MDC.code",
        "path": "Observation.code.coding.code",
        "min": 1
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "definition": "Observation.subject shall be present and refer to a Patient resource or PoC Device resource.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          },
          {
            "code": "Reference",
            "targetProfile": "http://devices.fhir.org/StructureDefinition/PoCDevice"
          }
        ]
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "definition": "Either Observation.valueQuantity or Observation.valueRatio or, if there is no value, Observation.dataAbsentReason shall be present. Values shall have a UCUM unit code.",
        "type": [
          {
            "code": "Quantity"
          },
          {
            "code": "Ratio"
          }
        ]
      },
      {
        "id": "Observation.value[x]:valueQuantity",
        "path": "Observation.value[x]",
        "sliceName": "valueQuantity",
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "condition": [
          "pocd-obs-1"
        ]
      },
      {
        "id": "Observation.value[x]:valueQuantity.value",
        "path": "Observation.value[x].value",
        "min": 1
      },
      {
        "id": "Observation.value[x]:valueQuantity.system",
        "path": "Observation.value[x].system",
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.value[x]:valueRatio",
        "path": "Observation.value[x]",
        "sliceName": "valueRatio",
        "type": [
          {
            "code": "Ratio"
          }
        ],
        "condition": [
          "pocd-obs-1"
        ]
      },
      {
        "id": "Observation.value[x]:valueRatio.numerator.value",
        "path": "Observation.value[x].numerator.value",
        "min": 1
      },
      {
        "id": "Observation.value[x]:valueRatio.numerator.system",
        "path": "Observation.value[x].numerator.system",
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.value[x]:valueRatio.denominator.value",
        "path": "Observation.value[x].denominator.value",
        "min": 1
      },
      {
        "id": "Observation.value[x]:valueRatio.denominator.system",
        "path": "Observation.value[x].denominator.system",
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "condition": [
          "pocd-obs-1"
        ]
      },
      {
        "id": "Observation.device",
        "path": "Observation.device",
        "definition": "Observation.device shall be present and refer to the Numeric DeviceMetric resource where this observation belongs to.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://devices.fhir.org/StructureDefinition/NumericDeviceMetric"
          }
        ]
      }
    ]
  }
}