Importing and updating Organization information from SOR and FK-Organisation into eHealth Infrastructure

Importing and updating Organization information from SOR and FK-Organisation into eHealth Infrastructure

Introduction

The eHealth Infrastructure performs the import of organizations' information from Sundhedsvæsnets Organisationsregister (SOR) and KOMBIT Fælleskommunalt (FK) Organisation (formerly Støttesystemet Organisation (STS-ORG)) to the eHealth Infrastructure daily.

During the import, new or updated information in SOR and FK Organisation is updated in the eHealth Infrastructure.

A relationship between the FK Organization and the SOR-imported counterpart must be established.

This relationship can be established in two ways:

  1. The customers provide mapping as MS Excel files to the Systematic AO team, which then triggers the relationship being created.
    The customer provides the organisation relationship file(s) containing mappings between KOMBIT STS Organization and SOR identifiers. This input is provided to an operation in the eHealth system by SRE. The operation will then process the file line-by-line and establish the relevant related-to relationships in the FHIR Organization resources.

  2. FUT Infrastructure automatically creates the relationship during import from FK Organisation if the SOR code is available in FK Organisation.
    The Municipalities FK Organisation administrator registers the SOR kode in the FK Organisation system (as address of type SOR ID), and the FUT infrastructure will automatically create the relationship during import.

eHealth Infrastructure imports from Sundhedsvæsnets Organisationsregister (SOR)

The eHealth Infrastructure imports organization information from Sundhedsvæsnets Organisationsregister (SOR).

The import is based on a SOR XML data file generated nightly by SOR containing all organizations in SOR. The production data file is published at http://filer.nsi.dk/sor/data/sor/sorxml/v_3_0_0/Sor.zip .

The import occurs every night approximately 1 hour after SOR publishes the daily data file. See Automated Processing | Timerbased for when the import is performed.

The import excludes the organization tree below 'Sundhedsdatastyrelsen' (SOR Identifier 634491000016008), and all children found below that organization.

All non-excluded InstitutionOwner, HealthInstitution and OrganizationalUnit resources found in the data file are transformed into eHealth Organization resources and imported.

SOR’s production environment data is imported and used in all FUT environments (exttest, devenvcgi, test002 (education), pre-prod, production).

Data Mapping Overview

The import respects the address inheritance rules defined by SOR by copying the relevant addresses from parents if none is specified explicitly for a githe current organization.
The import also respects the EAN / GLN inheritance rules defined by SOR, by copying the relevant EAN / GLN, including period and status from parents, if EanLocationCodeOption.EanLocationCodeEntity.sor1:OnlyInternalIndicator is false. Note that if child organizations have their own EanLocationCodeOption.EanLocationCodeEntity.sor1:EanLocationCode, then that takes precedence.
The import does not copy other attributes and values from the parent, and the current organizations are imported as-is.

The following table explains how each of the attributes on the FHIR resource is mapped from the SOR data model.

See SOR XML Dokumentation (version 3.0.0) for a description of the SOR XML extract used as source.

See ehealth-organization for a description of the FHIR Organization model used for each imported organization (as destination).

FHIR Organization (profile ehealth-organization) element

Source from SOR

Description

FHIR Organization (profile ehealth-organization) element

Source from SOR

Description

id

N/A

Generated by FHIR server

meta.*

N/A

Generated by FHIR server

implicitRules

N/A

 

text

N/A

 

contained

N/A

 

extension

N/A

 

ehealth-organization-relatedTo

N/A

 

modifierExtension

N/A

 

identifier[0].use

 

Always set to official

identifier[0].type

N/A

 

identifier[0].system

 

Always set to SOR’s NamingSystem OID type value, 'urn:oid:1.2.208.176.1.1'

identifier[0].value

SorIdentifier

The SOR identifier is stored in eHealth Infrastructure

identifier[0].period.start

SorStatus.FirstFromDate

 

identifier[0].period.end

SorStatus.ToDate

 

identifier[0].assigner

N/A

 

active

Computed based on SorStatus.ToDate and SorStatus.FirstFromDate

Set to true when:

sor1:ToDate is not set or is in the future and sor1:FirstFromDate is not a future date.

Set to false when:

sor1:ToDate is in the past or sor1:FirstFromDate is a future date.

sor1:FirstFromDate is preferred over the sor1:FromDate as the sor1:FirstFromDate is used in SOR to set organizations active. sor1:FromDate is set when other data on the organization changes.

type

EntityTypeIdentifier

 

name

EntityName

 

alias

Concatenation of entityName from the top of the tree down to and including the current entity.

Example: For SorIdentifier=914571000016002 with the name "KOL Klinik" the constructed alias will be:

"Region Midtjylland, Aarhus Universitetshospital, Lungesygdomme, Lungesygdomme Klinik, KOL Klinik"

cvrNumber

CVRNumberIdentifier

 

If the SOR organization has a CVR number, it is stored.

Only if available on the current SOR entity. (no inheritance)

Source

 

 

 

Always set to SOR.

See Organization Source.

partOf

Calculated from ParentSorIdentifier

Relationships defining the organization trees are reflected in the Organization.partOf element.

FHIR id for the parent organization according to the SOR hierarchy.

telecom[n].value

  • VirtualAddressInformation.EmailAddressIdentifier

  • VirtualAddressInformation.Website

  • VirtualAddressInformation.TelephoneNumberIdentifier

  • VirtualAddressInformation.FaxNumberIdentifier

 

telecom[n].system

Code calculated from

  • VirtualAddressInformation.EmailAddressIdentifier

  • VirtualAddressInformation.Website

  • VirtualAddressInformation.TelephoneNumberIdentifier

  • VirtualAddressInformation.FaxNumberIdentifier

Stored as ContactPoints

See https://hl7.org/fhir/R4/valueset-contact-point-system.html

If not present on the current element the VirtualAddressInformation is inherited from the SOR parent.

address[n]

Two addresses will be stored in FHIR.

PostalAddressInformation

And either an

VisitingAddressInformation or ActivityAddressInformation

PostalAddressInformation is mapped to an address using type = 'postal'.

Then a prioritized select of VisitingAddressInformation, ActivityAddressInformation is stored with type = 'physical'

The SOR XML data file documentation describes the inheritance of addresses in the SOR structure (translated to English):

  • If "HealthInstitution" doesn't have a "PostalAddressInformation" the address is inherited from the parent.

  • If "HealthInstitution" doesn't have a "VisitingAddresseInformation" the unit's "PostalAddressInformation" is used.

  • If "OrganizationalUnit" doesn't have a "PostalAddressInformation" the address is inherited from the parent (either a HI or OU).

  • If "OrganizationalUnit" doesn't have a "VisitingAddressInformation" the unit's "PostalAddressInformation" is used.

  • If "OrganizationalUnit" doesn't have an "AcvitivityAddressInformation" the unit's "VisitingAddressInformation" is used.

After applying the inheritance logic the values are copied to the FHIR model. Ie. addresses are not left blank in the FHIR model.

address[0].type

PostalAddressInformation is mapped to an FHIR address using type = 'postal'.

 

address[0].text

PostalAddressInformation.AdditionalAddressInformationText

 

address[1].type

Either a VisitingAddressInformation or ActivityAddressInformation stored with type = 'physical'

 

contact

N/A

Not created during import.

municipalityCode

PostalAddressInformation.MunicipalityCode

 

regionCode

PostalAddressInformation.RegionCode

 

providerIdentifier

ProviderIdentifier

Translates to the Danish 'Ydernummer'

specialty[n].specialty

PrioritizedEntitySpeciality.SpecialityIdentifier

specialty[n].primaryIndicator

PrioritizedEntitySpeciality.SpecialityPriorityIdentifier

The .primaryIndicator field is a Boolean. It is set true if the SpecialityPriorityIdentifier has the identifier 51000095001, otherwise it is set to false.

endpoint

EanLocationCodeOption
.EanLocationCodeEntity

No mapping to endpoint happens if
EanLocationCodeOption
.EanLocationCodeEntity.sor1:NonActiveIndicator is true.

endpoint.identifier.value

EanLocationCodeOption
.EanLocationCodeEntity
.sor1:EanLocationCode

Translates to the Danish
'Lokationsnummer'

endpoint.identifier.system

N/A

Fixed value https://www.gs1.org/gln

endpoint.status

EanLocationCodeOption
.EanLocationCodeEntity
.sor1:NonActiveIndicator
/
EanLocationCodeOption
.EanLocationCodeEntity
.sor1:SorStatus.ToDate

  • sor1:NonActiveIndicator = true then endpoint.status = off

  • sor1:NonActiveIndicator = false then endpoint.status = active

  • Unless we’re past sor1:SorStatus.ToDate then endpoint.status = off

endpoint.period.end

EanLocationCodeOption
.EanLocationCodeEntity
.sor1:SorStatus.ToDate

As described above, ToDate also influences status

endpoint.period.start

EanLocationCodeOption
.EanLocationCodeEntity
.sor1:SorStatus.FromDate

 

Organization.endpoint reflects the currently defined Location code from SOR.

The accumulated Location code history from SOR could have been represented in Organization.endpoint as the element supports zero to many Endpoint where each has a validity period, Endpoint.period. No immediate need has been identified.

Please consult previous technical versions of an Organization (the resource’s history) to see changes of time if needed.

eHealth Infrastructure imports from KOMBIT Fælleskommunalt (FK) Organisation

The eHealth Infrastructure imports municipal organization information from the FK Organisation every night around Midnight.

Import for a municipality requires that a Service Agreement in KOMBIT Serviceplatform has been established for the municipality.

The import performs the following:

  • Processes every municipality that has agreed to a Service Agreement (could be all 98 municipalities)

    • For an OrganisationEnhed to be imported, either the OrganisationEnhed itself or one of its children (transitively) must have KLE code29.70.10 Telesundhed' and/or '29.70.20 Telemedicin' assigned as Opgaver as either udførende or ansvarlig.

  • Imports and updates information from each municipality individually

eHealth Environment

Service Agreements in place

KOMBIT Environment imported from

FK Organisation Service

eHealth Environment

Service Agreements in place

KOMBIT Environment imported from

FK Organisation Service

Production

For all municipalities

PROD

https://prod.serviceplatformen.dk/service/Organisation

Non-production (e.g. EXTTEST)

For fewer municipalities (at the time of writing)

TEST

https://exttest.serviceplatformen.dk/service/Organisation

Organization discovery

For each municipality, the import starts by

  1. Search for all OrganisationEnhed having the KLE code ‘29.70.10 Telesundhed' or '29.70.20 Telemedicin' assigned as Opgaver as either udførende or ansvarlig.

  2. For all found OrganisationEnhed their parent organizational tree is found using the RelationListe.Overordnet attributes.

  3. For OrganisationEnhed not having a RelationListe.Overordnet the RelationListe.Tilhoerer attribute will be used to retrieve the Organisation.

  4. Then the Virksomhed is referenced by the Organisation's RelationList.Virksomhed attribute will be retrieved.

  5. Lastly, the referenced addresses will be retrieved from the Adresser service and Danish Adresse Register (DAR).

  6. The found OrganisationEnhed resources are transformed into eHealth Organization resources and imported.

Prior to FUT-I Release 2024.3, the FK Organisation object type Organisation was transformed and maintained as the top-level FHIR Organization in a municipal organization tree. With FUT-I Release 2024.3 these have been inactived (FHIR Organization.active = false).

Data mapping overview

Data mapping from FK Organisation objects to FHIR Organization of profile ehealth-organization :

The following table explains how each of the attributes on the FHIR resource is mapped from the FK Organisation data model

FK Organisation Source

Comment

FK Organisation Source

Comment

id

 

Generated by FHIR server

meta.*

 

Generated by FHIR server

implicitRules

 

N/A

language

 

N/A

text

 

N/A

contained

 

N/A

extension

 

N/A

relatedTo

Adresse resources with Rolle 'SOR-ID'

A relation to corresponding FHIR Organization with the given SOR Id is established.

Adresse resources with Rolle 'SOR-ID' a relationship to the related SOR-origin FHIR Organization is reflected in the Organization.relatedTo element.

modifierExtension

 

N/A

identifier[0].use

 

Always set to official

identifier[0].type

 

Not used

identifier[0].system

 

For FK Organisation always https://www.kombit.dk/sts/organisation

identifier[0].value

OrganisationEnhed
tns:ListResponse/orgenhed:ListOutput/orgenhed:FiltreretOejebliksbillede/orgenhed:ObjektType/sd:UUIDIdentifikator

 

identifier[0].period.start

OrganisationEnhed
tns:ListResponse/orgenhed:ListOutput/orgenhed:FiltreretOejebliksbillede/orgenhed:Registrering/orgenhed:TilstandListe/orgfaelles:Gyldighed/sd:Virkning/sd:FraTidspunkt

 

identifier[0].period.end

If OrganisationEnhed
tns:ListResponse/orgenhed:ListOutput/orgenhed:FiltreretOejebliksbillede/orgenhed:Registrering/orgenhed:TilstandListe/orgfaelles:Gyldighed/sd:Virkning/sd:TilTidspunkt

 

identifier[0].assigner

 

Not used

type

OrganisationEnhed 

See https://ehealth.sundhed.dk/fhir/CodeSystem-ehealth-oio-organization-type.html

active

OrganisationEnhed
tns:ListResponse/orgenhed:ListOutput/orgenhed:FiltreretOejebliksbillede/orgenhed:Registrering/orgenhed:TilstandListe/orgfaelles:Gyldighed/orgfaelles:GyldighedStatusKode

Has to be Aktiv for active to be true.

If value is “Inaktiv”, then active is set to false.

name

OrganisationEnhed
tns:ListResponse/orgenhed:ListOutput/orgenhed:FiltreretOejebliksbillede/orgenhed:Registrering/orgenhed:AttributListe/orgenhed:Egenskab/sd:EnhedNavn

 

alias

 

Concatenation of 'name' from the top of the tree down to and including the current entity.

partOf

OrganisationEnhed.OverordnetTarget:  tns:ListResponse/orgenhed:ListOutput/orgenhed:FiltreretOejebliksbillede/orgenhed:Registrering/orgenhed:RelationListe/sd:Overordnet/sd:ReferenceID/sd:UUIDIdentifikator (translated to a FHIR Organization reference)