{
  "resourceType": "StructureDefinition",
  "url": "https://fhir.nhs.wales/StructureDefinition/CDR-Practitioner",
  "name": "CDRPractitioner",
  "status": "draft",
  "description": "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": "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": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Practitioner",
  "baseDefinition": "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Practitioner",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Practitioner",
        "path": "Practitioner",
        "constraint": [
          {
            "key": "cdr-practitioner-1",
            "requirements": "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": "error",
            "human": "Exactly one professional registration identifier SHALL be provided: GDC, GMC, GMP, HCPC, NMC or GPHC",
            "expression": "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"
          }
        ]
      }
    ]
  }
}