PackagesCanonicalsLogsProblems
    Packages
    rs/hl7.fhir.us.core@6.0.0-ballot
    http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
description: This profile sets minimum expectations for the Practitioner resource to record, search, and fetch basic demographics and other administrative information about an individual practitioner to promote interoperability and adoption through common implementation.  It identifies which core elements, extensions, vocabularies, and value sets **SHALL** be present in the resource when using this profile.  It provides the floor for standards development for specific use cases.
package_name: rs/hl7.fhir.us.core
derivation: constraint
name: USCorePractitionerProfile
type: Practitioner
elements:
  identifier:
    mustSupport: true
    index: 0
    elements:
      system: {type: uri, mustSupport: true, index: 1}
      value: {type: string, mustSupport: true, index: 2}
    required: [system, value]
    slicing:
      rules: open
      discriminator:
      - {path: $this, type: pattern}
      min: 1
      slices:
        NPI:
          match: {system: 'http://hl7.org/fhir/sid/us-npi'}
          schema:
            constraint:
              us-core-16: {human: NPI must be 10 digits, severity: error, expression: 'value.matches(''^[0-9]{10}$'')'}
              us-core-17: {human: NPI check digit must be valid (Luhn algorithm check), severity: error, expression: '(((select(value.substring(0,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(value.substring(1,1).toInteger())+(select(value.substring(2,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(value.substring(3,1).toInteger())+(select(value.substring(4,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(value.substring(5,1).toInteger())+(select(value.substring(6,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(value.substring(7,1).toInteger())+(select(value.substring(8,1).toInteger()).select(iif($this<5, $this*2, (($this*2)-9))))+(value.substring(9,1).toInteger()) + 24)mod 10=0)'}
            mustSupport: true
            pattern:
              type: Identifier
              value: {system: 'http://hl7.org/fhir/sid/us-npi'}
            type: Identifier
            index: 3
          max: 1
  name:
    mustSupport: true
    index: 4
    elements:
      family: {type: string, mustSupport: true, index: 5}
    required: [family]
  telecom:
    mustSupport: true
    index: 6
    elements:
      system: {mustSupport: true, index: 7}
      value: {mustSupport: true, index: 8}
  address:
    short: Address(es) of the practitioner
    mustSupport: true
    index: 9
    elements:
      line: {type: string, mustSupport: true, array: true, max: 4, index: 10}
      city: {type: string, mustSupport: true, index: 11}
      state:
        type: string
        binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/us/core/ValueSet/us-core-usps-state'}
        mustSupport: true
        index: 12
      postalCode: {type: string, short: US Zip Codes, mustSupport: true, index: 13}
      country: {type: string, mustSupport: true, index: 14}
package_version: 6.0.0-ballot
class: profile
kind: resource
url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
base: http://hl7.org/fhir/StructureDefinition/Practitioner
version: 6.0.0-ballot
required: [identifier, name]