<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="PractitionerRolePSAB" />
  <url value="https://www.alberta.ca/fhir/psab/StructureDefinition/PractitionerRolePSAB" />
  <version value="1.2.0" />
  <name value="PractitionerRolePSAB" />
  <title value="PractitionerRole (PS-AB)" />
  <status value="draft" />
  <description value="This profile defines a set of constraints to the FHIR PractitionerRole resource for use in Alberta Patient Summaries (PS-AB). It includes constraints that represent the minimum expectations for the PractitionerRole resource when used in the PS-AB Composition profile or in one of the referred resources." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="PractitionerRole" />
  <baseDefinition value="http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/practitionerrole-ca-ps" />
  <derivation value="constraint" />
  <differential>
    <element id="PractitionerRole">
      <path value="PractitionerRole" />
      <comment value="PractitionerRole resources included in Alberta Patient Summary Document Bundles have rules that certain attributes are not to be contained in PractitionerRole resource. These are mechanically enforced through invariants at the PS-AB 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 summary submission" />
      <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/psab/StructureDefinition/PractitionerPSAB" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.practitioner.reference">
      <path value="PractitionerRole.practitioner.reference" />
      <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/abcore/ValueSet/provider-role-type-ab" />
      </binding>
    </element>
    <element id="PractitionerRole.specialty">
      <path value="PractitionerRole.specialty" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.location">
      <path value="PractitionerRole.location" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/psab/StructureDefinition/LocationPSAB" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="PractitionerRole.location.reference">
      <path value="PractitionerRole.location.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>