ValueSet Design

This section provides background information on metadata specific to the NHS England ValueSet resources.

Further information about the ValueSet resource is available.


Metadata Usage

The list below contains the element differences between 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:

ValueSet-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/ValueSet/England-[Name].
identifier 0..* 0..0 Identifier identifier SHALL NOT be used within NHS England
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 - ValueSets in development
  • active - ValueSets that have been approved via Clinical and Technical Assurance
  • retired - ValueSets 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 ValueSets, where the base URL is https://fhir.nhs.uk/England.
description 0..1 1..1 markdown The NHS England preference can be found under the ValueSet Descriptions section.
copyright 0..1 1..1 markdown All NHS England ValueSets SHALL contain the the copyright as listed in Publisher, Contact & Copyright

Resource ValueSet - Content

View further information about Resource ValueSet - Content.

Element name Base Cardinality NHS England IG Cardinality Type Definition, Constraints and Notes
compose 0..1 1..1 BackboneElement See the Content Logical Definition for details on how to populate this.
compose
.include
.concept
.display
0..1 1..1 string This element SHALL be used in the NHS England IG
compose
.include
.filter
.property
1..1 1..1 code For NHS England ValueSets containing SNOMED CT concepts encapsulated within an ECL expression, the constraint value SHALL used.
compose
.include
.filter
.value
1..1 1..1 string Due to some systems having difficulties processing symbols, for NHS England ValueSets containing SNOMED CT concepts encapsulated within an ECL expression, the long syntax SHALL be used. The SNOMED CT term SHALL NOT be suffixed to the SCTID.

ValueSet Extensions

Currently there is no identified HL7 FHIR standard ValueSet extension that has been recommended to be considered for use in NHS England ValueSets. The full list of FHIR Standard ValueSet extensions available can be viewed online.


ValueSet Descriptions

A free text natural language description of the of the ValueSet from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the ValueSet Expansion, and also may specify the intended use and limitations of the ValueSet. In the NHS England IG there is a preference to use the words "define" or "describe" and more rarely, "identify".

The prefix SHOULD be as follows:

A set of codes that define [description].



For SNOMED CT and dm+d concepts, the following SHOULD be added after the prefix:

  • For a ValueSet containing a set of SNOMED Reference Sets and/or hierarchies and/or individual concepts:
Selected from the following SNOMED CT UK coding system: \n 
- [long syntax1] [RefSet/hierarchy1 code] - [description of RefSet/hierarchy1] \n
- [long syntax2] [RefSet/hierarchy2 code] - [description of RefSet/hierarchy2] \n,  etc. 

  • Where the ValueSet include dm+d concept classes:
Selected from the following dm+d (dictionary of medicines and devices) concept classes:\n
[concept1]-[description1] \n
[concept2]-[description2] \n, etc.



Where the ValueSet includes nullFlavor(s) in addition to other sets of codes, the suffix SHOULD be as the following:

Where no [MainCodeSystems] coded information is available, a specific code from the nullFlavor CodeSystem can be used instead to indicate this.

For complicated descriptions, particularly where a complex set of SNOMED references is used, and where inclusion of a carriage return / line feed can make the content more presentable in Simplifier, the sequence can be inserted to start a new line and can be inserted to leave a line break before the next line starts.


Content Logical Definition - ValueSets containing NHS England CodeSystems

Content Logical Definition - Single code system

<compose>
    <include>
        <system value="https://fhir.nhs.uk/CodeSystem/England-[ConcatenatedBusinessName(s)]" />
    </include>
</compose>

Content Logical Definition – Selected included codes from a single code system

<compose>
    <include>
        <system value="https://fhir.nhs.uk/CodeSystem/England-[ConcatenatedBusinessName(s)]" />
        <concept>
            <code value="[conceptCode1]" />
            <display value="[conceptDisplay1]" />
        </concept>
        <concept>
            <code value="[conceptCode2]" />
            <display value="[conceptDisplay2]" />
        </concept>
    </include>
</compose>

Content Logical Definition – Selected excluded codes from a single code system

<compose>
    <include>
        <system value="https://fhir.nhs.uk/CodeSystem/England-[ConcatenatedBusinessName(s)]" />
    </include>
    <exclude>
        <system value="https://fhir.nhs.uk/CodeSystem/England-[ConcatenatedBusinessName(s)]" />
        <concept>
            <code value="[conceptCode1]" />
            <display value="[conceptDisplay2]" />
        </concept>
        <concept>
            <code value="[conceptCode2]" />
            <display value="[conceptDisplay2]" />
        </concept>
    </exclude>
</compose>

Content Logical Definition – ValueSets containing SNOMED concepts

The NHS England approach is that all SNOMED is encapsulated within the Content Logical Definition using SNOMED Expression Constraint Language (ECL) in a single statement in the value element, together with a property element value of "constraint" and an op element value of "=".

More information about ECL and Using SNOMED CT with HL7 Standards is available online.

The ECL informative long syntax SHALL be used to identify a hierarchy or reference set within the NHS England IG to both provide greater clarity to a potentially wide audience and to simplify the process of creating, validating and using the ECL statement for a range of potential users as it avoids any need to encode and decode symbols otherwise used in the brief syntax.

Concept display values SHALL NOT be included in the ECL statement to avoid potential duplication with the ValueSet description and to avoid any need to encode separator characters. The ValueSet description field is used to provide hierarchy / reference set display name information, although display values for lists of individual codes will only be available via a ValueSet expansion, again to avoid duplication.

<compose>
    <include>
        <system value="http://snomed.info/sct" />
        <filter>
            <property value="constraint" />
            <op value="=" />
            <value value="[long syntax1] [SNOMED CT Code1] OR [long syntax2] [SNOMED CT Code2] OR , etc." />
        </filter>
    </include>
</compose>

Content Logical Definition – ValueSets containing dm+d concepts

<compose>
    <include>
        <system value="https://dmd.nhs.uk" />
        <filter>
            <property value="parent" />
            <op value="=" />
            <value value="[ValueSet1]" />
        </filter>
    </include>
    <include>
        <system value="https://dmd.nhs.uk" />
        <filter>
            <property value="parent" />
            <op value="=" />
            <value value="[ValueSet1]" />
        </filter>
    </include>
</compose>


Expanding ValueSets

For some SNOMED and dm+d ValueSets, where the expansion would contain a list of concepts larger than 600, they will not be expanded so that the viewers do not misinterpret a partially expanded list as a full list.

Note that expansions are only ever current at the time they are created. The date/time of expansion is currently only viewable from within the XML or JSON view of the ValueSet.

It is possible to manually obtain a ValueSet expansion from the NHS England Terminology Server (Ontoserver), and this expansion can be manually incorporated into an existing ValueSet. This approach was taken for the ValueSet examples above.