What are Relationships in ODS data?
Relationships are used to link organisation and/or site entities together. These can imply genuine operational links, indicating commissioning or provision, lines of authority or virtual geographical associations.
- Any organisation or site record can be linked to one or more others via relationships
- The different sides of a Relationship can be termed ‘Source’ (the record that holds the relationship reference) and ‘Target’ (the related Organisation that is referenced)
- Relationships are ‘one-way’ – that is, they are only hosted by/appear on the record of the 'source' entity in the pairing
- There is no restriction on the number of times a record may be referenced as a Target from other Source records
- Each Relationship has:
- a unique identifier (UniqueRelID)
- a relationship name to give context
- relationship status (Active or Inactive)
- a timespan (start/end dates)
- a range of information about the target entity including its own identifier
Types of Relationship
The FHIR4 ODS 'relationship' Code System defines the type of relationships which are allowed between Organisation or Site entity/records. The type of relationship is represented by the RelTypeID. The names and descriptions of each RelTypeID are shown below:-
RelTypeID | Relationship Type Name | Definition | |
RE2 | IS A SUB-DIVISION OF | Department/Programme-to-Organisation/Site The Organisation of which the subject entity forms a sub-division or component (such as a department or programme of work). | |
RE3 | IS DIRECTED BY | The primary Organisation by which the subject entity is influenced or directed, through policy, legal authority or contractual agreements. | |
RE4 | IS COMMISSIONED BY | Provider-to-Commissioner An Organisation commissioning health care or related services from the subject entity (provider). | |
RE5* | IS LOCATED IN THE GEOGRAPHY OF | An administrative geography, organisation or subdivision of an organisation, within the boundary of which the subject entity is physically located. Supplied for aggregation purposes only. *Please see note below re deprecation of RE5 relationships in the future | |
RE6 | IS OPERATED BY | Site-to-Organisation The Organisation that is responsible for operating and managing services within the subject entity. Does not necessarily denote ownership. | |
RE8 | IS PARTNER TO | Partner-to-Partnership/Collaboration/Network The Partnership/Collaboration/Network which the subject entity is part of. | |
RE9 | IS NOMINATED PAYEE FOR | Payee-to-Network | |
RE10 | IS COVID NOMINATED PAYEE FOR | COVID Vaccination Payee-to-Network *All instances of RE10 relationships are now closed as no longer required or maintained. | |
RE11 | IS CONSTITUENT OF | Primary Care Prescribing Cost Centre-to-Sub ICB Reporting Entity Currently applied for London ICBs only to enable granular reporting - the London Sub ICB Reporting Entity to which a GP Practice maps. |
Each organisation type description page contains information regarding the types of relationship that can be associated with each organisation type in ODS data.
Relationship Data Attributes
Master Data Attribute (ODS Internal Reference) | Attribute Type | Length | Nullable | Description / Notes | Mapping to ODS Data Search & Export field (excluding predefined reports) | Mapping to ORD API (ORD schema containers, elements and attributes) | Mapping to ODS STU3 API | Mapping to ODS FHIR R4 API Please refer to ODS FHIR R4 Implementation Guide and the OAS Specification | ||
OrganizationAffiliation Resource | ODS Relationship CodeSystem | ODS Organisation Relationship instance CodeSystem | ||||||||
UniqueRelID | [nvarchar] | 255 | NOT NULL | Unique ID for each relationship record | Not available | Rels.Rel.uniqueRelId | Not available | identifier (also id) | Not available | concept.code |
SourceOrgCode | [nvarchar] | 12 | NOT NULL | The code of the source organisation/site for the relationship | Code (for the org record you are viewing) | Organisation.OrgId.extension | Not available | organization | Not available | property.sourceOrgCode |
RelTypeID | [nvarchar] | 7 | NULL | See table above for ODS relationship type IDs | Not available | Rels.Rel.id | Not available | code | concept.code | property.relationshipTypeCode |
RelTypeName | [nvarchar] | 100 | NOT NULL | See table above for ODS relationship type names and definitions | Different types of relationships are available to query in separate columns/fields in DSE, i.e. for 'Is Commissioned By' relationships there are columns that will display the commissioning Organisation Code, Name, Primary Role, Legal Start Date and Legal End Date if present. | Lookup via OrganisationRelationship CodeSystem: https://directory.spineservices.nhs.uk/ORD/2-0-0/rels? Relationships.Relationship.displayName | Not available | Not available | concept.display | Not available |
TargetOrgCode | [nvarchar] | 12 | NOT NULL | The code of the target organisation for the relationship (who an entity is linked to) | Different types of relationships are available to query in separate columns/fields in DSE. For example, the 'Is Commissioned By - Code' column will display the code of the target organisation for a relationship | Rels.Rel.Target.OrgId.extension | Not available | participatingOrganization. | Not available | property.targetOrgCode |
OperationalStartDate | [nvarchar] | 8 | NULL | Operational start date for an instance of a relationship. | Not available | Rels.Rel.Date.Start Where: Rels.Rel.Date.Type = Operational | Not available | Extension: https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-TypedPeriod dateType Whether the Date Period is 'Legal' or 'Operational'. period Start: where Type=dateTime period.start (Operational) | Not available | property.opStartDate |
OperationalEndDate | [nvarchar] | 8 | NULL | Operational end date for an instance of a relationship. | Not available | Rels.Rel.Date.End Where: Rels.Rel.Date.Type = Operational | Not available | Extension: https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-TypedPeriod dateType Whether the Date Period is 'Legal' or 'Operational'. period End: where Type=dateTime period.end (Operational) | Not available | property.opEndDate |
LegalStartDate | [nvarchar] | 8 | NULL | Legal start date for an instance of a relationship. | Different types of relationships are available to query in separate columns/fields in DSE. For example, the 'Is Commissioned By - Legal Start Date' column will display the legal start date for an instance of a commissioning relationship. | Rels.Rel.Date.Start Where: Rels.Rel.Date.Type = Legal | Not available | Extension: https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-TypedPeriod dateType Whether the Date Period is 'Legal' or 'Operational'. period Start: where Type=dateTime period.start (Legal) | Not available | property.legStartDate |
LegalEndDate | [nvarchar] | 8 | NULL | Legal end date for an instance of a relationship. | Different types of relationships are available to query in separate columns/fields in DSE. For example, the 'Is Commissioned By - Legal End Date' column will display the legal end date for an instance of a commissioning relationship. | Rels.Rel.Date.End Where: Rels.Rel.Date.Type = Legal | Not available | Extension: https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-TypedPeriod dateType Whether the Date Period is 'Legal' or 'Operational'. period End: where Type=dateTime period.end (Legal) | Not available | property.legEndDate |
Status | [nvarchar] | 8 | NOT NULL | ACTIVE / INACTIVE A Status is provided for each Relationship which indicates whether the Relationship is currently active or not. Inactive if both legal and operational end dates are present and the end dates are both equal to or before today’s date. | Not available | Rels.Rel.Status | Not available | active | Not available | property.status (active/retired) |
RE5 'In The Geography Of' Relationships - Changing Approach
RE5 'In The Geography Of' relationships were created and stored against an ODS record to indicate a given boundary that organisation was located within geographically (i.e. X NHS Trust is located within the boundary of Y Integrated Care Board).
To improve data moving forward, we no longer want to store 'in the geography of' relationships and instead use dynamic geographic relationships that are mapped from the postcode to the NHS Postcode Directory.
This functionality has been enabled in the data that feeds ODS Data Search & Export and the FHIR4 ODS API. To implement fully, ODS will need to close all legacy 'in the geography of' relationships and support users to migrate to the new dynamic geography data.
Benefits of this new approach are:
- fewer 'stored' relationships forming part of an organisation record, meaning that the impact of any future reconfiguration is reduced (fewer relationships to manually update as geographic relationships will dynamically update from NHS Postcode Directory data)
- better data quality - at present, the 'in the geography of' relationships are created in the ODS database at the point of code creation, and must be manually checked and updated if the organisation address changes
ODS Data Search & Export - Geography Data
As part of the implementation of this new approach, RE5 relationships are not available via the ODS Data Search & Export tool - users will see the following dynamic geography data instead:-
FHIR4 ODS API - Geography Data
The legacy RE5 relationships are currently loaded into the Relationship and ODS Organisation CodeSystems and can be accessed but it should be noted that they are not part of the formal documentation or specification for the FHIR R4 ODS API. We strongly advise they are not used as they will be removed at the earliest opportunity. Developers requiring geographic relationships should instead make use of the geography data within the ODS Organisation CodeSystem and ODS Postcode CodeSystem.