{
  "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-communicationrequest",
  "url": "http://phsa.ca/fhir/StructureDefinition/lra-notification-communicationrequest",
  "name": "LRANotificationCommunicationRequest",
  "title": "LRA Notification CommunicationRequest",
  "description": "CommunicationRequest used by Health Gateway to request a patient notification by SMS and/or email for a referenced document.",
  "type": "CommunicationRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/CommunicationRequest",
  "differential": {
    "element": [
      {
        "id": "CommunicationRequest",
        "path": "CommunicationRequest"
      },
      {
        "id": "CommunicationRequest.identifier",
        "path": "CommunicationRequest.identifier",
        "short": "Health Gateway order identifier",
        "min": 1,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.identifier.system",
        "path": "CommunicationRequest.identifier.system",
        "min": 1,
        "max": "1",
        "fixedUri": "https://healthgateway.gov.bc.ca/identifiers/order",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.identifier.value",
        "path": "CommunicationRequest.identifier.value",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.status",
        "path": "CommunicationRequest.status",
        "min": 1,
        "max": "1",
        "fixedCode": "active",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.category",
        "path": "CommunicationRequest.category",
        "short": "Notification type",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "description": "Allowed notification type codes.",
          "valueSet": "http://phsa.ca/fhir/ValueSet/lra-notification-type"
        }
      },
      {
        "id": "CommunicationRequest.category.coding",
        "path": "CommunicationRequest.category.coding",
        "min": 1,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.category.coding.system",
        "path": "CommunicationRequest.category.coding.system",
        "min": 1,
        "max": "1",
        "fixedUri": "http://phsa.ca/fhir/CodeSystem/notification-type",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.category.coding.code",
        "path": "CommunicationRequest.category.coding.code",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.priority",
        "path": "CommunicationRequest.priority",
        "min": 1,
        "max": "1",
        "fixedCode": "routine",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.medium",
        "path": "CommunicationRequest.medium",
        "short": "Notification channel: SMS and/or email",
        "min": 1,
        "max": "*",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "description": "Allowed notification media for LRA notification requests.",
          "valueSet": "http://phsa.ca/fhir/ValueSet/lra-notification-medium"
        }
      },
      {
        "id": "CommunicationRequest.medium.coding",
        "path": "CommunicationRequest.medium.coding",
        "min": 1,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.medium.coding.system",
        "path": "CommunicationRequest.medium.coding.system",
        "min": 1,
        "max": "1",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v3-ParticipationMode",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.medium.coding.code",
        "path": "CommunicationRequest.medium.coding.code",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.subject",
        "path": "CommunicationRequest.subject",
        "short": "Patient who is the subject of the notification request",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phsa.ca/fhir/StructureDefinition/lra-notification-patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.about",
        "path": "CommunicationRequest.about",
        "short": "Document the notification is about",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phsa.ca/fhir/StructureDefinition/lra-notification-documentreference"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.authoredOn",
        "path": "CommunicationRequest.authoredOn",
        "short": "Request creation timestamp",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.recipient",
        "path": "CommunicationRequest.recipient",
        "short": "Patient notification recipient",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phsa.ca/fhir/StructureDefinition/lra-notification-patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.sender",
        "path": "CommunicationRequest.sender",
        "short": "System or organization sending the notification request",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "CommunicationRequest.sender.display",
        "path": "CommunicationRequest.sender.display",
        "min": 1,
        "max": "1",
        "fixedString": "Health Gateway",
        "mustSupport": true
      }
    ]
  }
}