{
  "resourceType": "StructureDefinition",
  "id": "ncdhc-observation-base-dphr",
  "url": "http://hl7.org.au/fhir/ch/v1/StructureDefinition/ncdhc-observation-base-dphr",
  "version": "r1.0.0",
  "name": "DPHRBaseObservationProfile",
  "title": "DPHR Base Observation",
  "status": "draft",
  "date": "2019-03-01",
  "publisher": "National Children's Digital Health Collaborative (NCDHC)",
  "description": "Base profile for DPHR Observation",
  "purpose": "To define DPHR base Observation profile",
  "copyright": "Copyright © 2019 Australian Digital Health Agency - All rights reserved. This content is licensed under a Creative Commons Attribution 4.0 International License. See https://creativecommons.org/licenses/by/4.0/",
  "fhirVersion": "3.0.2",
  "kind": "resource",
  "abstract": true,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "short": "NCDHC Observation Base Profile",
        "constraint": [
          {
            "key": "ncdhc-obs-1",
            "severity": "error",
            "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
            "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
            "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
          },
          {
            "key": "inv-obs-exm-pract-001",
            "requirements": "Person who is clinically responsible for the undertaking of the exam shall be present",
            "severity": "error",
            "human": "Person who is clinically responsible for the undertaking of the exam shall be present",
            "expression": "performer.reference.resolve().where($this is Practitioner).exists()"
          },
          {
            "key": "inv-obs-exm-org-002",
            "requirements": "An organisation which captures the relevant details shall be present",
            "severity": "error",
            "human": "An organisation which captures the relevant details shall be present",
            "expression": "performer.reference.resolve().where($this is Organization).exists()"
          }
        ]
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "mustSupport": true
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "description": "Codes for high level observation categories. This is mainly used to associate an Observation instance to a particular Health Interaction (as applicable)",
          "valueSetReference": {
            "reference": "http://hl7.org.au/fhir/ch/v1/ValueSet/ncdhc-observation-category-1"
          }
        }
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/ch/v1/StructureDefinition/ncdhc-patient-baby"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.effective[x]:effectiveDateTime",
        "path": "Observation.effectiveDateTime",
        "sliceName": "effectiveDateTime",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "short": "Person and Organisation who is clinically responsible for the undertaking of the examination/assessment",
        "min": 2,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-organisation"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-practitioner"
          }
        ]
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "valueSetReference": {
            "reference": "http://hl7.org.au/fhir/ch/v1/ValueSet/ncdhc-observation-valueabsentreason-1"
          }
        }
      },
      {
        "id": "Observation.comment",
        "path": "Observation.comment",
        "short": "Additional comments",
        "comment": "Additional Information"
      }
    ]
  }
}