<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="practitionerRole-ca-core" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="2" />
  </extension>
  <url value="http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/practitionerRole-ca-core" />
  <version value="1.1.0" />
  <name value="PractitionerRoleCACore" />
  <title value="PractitionerRole (CA-Core)" />
  <status value="active" />
  <experimental value="false" />
  <date value="2025-03-04" />
  <publisher value="Canada Health Infoway" />
  <contact>
    <name value="National Standards Release Centre" />
    <telecom>
      <system value="url" />
      <value value="http://www.infoway-inforoute.ca" />
    </telecom>
    <telecom>
      <system value="email" />
      <value value="standards@infoway-inforoute.ca" />
    </telecom>
  </contact>
  <description value="This profile applies constraints to the PractitionerRole resource for CA Core+ to support assignment of providers to roles, specialties, and organizations in the pan-Canadian context." />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="CA" />
    </coding>
  </jurisdiction>
  <copyright value="Copyright © 2025+ Canada Health Infoway. All rights reserved. [Terms of Use and License Agreements](https://ic.infoway-inforoute.ca/en/about/tou). [Privacy Policy](https://www.infoway-inforoute.ca/en/legal/privacy-policy)." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="CACDI" />
    <name value="Canadian Core Data for Interoperability (CACDI)" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="PractitionerRole" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
  <derivation value="constraint" />
  <differential>
    <element id="PractitionerRole">
      <path value="PractitionerRole" />
      <constraint>
        <key value="ca-core-practrole-1" />
        <severity value="error" />
        <human value="At least one of practitioner, organization, specialty or code SHALL be present." />
        <expression value="practitioner.exists() or organization.exists() or code.exists() or specialty.exists()" />
        <xpath value="f:practitioner or f:organization or f:code or f:specialty" />
        <source value="http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/practitionerRole-ca-core" />
      </constraint>
    </element>
    <element id="PractitionerRole.identifier">
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="MAY:populate-if-known" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/ca-core/ActorDefinition/producer" />
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
          <valueCode value="SHALL:no-error" />
        </extension>
        <extension url="actor">
          <valueCanonical value="http://fhir.infoway-inforoute.ca/ca-core/ActorDefinition/consumer" />
        </extension>
      </extension>
      <path value="PractitionerRole.identifier" />
    </element>
    <element id="PractitionerRole.identifier.value">
      <path value="PractitionerRole.identifier.value" />
      <mapping>
        <identity value="CACDI" />
        <map value="Health Care Provider Organization Affiliation Employee Identifier" />
      </mapping>
    </element>
    <element id="PractitionerRole.identifier.period.start">
      <path value="PractitionerRole.identifier.period.start" />
      <mapping>
        <identity value="CACDI" />
        <map value="Health Care Provider Organization Affiliation Effective Date" />
      </mapping>
    </element>
    <element id="PractitionerRole.identifier.period.end">
      <path value="PractitionerRole.identifier.period.end" />
      <mapping>
        <identity value="CACDI" />
        <map value="Health Care Provider Organization Affiliation Expiry Date" />
      </mapping>
    </element>
    <element id="PractitionerRole.period.start">
      <path value="PractitionerRole.period.start" />
      <mapping>
        <identity value="CACDI" />
        <map value="Health Care Provider-as-Affiliate Type Effective Date (Recommended)" />
      </mapping>
    </element>
    <element id="PractitionerRole.period.end">
      <path value="PractitionerRole.period.end" />
      <mapping>
        <identity value="CACDI" />
        <map value="Health Care Provider-as-Affiliate Type Expiry Date (Recommended)" />
      </mapping>
    </element>
    <element id="PractitionerRole.practitioner">
      <path value="PractitionerRole.practitioner" />
      <comment value="pCHDCF modelling for care team concepts (including provider/practitionerRole/organization linking) is still underway. The requirements to support a linkage to provider details on practitionerRole for various use cases is still undefined. Reviewers are encouraged to provide feedback on the potential impact of applying a 'no-error' obligation on this element for clients. The profile will continue to evolve as care team details undergo data modelling in the pCHDCF." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/practitioner-ca-core" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
      </type>
    </element>
    <element id="PractitionerRole.organization">
      <path value="PractitionerRole.organization" />
      <comment value="pCHDCF modelling for care team concepts (including provider/practitionerRole/organization linking) is still underway. The requirements to support a linkage to organization details on practitionerRole for various use cases is still undefined. For this reason, application of obligations and further constraints towards this element are not currently expressed in this profile. Reviewers are encouraged to provide feedback on the potential impact of applying a 'no-error' obligation on this element for clients. The profile will continue to evolve as care team details undergo data modelling in the pCHDCF." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.infoway-inforoute.ca/cacore/StructureDefinition/organization-ca-core" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
    </element>
    <element id="PractitionerRole.code">
      <path value="PractitionerRole.code" />
      <comment value="pCHDCF modelling for care team concepts is still underway. The requirements to support specialty and expertise details on practitionerRole for various use cases are still undefined.  Reviewers are encouraged to provide feedback on the potential impact of applying a 'no-error' obligation on this element for clients. The profile will continue to evolve as care team details undergo data modelling in the pCHDCF." />
      <binding>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="https://fhir.infoway-inforoute.ca/ValueSet/healthcareproviderroletype" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="A role type that is used to categorize an entity that delivers health care" />
          </extension>
        </extension>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/healthcareproviderrolecode" />
      </binding>
      <mapping>
        <identity value="CACDI" />
        <map value="Health Care Provider Role" />
      </mapping>
      <mapping>
        <identity value="CACDI" />
        <map value="Health Care Provider Type Code" />
      </mapping>
    </element>
    <element id="PractitionerRole.specialty">
      <path value="PractitionerRole.specialty" />
      <comment value="pCHDCF modelling for care team concepts is still underway. The requirements to support specialty and expertise details on practitionerRole for various use cases are still undefined. Reviewers are encouraged to provide feedback on the potential impact of applying a 'no-error' obligation on this element for clients. The profile will continue to evolve as care team details undergo data modelling in the pCHDCF." />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/healthcareproviderspecialtycode" />
      </binding>
    </element>
    <element id="PractitionerRole.telecom">
      <path value="PractitionerRole.telecom" />
      <comment value="Although the provider phone number and provider email concepts are expressed in the pCHDCF materials, their current definition does not distinctly identify the resource target(s) where it has to be applied (e.g., Practitioner vs PractitionerRole). Reviewers are encouraged to provide feedback on the potential impact of applying a 'no-error' obligation on this element for clients." />
    </element>
    <element id="PractitionerRole.telecom.value">
      <path value="PractitionerRole.telecom.value" />
      <mapping>
        <identity value="CACDI" />
        <map value="Contact Mechanism Value" />
      </mapping>
    </element>
    <element id="PractitionerRole.telecom.use">
      <path value="PractitionerRole.telecom.use" />
      <mapping>
        <identity value="CACDI" />
        <map value="Contact Mechanism Type Code" />
      </mapping>
      <mapping>
        <identity value="CACDI" />
        <map value="Health Care Provider Affiliation Contact Mechanism Purpose Code" />
      </mapping>
    </element>
    <element id="PractitionerRole.telecom.rank">
      <path value="PractitionerRole.telecom.rank" />
      <mapping>
        <identity value="CACDI" />
        <map value="Contact Mechanism Rank" />
      </mapping>
    </element>
    <element id="PractitionerRole.telecom.period.start">
      <path value="PractitionerRole.telecom.period.start" />
      <mapping>
        <identity value="CACDI" />
        <map value="Contact Mechanism Effective Date" />
      </mapping>
    </element>
    <element id="PractitionerRole.telecom.period.end">
      <path value="PractitionerRole.telecom.period.end" />
      <mapping>
        <identity value="CACDI" />
        <map value="Contact Mechanism Expiry Date" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>