{
  "resourceType": "StructureDefinition",
  "version": "1.0.0-draft",
  "status": "draft",
  "experimental": false,
  "date": "2026-05-14",
  "publisher": "Longitudinal Record Access (LRA)",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "derivation": "constraint",
  "id": "lra-notification-messageheader",
  "url": "http://phsa.ca/fhir/StructureDefinition/lra-notification-messageheader",
  "name": "LRANotificationMessageHeader",
  "title": "LRA Notification MessageHeader",
  "description": "MessageHeader used to identify the Health Gateway notification request event and reference the notification CommunicationRequest.",
  "type": "MessageHeader",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MessageHeader",
  "differential": {
    "element": [
      {
        "id": "MessageHeader",
        "path": "MessageHeader"
      },
      {
        "id": "MessageHeader.event[x]",
        "path": "MessageHeader.event[x]",
        "short": "Notification request event",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "patternCoding": {
          "system": "http://phsa.ca/fhir/CodeSystem/notification-events",
          "code": "notification-request"
        },
        "mustSupport": true
      },
      {
        "id": "MessageHeader.destination",
        "path": "MessageHeader.destination",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MessageHeader.destination.endpoint",
        "path": "MessageHeader.destination.endpoint",
        "short": "LRA notification $process-message endpoint",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MessageHeader.source",
        "path": "MessageHeader.source",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MessageHeader.source.name",
        "path": "MessageHeader.source.name",
        "short": "Source system code",
        "min": 1,
        "max": "1",
        "fixedString": "HGW",
        "mustSupport": true
      },
      {
        "id": "MessageHeader.source.endpoint",
        "path": "MessageHeader.source.endpoint",
        "min": 1,
        "max": "1",
        "fixedUrl": "https://www.healthgateway.gov.bc.ca/",
        "mustSupport": true
      },
      {
        "id": "MessageHeader.focus",
        "path": "MessageHeader.focus",
        "short": "Reference to the notification CommunicationRequest",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phsa.ca/fhir/StructureDefinition/lra-notification-communicationrequest"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}