{
  "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-patient",
  "url": "http://phsa.ca/fhir/StructureDefinition/lra-notification-patient",
  "name": "LRANotificationPatient",
  "title": "LRA Notification Patient",
  "description": "Patient profile for the recipient of a Health Gateway notification request to LRA.",
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "constraint": [
          {
            "key": "lra-notif-pt-1",
            "severity": "error",
            "human": "Patient SHALL include at least one phone or email telecom.",
            "expression": "telecom.where(system = 'phone' or system = 'email').exists()"
          }
        ]
      },
      {
        "id": "Patient.id",
        "path": "Patient.id",
        "short": "Source-assigned logical id for the patient",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "min": 1,
        "max": "*",
        "mustSupport": true,
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Patient.identifier:phn",
        "path": "Patient.identifier",
        "sliceName": "phn",
        "short": "BC Personal Health Number",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:phn.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "max": "1",
        "fixedUri": "https://fhir.infoway-inforoute.ca/NamingSystem/ca-bc-patient-healthcare-id",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:phn.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "min": 1,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "short": "Patient phone and/or email for notification",
        "min": 1,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.system",
        "path": "Patient.telecom.system",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom.value",
        "path": "Patient.telecom.value",
        "min": 1,
        "max": "1",
        "mustSupport": true
      }
    ]
  }
}