{
  "resourceType": "StructureDefinition",
  "id": "profile-practitionerrole-registrytest",
  "url": "http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitionerrole-registrytest",
  "version": "0.0.1",
  "name": "PractitionerRoleProfileRegistry",
  "title": "PractitionerRole Profile (Provider Registry)",
  "status": "draft",
  "date": "2020-03-09",
  "publisher": "HL7 Canada",
  "description": "Proposed constraints and extensions on the PractitionerRole Resource for use by Provider Registry systems.",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "urn:iso:std:iso:3166",
          "code": "CA",
          "display": "Canada"
        }
      ]
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "PractitionerRole",
  "baseDefinition": "http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitionerrole",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "PractitionerRole",
        "path": "PractitionerRole",
        "short": "PractitionerRole Profile",
        "definition": "The PractitionerRole Profile is based upon the CA Core FHIR PractitionerRole profile for general use",
        "constraint": [
          {
            "key": "ca-baseline-pracRole-1",
            "severity": "error",
            "human": "PractitionerRole.code or PracitionerRole.specialty SHALL be present",
            "expression": "code.exists() or specialty.exists()",
            "xpath": "PracitionerRole.code or PracitionerRole.specialty"
          }
        ]
      },
      {
        "id": "PractitionerRole.extension",
        "path": "PractitionerRole.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "PractitionerRole.extension:status",
        "path": "PractitionerRole.extension",
        "sliceName": "status",
        "short": "Role status extension",
        "definition": "Represents the defined possible states of the Role, as defined by the HL7v3 Role class state machine.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/ca/baseline/StructureDefinition/ext-rolestatus"
            ]
          }
        ],
        "isModifier": true,
        "isModifierReason": "This element is labeled as a modifier because the status code may provide additional knowledge about the PractitionerRole resource that modifies its meaning or interpretation"
      },
      {
        "id": "PractitionerRole.extension:statusReason",
        "path": "PractitionerRole.extension",
        "sliceName": "statusReason",
        "short": "Role status reason extension",
        "definition": "Represents the textual description for the possible states of the Role, as defined by the HL7v3 Role class state machine.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/ca/baseline/StructureDefinition/ext-statusreason"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.identifier",
        "path": "PractitionerRole.identifier",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "PractitionerRole.identifier.system",
        "path": "PractitionerRole.identifier.system",
        "min": 1
      },
      {
        "id": "PractitionerRole.identifier.value",
        "path": "PractitionerRole.identifier.value",
        "min": 1
      },
      {
        "id": "PractitionerRole.practitioner",
        "path": "PractitionerRole.practitioner",
        "short": "Practitioner that is able to provide the defined services for the organization.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitioner"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "PractitionerRole.code",
        "path": "PractitionerRole.code",
        "short": "HealthcareProviderRoleType",
        "comment": "The binding strength of this element is [Preferred](https://www.hl7.org/fhir/terminologies.html#strength), meaning that codes are encouraged to draw from the HealthcareProviderRoleType code system for interoperability purposes but are not required to do so to be considered conformant.",
        "condition": [
          "ca-baseline-pracRole-1"
        ],
        "binding": {
          "strength": "preferred",
          "description": "A role type that is used to categorize an entity that delivers health care in an expected and professional manner to an entity in need of health care services. Examples: Registered Nurse, Chiropractor, Physician, Custodial Care Clinic.",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/healthcareproviderroletype"
        }
      },
      {
        "id": "PractitionerRole.specialty",
        "path": "PractitionerRole.specialty",
        "short": "PractitionerSpecialty",
        "comment": "The binding strength of this element is [Preferred](https://www.hl7.org/fhir/terminologies.html#strength), meaning that codes are encouraged to draw from the PractitionerSpecialty code system for interoperability purposes but are not required to do so to be considered conformant.",
        "condition": [
          "ca-baseline-pracRole-1"
        ],
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "description": "Defines the clinical, medical, surgical or other healthcare-related service specialty of a practitioner who interacts, treats or provides such services to or for a patient.",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/practitionerspecialty"
        }
      },
      {
        "id": "PractitionerRole.telecom",
        "path": "PractitionerRole.telecom",
        "mustSupport": true
      },
      {
        "id": "PractitionerRole.telecom.system",
        "path": "PractitionerRole.telecom.system",
        "min": 1
      },
      {
        "id": "PractitionerRole.telecom.value",
        "path": "PractitionerRole.telecom.value",
        "min": 1
      }
    ]
  }
}