Extension Design

Occasionally there will be requirements within an NHS England programme which are England specific or has a specific use-case. Therefore, additional valid requirements can be implemented as Extensions to existing UK Core or NHS England IG resources. Further information about extensibility is available.

There are two basic types of extensions within NHS England IG:

  • Simple extensions: A simple extension has a single Extension.urlelement and a single Extension.value[x] element, which may have many datatypes associated with it. See Extension Element for more details.
  • Complex extensions: A complex extension has a single Extension.urlelement and a single Extension.extension element. The latter contains a nested structure and are used for one of two reason:
    • The extension has complex content, which is presented as a nested tree of values and defined locally within the extension.
    • The extension is extended with an additional extension defined separately.

Currently the NHSE IG does not use modifierExtensions, so no guidance is given here on this type. More information on modifierExtensions is available in the FHIR specification.


Metadata Usage

The list below contains the element differences between the HL7 FHIR R4 and NHS England IG.

Base Resource Definitions

View further information about FHIR base resource definitions.

Element name Base Cardinality NHS England IG Cardinality Type Definition, Constraints and Notes
id 0..1 1..1 id In the NHS England the format is the following, with the Extension name in PascalCase:

Extension-England-[Name].

StructureDefinition Content

View further information about FHIR Resource StructureDefinition - Content.

Element name Base Cardinality NHS England IG Cardinality Type Definition, Constraints and Notes
url 0..1 1..1 uri In NHS England the format is the following, with the Extension name in PascalCase:

https://fhir.nhs.uk/England/StructureDefinition/Extension-England-[Name].
identifier 0..* 0..0 Identifier identifier SHALL NOT be used within the NHS England IG
version 0..1 1..1 string This will follow the Semantic Versioning standard [major.minor.patch].
Further details about internal versioning for NHS England assets are available.
name 0..1 1..1 string In NHS England the format is PascalCase:

ExtensionEngland[Name].
title 0..1 1..1 string In the NHS England the format in Proper Case:

Extension England [Name].
status 1..1 1..1 code For the NHS England these are defined as:
  • draft - Extensions in development
  • active - Extensions that have been approved via Clinical and Technical Assurance
  • retired - Extensions that are no longer required
date 0..1 1..1 dateTime Only the date, without time, is populated in the NHS England.
publisher 0..1 1..1 string For all NHS England Profiles, where the base URL is https://fhir.nhs.uk/England, the name of the publisher will be NHS England.
contact 0..* 1..* ContactDetail See the Publisher, Contact & Copyright for details of how this SHALL be populated for all NHS England Extensions, where the base URL is https://fhir.nhs.uk/England.
description 0..1 1..1 markdown The NHS England IG mandates the use of this element.
purpose 0..1 1..1 markdown This provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.
copyright 0..1 1..1 markdown All NHS England Profiles SHALL contain the the copyright as listed in Publisher, Contact & Copyright
fhirVersion 0..1 1..1 code The NHS England IG mandates the use of this element.



The Extension Root Element

Extensions are optional within the NHS England (minimum cardinality of 0), but certain use cases may mandate their use. Currently, all NHS England extensions are modelled as being optional at the extension root element. Where the use case requires an extension to be mandated, the Implementation Guide for that use case will specify the requirements. If it has been agreed that it is mandated for ALL NHS England use cases there the NHS England profile will mandated the extension.

Extension Bindings When the Value is a Coded type

If any of the extension.value elements is constrained to a coded type e.g. one of Code, Coding, or CodeableConcept, the extension.value SHALL be bound to a ValueSet.

Further information about FHIR datatypes is available.

Cardinality of a value[x] element

Simple extension - The NHS England IG mandates the use of Extension.value[x] for a simple extension, that is, a cardinality of 1..1.

Complex extension - The NHS England IG mandates the use of Extension.extension:[Element].value[x] for a complex extension, that is, a cardinality of 1..1.