<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="lra-notification-communicationrequest" />
  <url value="http://phsa.ca/fhir/StructureDefinition/lra-notification-communicationrequest" />
  <version value="1.0.0-draft" />
  <name value="LRANotificationCommunicationRequest" />
  <title value="LRA Notification CommunicationRequest" />
  <status value="draft" />
  <experimental value="false" />
  <date value="2026-05-14" />
  <publisher value="Longitudinal Record Access (LRA)" />
  <description value="CommunicationRequest used by Health Gateway to request a patient notification by SMS and/or email for a referenced document." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="CommunicationRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/CommunicationRequest" />
  <derivation value="constraint" />
  <differential>
    <element id="CommunicationRequest">
      <path value="CommunicationRequest" />
    </element>
    <element id="CommunicationRequest.identifier">
      <path value="CommunicationRequest.identifier" />
      <short value="Health Gateway order identifier" />
      <min value="1" />
      <max value="*" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.identifier.system">
      <path value="CommunicationRequest.identifier.system" />
      <min value="1" />
      <max value="1" />
      <fixedUri value="https://healthgateway.gov.bc.ca/identifiers/order" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.identifier.value">
      <path value="CommunicationRequest.identifier.value" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.status">
      <path value="CommunicationRequest.status" />
      <min value="1" />
      <max value="1" />
      <fixedCode value="active" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.category">
      <path value="CommunicationRequest.category" />
      <short value="Notification type" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Allowed notification type codes." />
        <valueSet value="http://phsa.ca/fhir/ValueSet/lra-notification-type" />
      </binding>
    </element>
    <element id="CommunicationRequest.category.coding">
      <path value="CommunicationRequest.category.coding" />
      <min value="1" />
      <max value="*" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.category.coding.system">
      <path value="CommunicationRequest.category.coding.system" />
      <min value="1" />
      <max value="1" />
      <fixedUri value="http://phsa.ca/fhir/CodeSystem/notification-type" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.category.coding.code">
      <path value="CommunicationRequest.category.coding.code" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.priority">
      <path value="CommunicationRequest.priority" />
      <min value="1" />
      <max value="1" />
      <fixedCode value="routine" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.medium">
      <path value="CommunicationRequest.medium" />
      <short value="Notification channel: SMS and/or email" />
      <min value="1" />
      <max value="*" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Allowed notification media for LRA notification requests." />
        <valueSet value="http://phsa.ca/fhir/ValueSet/lra-notification-medium" />
      </binding>
    </element>
    <element id="CommunicationRequest.medium.coding">
      <path value="CommunicationRequest.medium.coding" />
      <min value="1" />
      <max value="*" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.medium.coding.system">
      <path value="CommunicationRequest.medium.coding.system" />
      <min value="1" />
      <max value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v3-ParticipationMode" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.medium.coding.code">
      <path value="CommunicationRequest.medium.coding.code" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.subject">
      <path value="CommunicationRequest.subject" />
      <short value="Patient who is the subject of the notification request" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://phsa.ca/fhir/StructureDefinition/lra-notification-patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.about">
      <path value="CommunicationRequest.about" />
      <short value="Document the notification is about" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://phsa.ca/fhir/StructureDefinition/lra-notification-documentreference" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.authoredOn">
      <path value="CommunicationRequest.authoredOn" />
      <short value="Request creation timestamp" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.recipient">
      <path value="CommunicationRequest.recipient" />
      <short value="Patient notification recipient" />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://phsa.ca/fhir/StructureDefinition/lra-notification-patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.sender">
      <path value="CommunicationRequest.sender" />
      <short value="System or organization sending the notification request" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="CommunicationRequest.sender.display">
      <path value="CommunicationRequest.sender.display" />
      <min value="1" />
      <max value="1" />
      <fixedString value="Health Gateway" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>