PackagesCanonicalsLogsProblems
    Packages
    se.electronichealth.fhir.ppdr.r5@0.1.4-alpha
    http://electronichealth.se/fhir/NDI/StructureDefinition/organization-data-access
description: Profile for organization, organizational unit or EU country in a data access domain.
package_name: se.electronichealth.fhir.ppdr.r5
derivation: constraint
name: OrganizationDataAccess
type: Organization
elements:
  identifier:
    mustSupport: true
    index: 0
    slicing:
      rules: open
      ordered: false
      description: Slice on identifier based on system value
      discriminator:
      - {path: system, type: value}
      min: 1
      max: 1
      slices:
        organizationIdentifier:
          match: {system: 'urn:oid:2.5.4.97'}
          schema:
            mustSupport: true
            index: 1
            elements:
              system:
                pattern: {type: Uri, value: 'urn:oid:2.5.4.97'}
                mustSupport: true
                index: 2
              value:
                constraint:
                  ndi-organization-identifier-value-1: {human: 'A Swedish organization identifier (sv: organisationsnummer) should follow format 7999000057', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/organization-data-access', severity: error, expression: 'value.matches(''^\\d{6}\\d{4}$'') or system != ''urn:oid:2.5.4.97'''}
                mustSupport: true
                index: 3
            required: [value, system]
        hvoOrganizationalUnitId:
          match: {system: 'http://electronichealth.se/identifier/organizationalUnit'}
          schema:
            mustSupport: true
            index: 4
            elements:
              system:
                pattern: {type: Uri, value: 'http://electronichealth.se/identifier/organizationalUnit'}
                mustSupport: true
                index: 5
              value: {mustSupport: true, index: 6}
            required: [value, system]
        countryCode:
          match: {system: 'urn:iso:std:iso:3166'}
          schema:
            mustSupport: true
            index: 7
            elements:
              system:
                pattern: {type: Uri, value: 'urn:iso:std:iso:3166'}
                mustSupport: true
                index: 8
              value:
                binding: {strength: required, valueSet: 'http://terminology.hl7.org/ValueSet/v3-Country2'}
                mustSupport: true
                index: 9
            required: [value, system]
        personalIdentityNumber:
          match: {system: 'http://electronichealth.se/identifier/personnummer'}
          schema:
            mustSupport: true
            index: 10
            elements:
              system:
                pattern: {type: Uri, value: 'http://electronichealth.se/identifier/personnummer'}
                mustSupport: true
                index: 11
              value:
                constraint:
                  ndi-personal-identity-number-value-1: {human: 'A Swedish personal identity number (sv: personnummer) should follow format 198001032385', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/organization-data-access', severity: error, expression: 'value.matches(''^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\\d{4}$'') or system != ''http://electronichealth.se/identifier/personnummer'''}
                mustSupport: true
                index: 12
            required: [value, system]
        coordinationNumber:
          match: {system: 'http://electronichealth.se/identifier/samordningsnummer'}
          schema:
            mustSupport: true
            index: 13
            elements:
              system:
                pattern: {type: Uri, value: 'http://electronichealth.se/identifier/samordningsnummer'}
                mustSupport: true
                index: 14
              value:
                constraint:
                  ndi-coordination-number-value-1: {human: 'A Swedish coordination number (sv: samordningsnummer) should follow format 201903682399', source: 'http://electronichealth.se/fhir/NDI/StructureDefinition/organization-data-access', severity: error, expression: 'value.matches(''^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(0[1-9]|1[0-2])([6-9][1-9])\\d{4}$'') or system != ''http://electronichealth.se/identifier/samordningsnummer'''}
                mustSupport: true
                index: 15
            required: [value, system]
package_version: 0.1.4-alpha
class: profile
kind: resource
url: http://electronichealth.se/fhir/NDI/StructureDefinition/organization-data-access
base: http://hl7.org/fhir/StructureDefinition/Organization
version: 0.0.1
required: [identifier]