{
  "resourceType": "StructureDefinition",
  "id": "NCDEngagementObservation",
  "url": "https://fhir.inso-world.com/ncd-prevention-games/StructureDefinition/NCDEngagementObservation",
  "name": "NCDEngagementObservation",
  "title": "NCD Engagement Observation",
  "status": "draft",
  "description": "The Observation resource for engagement data",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "max": "0"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "engagement",
              "system": "https://fhir.inso-world.com/ncd-prevention-games/CodeSystem/NCDGamedataCode"
            }
          ]
        }
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.inso-world.com/ncd-prevention-games/StructureDefinition/NCDPatient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.focus",
        "path": "Observation.focus",
        "max": "0"
      },
      {
        "id": "Observation.encounter",
        "path": "Observation.encounter",
        "max": "0"
      },
      {
        "id": "Observation.issued",
        "path": "Observation.issued",
        "max": "0"
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "max": "0"
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "max": "0"
      },
      {
        "id": "Observation.method",
        "path": "Observation.method",
        "max": "0"
      },
      {
        "id": "Observation.specimen",
        "path": "Observation.specimen",
        "max": "0"
      },
      {
        "id": "Observation.referenceRange",
        "path": "Observation.referenceRange",
        "max": "0"
      },
      {
        "id": "Observation.hasMember",
        "path": "Observation.hasMember",
        "max": "0"
      },
      {
        "id": "Observation.derivedFrom",
        "path": "Observation.derivedFrom",
        "max": "0"
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "code"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Observation.component:engagement",
        "path": "Observation.component",
        "sliceName": "engagement",
        "min": 1,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Observation.component:engagement.code",
        "path": "Observation.component.code",
        "mustSupport": true
      },
      {
        "id": "Observation.component:engagement.value[x]",
        "path": "Observation.component.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Observation.component:engagement.value[x]:valueString",
        "path": "Observation.component.value[x]",
        "sliceName": "valueString",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.component:engagement.dataAbsentReason",
        "path": "Observation.component.dataAbsentReason",
        "max": "0",
        "mustSupport": true
      },
      {
        "id": "Observation.component:engagement.interpretation",
        "path": "Observation.component.interpretation",
        "max": "0",
        "mustSupport": true
      },
      {
        "id": "Observation.component:engagement.referenceRange",
        "path": "Observation.component.referenceRange",
        "max": "0",
        "mustSupport": true
      }
    ]
  }
}