<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-practitionerrole-registrytest" />
  <url value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitionerrole-registrytest" />
  <version value="0.0.1" />
  <name value="PractitionerRoleProfileRegistry" />
  <title value="PractitionerRole Profile (Provider Registry)" />
  <status value="draft" />
  <date value="2020-03-09" />
  <publisher value="HL7 Canada" />
  <description value="Proposed constraints and extensions on the PractitionerRole Resource for use by Provider Registry systems." />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="CA" />
      <display value="Canada" />
    </coding>
  </jurisdiction>
  <kind value="resource" />
  <abstract value="false" />
  <type value="PractitionerRole" />
  <baseDefinition value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitionerrole" />
  <derivation value="constraint" />
  <differential>
    <element id="PractitionerRole">
      <path value="PractitionerRole" />
      <short value="PractitionerRole Profile" />
      <definition value="The PractitionerRole Profile is based upon the CA Core FHIR PractitionerRole profile for general use" />
      <constraint>
        <key value="ca-baseline-pracRole-1" />
        <severity value="error" />
        <human value="PractitionerRole.code or PracitionerRole.specialty SHALL be present" />
        <expression value="code.exists() or specialty.exists()" />
        <xpath value="PracitionerRole.code or PracitionerRole.specialty" />
      </constraint>
    </element>
    <element id="PractitionerRole.extension">
      <path value="PractitionerRole.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="PractitionerRole.extension:status">
      <path value="PractitionerRole.extension" />
      <sliceName value="status" />
      <short value="Role status extension" />
      <definition value="Represents the defined possible states of the Role, as defined by the HL7v3 Role class state machine." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/ext-rolestatus" />
      </type>
      <isModifier value="true" />
      <isModifierReason value="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" />
    </element>
    <element id="PractitionerRole.extension:statusReason">
      <path value="PractitionerRole.extension" />
      <sliceName value="statusReason" />
      <short value="Role status reason extension" />
      <definition value="Represents the textual description for the possible states of the Role, as defined by the HL7v3 Role class state machine." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/ext-statusreason" />
      </type>
    </element>
    <element id="PractitionerRole.identifier">
      <path value="PractitionerRole.identifier" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.identifier.system">
      <path value="PractitionerRole.identifier.system" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.identifier.value">
      <path value="PractitionerRole.identifier.value" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.practitioner">
      <path value="PractitionerRole.practitioner" />
      <short value="Practitioner that is able to provide the defined services for the organization." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitioner" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.code">
      <path value="PractitionerRole.code" />
      <short value="HealthcareProviderRoleType" />
      <comment value="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 value="ca-baseline-pracRole-1" />
      <binding>
        <strength value="preferred" />
        <description value="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 value="https://fhir.infoway-inforoute.ca/ValueSet/healthcareproviderroletype" />
      </binding>
    </element>
    <element id="PractitionerRole.specialty">
      <path value="PractitionerRole.specialty" />
      <short value="PractitionerSpecialty" />
      <comment value="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 value="ca-baseline-pracRole-1" />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <description value="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 value="https://fhir.infoway-inforoute.ca/ValueSet/practitionerspecialty" />
      </binding>
    </element>
    <element id="PractitionerRole.telecom">
      <path value="PractitionerRole.telecom" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.telecom.system">
      <path value="PractitionerRole.telecom.system" />
      <min value="1" />
    </element>
    <element id="PractitionerRole.telecom.value">
      <path value="PractitionerRole.telecom.value" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>