{
  "resourceType": "StructureDefinition",
  "id": "profile-DwPractitioner",
  "meta": {
    "lastUpdated": "2024-06-10T14:18:22.4080067+00:00"
  },
  "url": "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitioner",
  "version": "2.0.0",
  "name": "DwPractitioner",
  "status": "active",
  "date": "2026-05-29",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Practitioner",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Practitioner",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Practitioner",
        "path": "Practitioner",
        "comment": "A practitioner may have multiple identifiers, namely internal userID and  provider ID issued by the EMR, Jurisdictional billing number, and License number."
      },
      {
        "id": "Practitioner.id",
        "path": "Practitioner.id",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Practitioner.meta.lastUpdated",
        "path": "Practitioner.meta.lastUpdated",
        "mustSupport": true
      },
      {
        "id": "Practitioner.meta.source",
        "path": "Practitioner.meta.source",
        "mustSupport": true
      },
      {
        "id": "Practitioner.meta.security",
        "path": "Practitioner.meta.security",
        "mustSupport": true
      },
      {
        "id": "Practitioner.text",
        "path": "Practitioner.text",
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier",
        "path": "Practitioner.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "type.coding"
            }
          ],
          "rules": "open",
          "ordered": false
        },
        "definition": "An identifier that applies to this person in this role. A practitioner may have multiple identifiers, namely userID and providerId issued by the EMR, and Jurisdictional billing number"
      },
      {
        "id": "Practitioner.identifier:UserId",
        "path": "Practitioner.identifier",
        "sliceName": "UserId",
        "definition": "EMR Identifier assigned to a person using the EMR instance. An identifier that applies to this person in this role.",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:UserId.type",
        "path": "Practitioner.identifier.type",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:UserId.type.coding",
        "path": "Practitioner.identifier.type.coding",
        "min": 1,
        "patternCoding": {
          "code": "EI",
          "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
          "display": "Employee number"
        },
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:UserId.type.text",
        "path": "Practitioner.identifier.type.text",
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:UserId.system",
        "path": "Practitioner.identifier.system",
        "definition": "Internal practitioners: urn:telus:emr:{emrType}:{region}:{emrInstanceId}:userid. External contact providers (HDT-900): urn:telus:emr:{emrType}:{region}:{emrInstanceId}:contactid.",
        "min": 1,
        "constraint": [
          {
            "key": "dw-practitioner-userid-system",
            "severity": "warning",
            "human": "UserId system must follow pattern urn:telus:emr:{emrType}:{instanceId}:userid or urn:telus:emr:{emrType}:{region}:{instanceId}:userid",
            "expression": "matches('urn:telus:emr:([^:]+:){2,3}[Uu][Ss][Ee][Rr][Ii][Dd]')",
            "source": "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitioner"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:UserId.value",
        "path": "Practitioner.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:ProviderId",
        "path": "Practitioner.identifier",
        "sliceName": "ProviderId",
        "definition": "Doctor number asigned by the EMR system. An identifier that applies to this person in this role.\r\nA doctor may have more than 1 ProviderID if they have multiple bill books.",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:ProviderId.extension",
        "path": "Practitioner.identifier.extension",
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:ProviderId.type",
        "path": "Practitioner.identifier.type",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:ProviderId.type.coding",
        "path": "Practitioner.identifier.type.coding",
        "min": 1,
        "patternCoding": {
          "code": "PRN",
          "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
          "display": "Provider number"
        },
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:ProviderId.type.text",
        "path": "Practitioner.identifier.type.text",
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:ProviderId.system",
        "path": "Practitioner.identifier.system",
        "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.\r\nFollow the pattern urn:telus:emr:{emrType}:{emrInstanceId}:providerid or urn:telus:emr:{emrType}:{region}:{emrInstanceId}:providerid",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:ProviderId.value",
        "path": "Practitioner.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:LicenseNumber",
        "path": "Practitioner.identifier",
        "sliceName": "LicenseNumber",
        "definition": "Professional license number issued by a licensing authority (e.g., College of Physicians and Surgeons)",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:LicenseNumber.use",
        "path": "Practitioner.identifier.use",
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:LicenseNumber.type",
        "path": "Practitioner.identifier.type",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:LicenseNumber.type.coding",
        "path": "Practitioner.identifier.type.coding",
        "min": 1,
        "patternCoding": {
          "code": "LN",
          "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
          "display": "License number"
        },
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:LicenseNumber.type.text",
        "path": "Practitioner.identifier.type.text",
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:LicenseNumber.system",
        "path": "Practitioner.identifier.system",
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:LicenseNumber.value",
        "path": "Practitioner.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Practitioner.identifier:LicenseNumber.assigner",
        "path": "Practitioner.identifier.assigner",
        "mustSupport": true
      },
      {
        "id": "Practitioner.active",
        "path": "Practitioner.active",
        "mustSupport": true
      },
      {
        "id": "Practitioner.name",
        "path": "Practitioner.name",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Practitioner.name.use",
        "path": "Practitioner.name.use",
        "mustSupport": true
      },
      {
        "id": "Practitioner.name.text",
        "path": "Practitioner.name.text",
        "mustSupport": true
      },
      {
        "id": "Practitioner.name.family",
        "path": "Practitioner.name.family",
        "comment": "Family Name may be decomposed into specific parts using extensions (de, nl, es related cultures).\r\n\r\nUsage note: Practitioner coming from MA and PSS will have family name in the extracts as they are required fields. The constraint on FHIR profile is open to allow other data sources that may not have family names as required field.",
        "mustSupport": true
      },
      {
        "id": "Practitioner.name.given",
        "path": "Practitioner.name.given",
        "example": [
          {
            "label": "Firstname",
            "valueString": "Angela"
          },
          {
            "label": "Middle name",
            "valueString": "Coffee"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Practitioner.name.prefix",
        "path": "Practitioner.name.prefix",
        "mustSupport": true
      },
      {
        "id": "Practitioner.name.suffix",
        "path": "Practitioner.name.suffix",
        "mustSupport": true
      },
      {
        "id": "Practitioner.telecom",
        "path": "Practitioner.telecom",
        "mustSupport": true
      },
      {
        "id": "Practitioner.telecom.system",
        "path": "Practitioner.telecom.system",
        "mustSupport": true
      },
      {
        "id": "Practitioner.telecom.value",
        "path": "Practitioner.telecom.value",
        "mustSupport": true
      },
      {
        "id": "Practitioner.telecom.use",
        "path": "Practitioner.telecom.use",
        "mustSupport": true
      },
      {
        "id": "Practitioner.address",
        "path": "Practitioner.address",
        "mustSupport": true
      },
      {
        "id": "Practitioner.address.use",
        "path": "Practitioner.address.use",
        "mustSupport": true
      },
      {
        "id": "Practitioner.address.type",
        "path": "Practitioner.address.type",
        "mustSupport": true
      },
      {
        "id": "Practitioner.address.text",
        "path": "Practitioner.address.text",
        "mustSupport": true
      },
      {
        "id": "Practitioner.address.line",
        "path": "Practitioner.address.line",
        "mustSupport": true
      },
      {
        "id": "Practitioner.address.city",
        "path": "Practitioner.address.city",
        "mustSupport": true
      },
      {
        "id": "Practitioner.address.state",
        "path": "Practitioner.address.state",
        "mustSupport": true
      },
      {
        "id": "Practitioner.address.postalCode",
        "path": "Practitioner.address.postalCode",
        "mustSupport": true
      },
      {
        "id": "Practitioner.address.country",
        "path": "Practitioner.address.country",
        "mustSupport": true
      }
    ]
  }
}