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