{
  "resourceType": "StructureDefinition",
  "id": "ObservationBodyHeightPSAB",
  "url": "https://www.alberta.ca/fhir/psab/StructureDefinition/ObservationBodyHeightPSAB",
  "version": "1.2.0",
  "name": "ObservationBodyHeightPSAB",
  "title": "Observation-BodyHeight (PS-AB)",
  "status": "draft",
  "description": "This profile defines a set of constraints to the FHIR Observation (BodyHeight) resource for use in Alberta Patient Summaries (PS-AB). It re-profiles the HL7 FHIR BodyHeight Profile and refines constraints applied to the Observation (BodyHeight) resource when used in the PS-AB Composition profile.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/bodyheight",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "comment": "Observation (Vital Sign) resources included in Alberta Patient Summary Document Bundles have rules that certain attributes are not to be contained in Observation (Vital Sign) resource. These are mechanically enforced through invariants at the PS-AB Bundle level."
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "comment": "Required for each measured observation value submitted",
        "patternCode": "final"
      },
      {
        "id": "Observation.category:VSCat",
        "path": "Observation.category",
        "sliceName": "VSCat",
        "sliceIsConstraining": true
      },
      {
        "id": "Observation.category:VSCat.coding.system",
        "path": "Observation.category.coding.system",
        "comment": "Fixed system value of 'http://terminology.hl7.org/CodeSystem/observation-category'"
      },
      {
        "id": "Observation.category:VSCat.coding.code",
        "path": "Observation.category.coding.code",
        "comment": "Fixed code value of 'vital-signs'"
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "min": 1
      },
      {
        "id": "Observation.code.coding:BodyHeightCode",
        "path": "Observation.code.coding",
        "sliceName": "BodyHeightCode",
        "sliceIsConstraining": true,
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding:BodyHeightCode.system",
        "path": "Observation.code.coding.system",
        "comment": "Fixed value of 'http://loinc.org",
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding:BodyHeightCode.code",
        "path": "Observation.code.coding.code",
        "comment": "Fixed value of '8302-2'",
        "mustSupport": true
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/psab/StructureDefinition/PatientPSAB"
            ]
          }
        ]
      },
      {
        "id": "Observation.subject.reference",
        "path": "Observation.subject.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "comment": "Required for each measured observation value submitted"
      },
      {
        "id": "Observation.effective[x]:effectiveDateTime",
        "path": "Observation.effective[x]",
        "sliceName": "effectiveDateTime",
        "comment": "YYYY-MM-DDThh:mm:ss[+|-]ZZ:ZZ  e.g.,: 1980-05-31T12:23:12-05:00",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/psab/StructureDefinition/PractitionerPSAB",
              "https://www.alberta.ca/fhir/psab/StructureDefinition/PractitionerRolePSAB",
              "https://www.alberta.ca/fhir/psab/StructureDefinition/PatientPSAB"
            ]
          }
        ]
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "min": 1
      },
      {
        "id": "Observation.value[x]:valueQuantity",
        "path": "Observation.value[x]",
        "sliceName": "valueQuantity",
        "comment": "If Body Height observation is submitted it shall have an observation value",
        "min": 1,
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.value[x]:valueQuantity.unit",
        "path": "Observation.value[x].unit",
        "comment": "Mandatory full text or abbreviation (e.g., ft, feet, in, inches, cm, centimeters, etc.)"
      },
      {
        "id": "Observation.hasMember",
        "path": "Observation.hasMember",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/psab/StructureDefinition/ObservationBMIPSAB",
              "https://www.alberta.ca/fhir/psab/StructureDefinition/ObservationBodyHeightPSAB",
              "https://www.alberta.ca/fhir/psab/StructureDefinition/ObservationBodyWeightPSAB",
              "https://www.alberta.ca/fhir/psab/StructureDefinition/ObservationHeadCircumPSAB"
            ]
          }
        ]
      }
    ]
  }
}