<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://fhir.nhs.wales/StructureDefinition/CDR-Practitioner" />
  <name value="CDRPractitioner" />
  <status value="draft" />
  <description value="This profile defines the structure and constraints for the Practitioner resource within the context of the CDR (Clinical Data Repository) in Wales. It ensures that practitioners are uniquely identifiable through a professional registration identifier." />
  <purpose value="To provide a standardized representation of healthcare practitioners in the CDR, ensuring that each practitioner can be uniquely identified and linked to their professional registration." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Practitioner" />
  <baseDefinition value="https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Practitioner" />
  <derivation value="constraint" />
  <differential>
    <element id="Practitioner">
      <path value="Practitioner" />
      <constraint>
        <key value="cdr-practitioner-1" />
        <requirements value="The Practitioner SHALL contain exactly one professional registration identifier. This identifier provides the nationally recognised business identifier used by the CDR to uniquely identify and link practitioner records. The identifier SHALL be supplied using one of the approved professional registration identifier slices defined by this profile." />
        <severity value="error" />
        <human value="Exactly one professional registration identifier SHALL be provided: GDC, GMC, GMP, HCPC, NMC or GPHC" />
        <expression value="identifier.where( system = 'https://fhir.hl7.org.uk/Id/gdc-number' or   system = 'https://fhir.hl7.org.uk/Id/gmc-number' or system = 'https://fhir.hl7.org.uk/Id/gmp-number' or system = 'https://fhir.hl7.org.uk/Id/hcpc-number' or system = 'https://fhir.hl7.org.uk/Id/nmc-number' or system = 'https://fhir.hl7.org.uk/Id/gphc-number' ).count() = 1" />
      </constraint>
    </element>
  </differential>
</StructureDefinition>