{
  "resourceType": "StructureDefinition",
  "id": "profile-Observation-alert-update",
  "url": "https://bpcs.exchange/fhir/StructureDefinition/profile-Observation-alert-update",
  "name": "ObservationAlertUpdate",
  "title": "Observation Alerts and Special Handling Update Profile",
  "status": "active",
  "experimental": false,
  "description": "A profile for creating alert and special handling observations",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "BPCS",
      "name": "Internal BPCS API"
    }
  ],
  "kind": "resource",
  "abstract": true,
  "type": "Observation",
  "baseDefinition": "https://bpcs.exchange/fhir/StructureDefinition/profile-Observation-alert-base",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Observation.component:note",
        "path": "Observation.component",
        "sliceName": "note",
        "comment": "This is included on the initial update, but will not be returned in searches on the alert or special handling flags.  Instead, notes will be retrieved as part of the list of notes associated with the member or application.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.component:note.code",
        "path": "Observation.component.code",
        "short": "This is a 'note'",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://loinc.org",
              "code": "34109-9"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "Observation.component:note.value[x]",
        "path": "Observation.component.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "closed"
        },
        "short": "Note text",
        "min": 1,
        "type": [
          {
            "code": "string"
          },
          {
            "code": "boolean"
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "BPCS",
            "map": "ApplicationNoteDTO.note"
          }
        ]
      },
      {
        "id": "Observation.component:note.value[x]:valueBoolean",
        "path": "Observation.component.value[x]",
        "sliceName": "valueBoolean",
        "type": [
          {
            "code": "boolean"
          }
        ],
        "patternBoolean": true,
        "mustSupport": true
      },
      {
        "id": "Observation.component:note.value[x]:valueString",
        "path": "Observation.component.value[x]",
        "sliceName": "valueString",
        "type": [
          {
            "code": "string"
          }
        ],
        "mustSupport": true
      }
    ]
  }
}