PackagesCanonicalsLogsProblems
    Packages
    rs/hl7.fhir.us.core@6.0.0-ballot
    http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
description: This profile sets minimum expectations for the Organization resource to searching for and fetching an Organization associated with a patient or provider 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: USCoreOrganizationProfile
type: Organization
elements:
  identifier:
    mustSupport: true
    index: 0
    elements:
      system: {type: uri, mustSupport: true, index: 1}
      value: {type: string, mustSupport: true, index: 2}
    slicing:
      rules: open
      discriminator:
      - {path: $this, type: pattern}
      min: null
      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)'}
            short: National Provider Identifier (NPI)
            mustSupport: true
            pattern:
              type: Identifier
              value: {system: 'http://hl7.org/fhir/sid/us-npi'}
            type: Identifier
            index: 3
          max: 1
        CLIA:
          match: {system: 'urn:oid:2.16.840.1.113883.4.7'}
          schema:
            constraint:
              us-core-18: {human: CLIA number must be 10 digits with a letter "D" in third position, severity: error, expression: 'value.matches(''^[0-9]{2}D[0-9]{7}$'')'}
            short: Clinical Laboratory Improvement Amendments (CLIA) Number for laboratories
            mustSupport: false
            pattern:
              type: Identifier
              value: {system: 'urn:oid:2.16.840.1.113883.4.7'}
            type: Identifier
            index: 4
          max: 1
        NAIC:
          match: {system: 'urn:oid:2.16.840.1.113883.6.300'}
          schema:
            constraint:
              us-core-19: {human: NAIC must be 5 digits, severity: error, expression: 'value.matches(''^[0-9]{5}$'')'}
            short: NAIC Code
            mustSupport: false
            pattern:
              type: Identifier
              value: {system: 'urn:oid:2.16.840.1.113883.6.300'}
            type: Identifier
            index: 5
  active: {mustSupport: true, index: 6}
  name: {mustSupport: true, index: 7}
  telecom:
    mustSupport: true
    index: 8
    elements:
      system: {mustSupport: true, index: 9}
      value: {mustSupport: true, index: 10}
  address:
    mustSupport: true
    index: 11
    elements:
      line: {type: string, mustSupport: true, array: true, max: 4, index: 12}
      city: {type: string, mustSupport: true, index: 13}
      state:
        type: string
        binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/us/core/ValueSet/us-core-usps-state'}
        mustSupport: true
        index: 14
      postalCode: {type: string, short: US Zip Codes, mustSupport: true, index: 15}
      country: {type: string, mustSupport: true, index: 16}
package_version: 6.0.0-ballot
class: profile
kind: resource
url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
base: http://hl7.org/fhir/StructureDefinition/Organization
version: 6.0.0-ballot
required: [active, name]