{
  "resourceType": "StructureDefinition",
  "id": "ncdhc-observation-birth-length",
  "url": "http://hl7.org.au/fhir/StructureDefinition/ncdhc-observation-birth-length",
  "version": "r1.0.0",
  "name": "NCDHCBirthlengthObservationProfile",
  "title": "NCDHC Birth Length",
  "status": "draft",
  "date": "2018-12-21",
  "publisher": "National Children's Digital Health Collaborative (NCDHC)",
  "description": "Represents length of baby recorded at birth",
  "purpose": "Length of baby recorded at birth",
  "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": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "short": "NCDHC Birth Length Observation Profile",
        "definition": "Represents length of baby recorded at birth",
        "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)"
          }
        ]
      },
      {
        "id": "Observation.status",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
            "valueString": "default: final"
          }
        ],
        "path": "Observation.status",
        "mustSupport": true
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "short": "Code to represent Birth length",
        "mustSupport": true,
        "binding": {
          "strength": "preferred"
        }
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "closed"
        },
        "min": 1
      },
      {
        "id": "Observation.code.coding:birthLengthSNOMED-CT",
        "path": "Observation.code.coding",
        "sliceName": "birthLengthSNOMED-CT",
        "max": "1",
        "patternCoding": {
          "system": "http://snomed.info/sct",
          "code": "169886007"
        }
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "short": "Reference to the Baby Patient",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/ch/v1/StructureDefinition/ncdhc-patient-baby",
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.effective[x]:effectiveDateTime",
        "path": "Observation.effectiveDateTime",
        "sliceName": "effectiveDateTime",
        "min": 1,
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "min": 1
      },
      {
        "id": "Observation.value[x]:valueQuantity",
        "path": "Observation.valueQuantity",
        "sliceName": "valueQuantity",
        "short": "Vital Sign Value recorded with UCUM",
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
          }
        }
      },
      {
        "id": "Observation.value[x]:valueQuantity.value",
        "path": "Observation.valueQuantity.value",
        "min": 1
      },
      {
        "id": "Observation.value[x]:valueQuantity.system",
        "path": "Observation.valueQuantity.system",
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "Observation.value[x]:valueQuantity.code",
        "path": "Observation.valueQuantity.code",
        "binding": {
          "strength": "required",
          "description": "Coded responses from the common UCUM units for vital signs value set.",
          "valueSetUri": "http://hl7.org/fhir/ValueSet/ucum-bodylength"
        }
      },
      {
        "id": "Observation.comment",
        "path": "Observation.comment",
        "short": "System represents the user provided 'days' in weeks and days",
        "comment": "The server may represent the input Quantity into weeks and days"
      }
    ]
  }
}