CodeSystem Design

This section provides background information on metadata used within CodeSystem resources, a section that lists HL7 FHIR standard extensions that may be considered relevant to a NHS England CodeSystem, and links to example CodeSystems already created for NHS England.

Further information about the CodeSystem resource is available online.


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:

CodeSystem-England-[Name].

DomainResource Resource

View further information about FHIR domain resources.

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/CodeSystem/England-[Name].
identifier 0..* 0..0 Identifier identifier SHALL NOT be used within the NHS England FHIR assets
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:

England[Name].
title 0..1 1..1 string In NHS England the format is PascalCase:

England [Name].
status 1..1 1..1 code For the NHS England these are defined as:
  • draft - CodeSystem in development
  • active - CodeSystem that have been approved via Clinical and Technical Assurance
  • retired - CodeSystem that are no longer required
date 0..1 1..1 dateTime Only the date, without time, is populated in NHS England.
publisher 0..1 1..1 string For all NHS England CodeSystems, where the base URL is https://fhir.nhs.uk/England, this will be NHS England.
contact 0..* 1..* ContactDetail Contact details for the publisher.

See the Publisher, Contact & Copyright for details of how this SHALL be populated for all NHS England CodeSystems, 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.
copyright 0..1 1..1 markdown All NHS England CodeSystems SHALL contain the the copyright as listed in Publisher, Contact & Copyright

DomainResource Resource

View further information about FHIR Resource CodeSystem - Content.

Element name Base Cardinality NHS England IG Cardinality Type Definition, Constraints and Notes
caseSensitive 0..1 1..1 boolean For all NHS England CodeSystems this SHALL be set to "true" unless a specific use case justifies it being set to "false". In this case the reasoning for the decision SHALL be added to the description element.
concept 0..* 0..* Backbone
Element
Concepts that are in the code system.

Cardinality would normally be 1..* but set to the standard 0..* to allow for a use case where the content element has a value of "not-present".
concept
.display
0..1 1..1 uri This SHALL be included as this presents the concept to a user in a human-readable manner.

CodeSystem Extensions

This section lists HL7 FHIR standard code system extensions that could be considered for use in NHS England code systems.

The full list of FHIR standard code system extensions is available online.

codesystem-concept-comments

The FHIR Standard extension https://hl7.org/fhir/extension-codesystem-concept-comments.html could be considered where there is a need to include comments against individual code system concepts, for example https://hl7.org/fhir/R4/codesystem.html https://hl7.org/fhir/codesystem-administrative-gender.xml.html


Creating Codes for a CodeSystem

Where they don't already exist, the NHS England approach to creating codes for concepts in a new CodeSystem is by placing a hyphen between each word of the display value (if they contain more than one word) and using solely lower case alphabetic characters.

An exception to this is where the CodeSystem is a copy of an English Data Dictionary set of concepts, where the approach is to faithfully use both the code and its description within the CodeSystem as defined within the Data Dictionary source at the time of creation of the CodeSystem. Note that for some CodeSystems already in existence in the NHS England IG, including content previously created for other projects, alternative code construction forms have also been used.