PackagesCanonicalsLogsProblems
    Packages
    se.electronichealth.fhir.hvo.r5@0.1.3-alpha
    http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization
description: HVOOrganization holds information about corporations and sole traders.
package_name: se.electronichealth.fhir.hvo.r5
derivation: constraint
name: HVOOrganization
type: Organization
elements:
  name:
    short: Name of the organization according to Bolagsverket, Skatteverket or SCB.
    constraint:
      hvo-organization-name-1: {human: Name of Organization should have max length of 200 characters, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.length() <= 200}
    mustSupport: true
    index: 55
  type:
    binding: {strength: required, valueSet: 'http://electronichealth.se/hvo/ValueSet/hvo-organization-type'}
    mustSupport: true
    index: 45
    elements:
      coding:
        mustSupport: true
        index: 46
        elements:
          system: {mustSupport: true, index: 47}
          version: {mustSupport: true, index: 48}
          code: {mustSupport: true, index: 49}
        required: [code]
    required: [coding]
    slicing:
      rules: open
      ordered: false
      description: Slice on CodeableConcept based on the coding
      discriminator:
      - {path: coding, type: value}
      min: 1
      slices:
        careProvider:
          match:
            coding: {code: '143591000052106', system: 'http://snomed.info/sct', version: 'http://snomed.info/sct/45991000052106'}
          schema:
            binding: {strength: required, valueSet: 'http://electronichealth.se/hvo/ValueSet/hvo-organization-type'}
            mustSupport: true
            index: 50
            elements:
              coding:
                pattern:
                  type: Coding
                  value: {code: '143591000052106', system: 'http://snomed.info/sct', version: 'http://snomed.info/sct/45991000052106'}
                mustSupport: true
                index: 51
                elements:
                  system: {mustSupport: true, index: 52}
                  version: {mustSupport: true, index: 53}
                  code: {mustSupport: true, index: 54}
                required: [code]
            required: [coding]
  extension:
    index: 1
    slicing:
      rules: open
      ordered: false
      discriminator:
      - {path: url, type: value}
      min: 1
      slices:
        organizationActive:
          match: {url: null}
          schema:
            type: Extension
            mustSupport: true
            url: http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganizationActiveStatusExtension
            index: 2
            elements:
              url: {mustSupport: true, index: 3}
              value:
                short: 'The status which the organization is registered with in SCB:s Business Register (sv: Företagsregister), where true implies ''active'' and false implies ''inactive''.'
                mustSupport: true
                choices: []
                index: 5
            required: [value]
        legalForm:
          match: {url: null}
          schema:
            short: Extension for legal form of an organization.
            type: Extension
            mustSupport: true
            url: http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganizationLegalFormExtension
            index: 6
            elements:
              url: {mustSupport: true, index: 7}
              value:
                mustSupport: true
                choices: []
                index: 9
              value[x]:
                elements:
                  system: {mustSupport: true, index: 10}
                  code: {mustSupport: true, index: 11}
                required: [code]
            required: [value]
        ownershipType:
          match: {url: null}
          schema:
            type: Extension
            mustSupport: true
            url: http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganizationOwnershipExtension
            index: 12
            elements:
              url: {mustSupport: true, index: 13}
              value:
                mustSupport: true
                choices: []
                index: 15
              value[x]:
                elements:
                  system: {mustSupport: true, index: 16}
                  code: {mustSupport: true, index: 17}
                required: [code]
            required: [value]
        period:
          match: {url: null}
          schema:
            type: Extension
            mustSupport: true
            url: http://hl7.org/fhir/StructureDefinition/organization-period
            index: 18
            elements:
              url: {mustSupport: true, index: 19}
              value:
                mustSupport: true
                choices: []
                index: 21
              value[x]:
                elements:
                  start:
                    constraint:
                      hvo-dateTime-2: {human: DateTime should be submitted without timestamp, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.toString().contains('T') = false}
                    mustSupport: true
                    index: 22
                  end:
                    constraint:
                      hvo-dateTime-2: {human: DateTime should be submitted without timestamp, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.toString().contains('T') = false}
                    mustSupport: true
                    index: 23
        additionalRelationship:
          match: {url: null}
          schema:
            type: Extension
            mustSupport: true
            url: http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganizationAdditionalRelationshipExtension
            index: 24
            extensions:
              additionalRelationship:
                url: null
                mustSupport: true
                index: 25
                elements:
                  url: {mustSupport: true, index: 26}
                  value:
                    mustSupport: true
                    choices: []
                    index: 28
                required: [value]
              type:
                url: null
                mustSupport: true
                index: 29
                elements:
                  url: {mustSupport: true, index: 30}
                  value:
                    mustSupport: true
                    choices: []
                    index: 32
                  value[x]:
                    elements:
                      system: {mustSupport: true, index: 33}
                      code: {mustSupport: true, index: 34}
                    required: [system, code]
                required: [value]
            elements:
              extension:
                mustSupport: true
                index: 25
                slicing:
                  slices:
                    additionalRelationship:
                      match: {}
                      schema:
                        mustSupport: true
                        index: 25
                        elements:
                          url: {mustSupport: true, index: 26}
                          value:
                            mustSupport: true
                            choices: []
                            index: 28
                        required: [value]
                    type:
                      match: {}
                      schema:
                        mustSupport: true
                        index: 29
                        elements:
                          url: {mustSupport: true, index: 30}
                          value:
                            mustSupport: true
                            choices: []
                            index: 32
                          value[x]:
                            elements:
                              system: {mustSupport: true, index: 33}
                              code: {mustSupport: true, index: 34}
                            required: [system, code]
                        required: [value]
  alias:
    short: A name of the organization that is commonly used and is not the official name, e.g. an abbreviation of the official name.
    constraint:
      hvo-organization-alias-1: {human: Alias of Organization should have max length of 200 characters, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.length() <= 200}
    mustSupport: true
    index: 56
  id: {mustSupport: true, index: 0}
  identifier:
    short: The organization should contain at least an organization number if legal form is corporation or a personal identity number if legal form is sole trader. Can contain additional identifiers used in a national or local context.
    mustSupport: true
    index: 35
    slicing:
      rules: open
      ordered: false
      description: Slice identifier to express different kinds of identifiers
      discriminator:
      - {path: system, type: value}
      min: 1
      slices:
        hsaid:
          match: {system: 'urn:oid:1.2.752.29.4.19'}
          schema:
            mustSupport: true
            array: true
            index: 36
            elements:
              system:
                pattern: {type: Uri, value: 'urn:oid:1.2.752.29.4.19'}
                mustSupport: true
                index: 37
              value:
                constraint:
                  hvo-organization-hsa-identifier-value-1: {human: 'If identifier.system = urn:oid:1.2.752.29.4.19, value should have max length of 31 characters', source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.length() <= 31}
                  hvo-organization-hsa-identifier-value-2: {human: 'If identifier.system = urn:oid:1.2.752.29.4.19, value should follow format for HSA ID: SE1234567890-ABC1. Characters å, ä, ö, @ not valid.', source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: '$this.matches(''^SE[0-9]{10}-[A-za-z0-9]+$'')'}
                mustSupport: true
                index: 38
            required: [value, system]
        organizationIdentifier:
          match: {system: 'urn:oid:2.5.4.97'}
          schema:
            mustSupport: true
            index: 39
            elements:
              system:
                pattern: {type: Uri, value: 'urn:oid:2.5.4.97'}
                mustSupport: true
                index: 40
              value:
                constraint:
                  hvo-organization-identifier-value-1: {human: 'If identifier.system = urn:oid:2.5.4.97, value should follow format for organization identifier (sv: organisationsnummer): 1234567890', source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: '$this.matches(''^[0-9]{10}$'')'}
                mustSupport: true
                index: 41
            required: [value, system]
        personalIdentityNumber:
          match: {system: 'http://electronichealth.se/identifier/personnummer'}
          schema:
            mustSupport: true
            index: 42
            elements:
              system:
                pattern: {type: Uri, value: 'http://electronichealth.se/identifier/personnummer'}
                mustSupport: true
                index: 43
              value:
                constraint:
                  hvo-personal-identity-number-value-1: {human: A personal identity number should follow format 198001032385, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: '$this.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}$'')'}
                mustSupport: true
                index: 44
            required: [value, system]
  qualification:
    mustSupport: true
    index: 86
    elements:
      identifier:
        mustSupport: true
        index: 87
        elements:
          system: {mustSupport: true, index: 88}
          value: {mustSupport: true, index: 89}
        required: [value, system]
      code:
        mustSupport: true
        index: 90
        elements:
          coding:
            mustSupport: true
            index: 91
            elements:
              system: {mustSupport: true, index: 92}
              code: {mustSupport: true, index: 93}
            required: [system, code]
        required: [coding]
      period:
        mustSupport: true
        index: 94
        elements:
          start: {mustSupport: true, index: 95}
          end: {mustSupport: true, index: 96}
        required: [start]
    required: [identifier, period]
  partOf:
    type: Reference
    mustSupport: true
    refers: ['http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization']
    index: 85
  contact:
    mustSupport: true
    index: 57
    slicing:
      rules: open
      ordered: false
      description: Slice contact on whether it has a telecom (vs address)
      discriminator:
      - {path: telecom, type: exists}
      min: null
      slices:
        addressContact:
          match: {}
          schema:
            mustSupport: true
            array: true
            index: 58
            elements:
              purpose:
                binding: {strength: required, valueSet: 'http://electronichealth.se/hvo/ValueSet/hvo-contact-purpose'}
                mustSupport: true
                index: 59
                elements:
                  coding:
                    mustSupport: true
                    index: 60
                    elements:
                      system: {mustSupport: true, index: 61}
                      code: {mustSupport: true, index: 62}
                    required: [system, code]
                required: [coding]
              name: {mustSupport: true, index: 63}
              telecom: {index: 64}
              address:
                mustSupport: true
                index: 65
                elements:
                  line:
                    short: "Street name, number, direction & P.O. Box etc.\r\nThis repeating element order: The order in which lines should appear in an address label"
                    constraint:
                      hvo-address-line-1: {human: A line in an address should have max length of 128 characters, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.length() <= 128}
                    mustSupport: true
                    index: 66
                  city:
                    constraint:
                      hvo-address-city-1: {human: A city in an address should have a max length of 50 characters, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.length() <= 50}
                    mustSupport: true
                    index: 67
                  postalCode: {mustSupport: true, index: 68}
                  country: {mustSupport: true, index: 69}
              period:
                mustSupport: true
                index: 70
                elements:
                  start:
                    constraint:
                      hvo-dateTime-2: {human: DateTime should be submitted without timestamp, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.toString().contains('T') = false}
                    mustSupport: true
                    index: 71
                  end:
                    constraint:
                      hvo-dateTime-2: {human: DateTime should be submitted without timestamp, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.toString().contains('T') = false}
                    mustSupport: true
                    index: 72
                required: [start]
            required: [address, period, purpose]
        telecomContact:
          match: {}
          schema:
            mustSupport: true
            array: true
            index: 73
            elements:
              purpose:
                binding: {strength: required, valueSet: 'http://electronichealth.se/hvo/ValueSet/hvo-contact-purpose'}
                mustSupport: true
                index: 74
                elements:
                  coding:
                    mustSupport: true
                    index: 75
                    elements:
                      system: {mustSupport: true, index: 76}
                      code: {mustSupport: true, index: 77}
                    required: [system, code]
                required: [coding]
              telecom:
                constraint:
                  hvo-telecom-phone-2: {human: 'If telecom.system = phone or fax, value should have max length of 32 characters', source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: value.length() <= 32 or (system != 'phone' and system != 'fax')}
                  hvo-telecom-email-2: {human: 'If telecom.system = email, value should have max length of 255 characters', source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: value.length() <= 255 or system != 'email'}
                  hvo-telecom-url-1: {human: 'If telecom.system = url, value should follow valid format. Example: https://example.com', source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: 'value.matches(''(https?|ftp)://(-\\.)?([^\\s/?\\.#-]+\\.?)+(/[^\\s]*)?$'') or system != ''url'''}
                  hvo-telecom-url-2: {human: 'If telecom.system = url, value should have max length of 2000 characters', source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: value.length() <= 2000 or system != 'url'}
                  hvo-telecom-email-1: {human: 'If telecom.system = email, value should follow valid format Example: test@test.com', source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: 'value.matches(''^[\\w.-]{1,64}@(?!.{254})[\\w.-]+\\.[A-Za-z]{2,4}$'') or system != ''email'''}
                  hvo-telecom-phone-1: {human: 'If telecom.system = phone or fax, value should follow format +46123456789', source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: 'value.matches(''^\\+[1-9][0-9]+$'') or (system != ''phone'' and system != ''fax'')'}
                mustSupport: true
                index: 78
                elements:
                  system: {mustSupport: true, index: 79}
                  value:
                    constraint:
                      hvo-telecom-value-1: {human: A telecom value should have max length of 2000 characters, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.length() <= 2000}
                    mustSupport: true
                    index: 80
                required: [value, system]
              address: {index: 81}
              period:
                mustSupport: true
                index: 82
                elements:
                  start:
                    constraint:
                      hvo-dateTime-2: {human: DateTime should be submitted without timestamp, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.toString().contains('T') = false}
                    mustSupport: true
                    index: 83
                  end:
                    constraint:
                      hvo-dateTime-2: {human: DateTime should be submitted without timestamp, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.toString().contains('T') = false}
                    mustSupport: true
                    index: 84
                required: [start]
            required: [telecom, period, purpose]
package_version: 0.1.3-alpha
extensions:
  organizationActive:
    url: http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganizationActiveStatusExtension
    type: Extension
    mustSupport: true
    index: 2
    elements:
      url: {mustSupport: true, index: 3}
      value:
        short: 'The status which the organization is registered with in SCB:s Business Register (sv: Företagsregister), where true implies ''active'' and false implies ''inactive''.'
        mustSupport: true
        choices: []
        index: 5
    required: [value]
  legalForm:
    url: http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganizationLegalFormExtension
    short: Extension for legal form of an organization.
    type: Extension
    mustSupport: true
    index: 6
    elements:
      url: {mustSupport: true, index: 7}
      value:
        mustSupport: true
        choices: []
        index: 9
      value[x]:
        elements:
          system: {mustSupport: true, index: 10}
          code: {mustSupport: true, index: 11}
        required: [code]
    required: [value]
  ownershipType:
    url: http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganizationOwnershipExtension
    type: Extension
    mustSupport: true
    index: 12
    elements:
      url: {mustSupport: true, index: 13}
      value:
        mustSupport: true
        choices: []
        index: 15
      value[x]:
        elements:
          system: {mustSupport: true, index: 16}
          code: {mustSupport: true, index: 17}
        required: [code]
    required: [value]
  period:
    url: http://hl7.org/fhir/StructureDefinition/organization-period
    type: Extension
    mustSupport: true
    index: 18
    elements:
      url: {mustSupport: true, index: 19}
      value:
        mustSupport: true
        choices: []
        index: 21
      value[x]:
        elements:
          start:
            constraint:
              hvo-dateTime-2: {human: DateTime should be submitted without timestamp, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.toString().contains('T') = false}
            mustSupport: true
            index: 22
          end:
            constraint:
              hvo-dateTime-2: {human: DateTime should be submitted without timestamp, source: 'http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization', severity: error, expression: $this.toString().contains('T') = false}
            mustSupport: true
            index: 23
  additionalRelationship:
    url: http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganizationAdditionalRelationshipExtension
    type: Extension
    mustSupport: true
    index: 24
    extensions:
      additionalRelationship:
        url: null
        mustSupport: true
        index: 25
        elements:
          url: {mustSupport: true, index: 26}
          value:
            mustSupport: true
            choices: []
            index: 28
        required: [value]
      type:
        url: null
        mustSupport: true
        index: 29
        elements:
          url: {mustSupport: true, index: 30}
          value:
            mustSupport: true
            choices: []
            index: 32
          value[x]:
            elements:
              system: {mustSupport: true, index: 33}
              code: {mustSupport: true, index: 34}
            required: [system, code]
        required: [value]
    elements:
      extension:
        mustSupport: true
        index: 25
        slicing:
          slices:
            additionalRelationship:
              match: {}
              schema:
                mustSupport: true
                index: 25
                elements:
                  url: {mustSupport: true, index: 26}
                  value:
                    mustSupport: true
                    choices: []
                    index: 28
                required: [value]
            type:
              match: {}
              schema:
                mustSupport: true
                index: 29
                elements:
                  url: {mustSupport: true, index: 30}
                  value:
                    mustSupport: true
                    choices: []
                    index: 32
                  value[x]:
                    elements:
                      system: {mustSupport: true, index: 33}
                      code: {mustSupport: true, index: 34}
                    required: [system, code]
                required: [value]
class: profile
kind: resource
url: http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganization
base: http://hl7.org/fhir/StructureDefinition/Organization
version: 0.1.0
required: [name, extension, identifier, type]