{
  "resourceType": "StructureDefinition",
  "id": "profile-DwPatient",
  "meta": {
    "lastUpdated": "2024-05-03T21:24:24.5432219+00:00"
  },
  "url": "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient",
  "version": "2.0.0",
  "name": "DwPatient",
  "status": "active",
  "date": "2026-05-29",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.id",
        "path": "Patient.id",
        "min": 1
      },
      {
        "id": "Patient.meta.lastUpdated",
        "path": "Patient.meta.lastUpdated",
        "mustSupport": true
      },
      {
        "id": "Patient.meta.source",
        "path": "Patient.meta.source",
        "mustSupport": true
      },
      {
        "id": "Patient.meta.security",
        "path": "Patient.meta.security",
        "mustSupport": true
      },
      {
        "id": "Patient.text",
        "path": "Patient.text",
        "mustSupport": true
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Patient.extension:genderIdentity",
        "path": "Patient.extension",
        "sliceName": "genderIdentity",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/patient-genderIdentity"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:genderIdentity.value[x].coding",
        "path": "Patient.extension.value[x].coding",
        "binding": {
          "strength": "preferred",
          "valueSet": "http://hl7.org/fhir/ValueSet/gender-identity"
        }
      },
      {
        "id": "Patient.extension:individualPronouns",
        "path": "Patient.extension",
        "sliceName": "individualPronouns",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/individual-pronouns"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:individualPronouns.extension:value",
        "path": "Patient.extension.extension",
        "sliceName": "value",
        "mustSupport": true
      },
      {
        "id": "Patient.extension:individualPronouns.extension:value.value[x].text",
        "path": "Patient.extension.extension.value[x].text",
        "mustSupport": true
      },
      {
        "id": "Patient.extension:patientReligion",
        "path": "Patient.extension",
        "sliceName": "patientReligion",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/patient-religion"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:patientReligion.value[x].coding",
        "path": "Patient.extension.value[x].coding",
        "binding": {
          "strength": "preferred",
          "valueSet": "http://terminology.hl7.org/ValueSet/v3-ReligiousAffiliation"
        }
      },
      {
        "id": "Patient.extension:patientReligion.value[x].coding.system",
        "path": "Patient.extension.value[x].coding.system",
        "min": 1,
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "http://terminology.hl7.org/ValueSet/v3-ReligiousAffiliation"
        }
      },
      {
        "id": "Patient.extension:patientReligion.value[x].coding.code",
        "path": "Patient.extension.value[x].coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.extension:patientReligion.value[x].coding.display",
        "path": "Patient.extension.value[x].coding.display",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.extension:patientReligion.value[x].coding.userSelected",
        "path": "Patient.extension.value[x].coding.userSelected",
        "mustSupport": true
      },
      {
        "id": "Patient.extension:patientReligion.value[x].text",
        "path": "Patient.extension.value[x].text",
        "mustSupport": true
      },
      {
        "id": "Patient.extension:ethnicity",
        "path": "Patient.extension",
        "sliceName": "ethnicity",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-Ethnicity"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:ethnicity.value[x].text",
        "path": "Patient.extension.value[x].text",
        "mustSupport": true
      },
      {
        "id": "Patient.extension:rosterStatus",
        "path": "Patient.extension",
        "sliceName": "rosterStatus",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-RosterStatus"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:rosterPeriod",
        "path": "Patient.extension",
        "sliceName": "rosterPeriod",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-RosterPeriod"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:rosterTerminationReason",
        "path": "Patient.extension",
        "sliceName": "rosterTerminationReason",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-RosterTerminationReason"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:patientStatus",
        "path": "Patient.extension",
        "sliceName": "patientStatus",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-PatientStatus"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:patientStatusDate",
        "path": "Patient.extension",
        "sliceName": "patientStatusDate",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-PatientStatusDate"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "type.coding"
            }
          ],
          "rules": "open"
        },
        "definition": "A patient resource may have multiple identifier namely Patient number assigned by the EMR and Health Card number  \r\nUse slicing here",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:MRN",
        "path": "Patient.identifier",
        "sliceName": "MRN",
        "short": "Medical record number in sender system",
        "comment": "Patient id in the EMR",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:MRN.type",
        "path": "Patient.identifier.type",
        "min": 1
      },
      {
        "id": "Patient.identifier:MRN.type.coding",
        "path": "Patient.identifier.type.coding",
        "min": 1,
        "patternCoding": {
          "code": "MR",
          "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
          "display": "Medical Record Number"
        },
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:MRN.type.text",
        "path": "Patient.identifier.type.text",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:MRN.system",
        "path": "Patient.identifier.system",
        "comment": "urn:telus:emr:pss:9988:patientId\r\nIdentifier.system is always case sensitive.\n\nFollow the pattern urn:telus:emr:{emrType}:{emrInstanceId}:patientid or urn:telus:emr:{emrType}:{region}:{emrInstanceId}:patientid",
        "min": 1
      },
      {
        "id": "Patient.identifier:MRN.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "mustSupport": false
      },
      {
        "id": "Patient.identifier:JHN",
        "path": "Patient.identifier",
        "sliceName": "JHN",
        "short": "Jursidictional Health Number",
        "comment": "Federal or provincial Health number",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:JHN.extension:versionCode",
        "path": "Patient.identifier.extension",
        "sliceName": "versionCode",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/ca/baseline/StructureDefinition/ext-identifierversion"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:JHN.type",
        "path": "Patient.identifier.type",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:JHN.type.coding",
        "path": "Patient.identifier.type.coding",
        "min": 1,
        "patternCoding": {
          "code": "JHN",
          "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
          "display": "Jurisdictional health number"
        },
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:JHN.type.text",
        "path": "Patient.identifier.type.text",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:JHN.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:JHN.value",
        "path": "Patient.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.active",
        "path": "Patient.active",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "mustSupport": true
      },
      {
        "id": "Patient.name.use",
        "path": "Patient.name.use",
        "mustSupport": true
      },
      {
        "id": "Patient.name.text",
        "path": "Patient.name.text",
        "mustSupport": true
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "mustSupport": true
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "mustSupport": true
      },
      {
        "id": "Patient.name.prefix",
        "path": "Patient.name.prefix",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name.suffix",
        "path": "Patient.name.suffix",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "mustSupport": true
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "comment": "Deceased date will be provided where it approrpiately documented in the EMR. \r\nPSS - Only deceased status will be provided as PSS does not capture deceased date discreetly, it is documented in the status date field which is not always reliable. \r\nMA - Deceased status and date can be provided. Date will only be included for the patient whose status is deceased.",
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "mustSupport": true
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "comment": "Provide as text if available\n\nCHR - Marital status can be entered from Social History by selecting Living Environment and choosing the Marital Status.",
        "mustSupport": true
      },
      {
        "id": "Patient.contact",
        "path": "Patient.contact",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.relationship",
        "path": "Patient.contact.relationship",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://www.telus.com/health/fhir/dwemrextract/ValueSet/combined-relationship-codes"
        }
      },
      {
        "id": "Patient.contact.relationship.coding",
        "path": "Patient.contact.relationship.coding",
        "code": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode"
          },
          {
            "system": "http://terminology.hl7.org/CodeSystem/v2-0131"
          }
        ]
      },
      {
        "id": "Patient.contact.relationship.text",
        "path": "Patient.contact.relationship.text",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.name",
        "path": "Patient.contact.name",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.name.use",
        "path": "Patient.contact.name.use",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.name.text",
        "path": "Patient.contact.name.text",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.name.family",
        "path": "Patient.contact.name.family",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.name.given",
        "path": "Patient.contact.name.given",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.telecom",
        "path": "Patient.contact.telecom",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.period",
        "path": "Patient.contact.period",
        "mustSupport": true
      },
      {
        "id": "Patient.communication",
        "path": "Patient.communication",
        "comment": "Language(s) which may be used to communicate with the patient about their health. Use the 'preferred' flag to indicate the patient's preferred language.",
        "mustSupport": true
      },
      {
        "id": "Patient.communication.language",
        "path": "Patient.communication.language",
        "mustSupport": true
      },
      {
        "id": "Patient.communication.language.text",
        "path": "Patient.communication.language.text",
        "mustSupport": true
      },
      {
        "id": "Patient.communication.preferred",
        "path": "Patient.communication.preferred",
        "comment": "Set to true for the patient's preferred language for communication",
        "mustSupport": true
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "comment": "Usage note - Provider reference to the organization and the practitioner resource \r\nIf a patient has not been assigned a doctor at the clinic only provide reference to the organization resources (parent organization if there are more than 1)\r\nWhen a Primary MD/NP for that provider at that clinic is assigned provide reference to the sub-organization and the practitioner \r\n\r\nDiscuss further how/where to provide the referring and family providers outside of the clinic.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitioner",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitionerRole"
            ],
            "aggregation": [
              "referenced"
            ],
            "versioning": "independent"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "comment": "CHR - RBAC must be enabled",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization"
            ]
          }
        ]
      },
      {
        "id": "Patient.link",
        "path": "Patient.link",
        "comment": "Used to represent patient merge relationships. CHR sets link.type to 'replaced-by' on the source (archived/merged-away) patient to point to the surviving target patient.",
        "mustSupport": true
      },
      {
        "id": "Patient.link.other",
        "path": "Patient.link.other",
        "comment": "Reference to the surviving Patient resource.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient"
            ],
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy",
                "valueBoolean": false
              }
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.link.type",
        "path": "Patient.link.type",
        "comment": "Uses `replaced-by` on the source (merged-away) patient.",
        "mustSupport": true
      }
    ]
  }
}