{
  "resourceType": "StructureDefinition",
  "id": "ncdhc-observation-musculo-skeletal",
  "url": "http://hl7.org.au/fhir/ch/StructureDefinition/v1.0.0/ncdhc-observation-musculo-skeletal",
  "version": "v1.0.0",
  "name": "NCDHCMusculoSkeletalTestObservationProfile",
  "title": "NCDHC Musculo-Skeletal Test Observation",
  "status": "draft",
  "date": "2019-02-15",
  "publisher": "National Children's Digital Health Collaborative (NCDHC)",
  "description": "Outcome of Musculo-Skeletal Check (physical examination of the skeleton and muscle groups)",
  "purpose": "To record observations on Musculo-Skeletal",
  "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 Musculo-Skeletal Test Observation 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)"
          }
        ]
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "mustSupport": true
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.\r\n\r\nCWG: Discussion on the Category to match it with Composition.type",
        "max": "1",
        "patternCodeableConcept": {
          "text": ""
        },
        "mustSupport": true
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "code"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.code.coding:MusculoSkeletalSNOMED-CT",
        "path": "Observation.code.coding",
        "sliceName": "MusculoSkeletalSNOMED-CT",
        "min": 1,
        "max": "1",
        "patternCoding": {
          "system": "http://snomed.info/sct",
          "code": "164830005"
        }
      },
      {
        "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"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.effective[x]:effectiveDateTime",
        "path": "Observation.effectiveDateTime",
        "sliceName": "effectiveDateTime",
        "short": "Date when Musculo Skeletal assessment was performed",
        "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": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-practitioner"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-organisation"
          }
        ]
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "mustSupport": false
      },
      {
        "id": "Observation.value[x]:valueString",
        "path": "Observation.value[x]",
        "sliceName": "valueString",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Observation.value[x]:valueCodeableConcept",
        "path": "Observation.value[x]",
        "sliceName": "valueCodeableConcept",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "short": "Normal | Review | Refer",
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org.au/fhir/ch/v1/ValueSet/ncdhc-observation-interpretation-1"
          }
        }
      },
      {
        "id": "Observation.comment",
        "path": "Observation.comment",
        "short": "Additional comments",
        "comment": "Additional comments"
      }
    ]
  }
}