<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="PractitionerRoleABeReC" />
  <url value="https://www.alberta.ca/fhir/aberec/StructureDefinition/PractitionerRoleABeReC" />
  <version value="1.1.0" />
  <name value="PractitionerRoleABeReC" />
  <title value="PractitionerRole (AB:eReC)" />
  <status value="draft" />
  <description value="This profile defines a set of constraints to the FHIR PractitionerRole resource for use in Alberta eReferral and eConsult (AB:eReC). It re-profiles the CA-eReC PractitionerRole profile and it includes constraints that represent the minimum expectations for the PractitionerRole resource when used in the AB:eReC." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="PractitionerRole" />
  <baseDefinition value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-PractitionerRole" />
  <derivation value="constraint" />
  <differential>
    <element id="PractitionerRole">
      <path value="PractitionerRole" />
      <comment value="PractitionerRole resources included in Alberta eReferral and eConsult Bundles have rules that certain attributes are not to be contained in PractitionerRole resources. These are mechanically enforced through invariants at the AB:eReC Bundle level." />
    </element>
    <element id="PractitionerRole.active">
      <path value="PractitionerRole.active" />
      <comment value="If PractitionerRole.active is populated it must always be Active at the time of patient referral and/or consult" />
      <patternBoolean value="true" />
    </element>
    <element id="PractitionerRole.practitioner">
      <path value="PractitionerRole.practitioner" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/aberec/StructureDefinition/PractitionerABeReC" />
      </type>
    </element>
    <element id="PractitionerRole.practitioner.identifier.type">
      <path value="PractitionerRole.practitioner.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.code">
      <path value="PractitionerRole.code" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://www.alberta.ca/fhir/ValueSet/provider-role-type-ab" />
      </binding>
    </element>
    <element id="PractitionerRole.specialty">
      <path value="PractitionerRole.specialty" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="PractitionerRole.location">
      <path value="PractitionerRole.location" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/aberec/StructureDefinition/LocationABeReC" />
      </type>
    </element>
    <element id="PractitionerRole.location.identifier.type">
      <path value="PractitionerRole.location.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>