This page is part of the FHIR Specification (v0.5.0: DSTU 2 Ballot 2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2
This resource maintained by the Vocabulary Work Group
A value set specifies a set of codes drawn from one or more code systems.
The FHIR terminology specification is based two key concepts, originally defined in HL7 v3 Core Principles:
Code systems define which codes (symbols and/or expressions) exist, and how they are understood. Value Sets specify which codes can be used in a particular context.
Value sets may be constructed in one of two ways:
A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This operation is performed to produce a collection of codes that are ready to use for data entry or validation. An expanded value set may also contain the original definition as well.
Value sets that define their own codes are effectlvely providing inline code system definitions. These are intended for small, simple code systems that are found throughout the implementation context (e.g. lists of wards, status codes, enumerations). The inline code system definition is not intended to represent large publically defined terminologies such as LOINC etc - these have their own distributions formats .
When using value sets, proper differentiation between a code system and a value set is important. This is one very common area where significant clinical safety risks occur in practice. Implementers should be familiar with the content in Using Codes in resources.
Each value set has 2 different URLs that can be used to reference it, its logical identifier, and its location.
The location of the value set is a URL by which it may be retrieved, usually from a FHIR server, and is often a relative reference to a value set on the same server. The logical identifier is in the value set itself, in ValueSet.identifier. This is the logical identity (sometimes called the canonical URL) that refers to this value set across all systems. Ideally, the URL should also be the location of the master version of the value set, though this is not always possible.
For example, the value sets published as part of FHIR all have a logical URL which is also a location by which they may be accessed in the FHIR specification itself. However, while a new version of the FHIR Specification is being prepared, value sets that are published in the drafts will not be found in the current FHIR specification.
Because it is common practice to copy (cache) value sets locally, most references to value sets can either be logical or literal URL.
This resource is referenced by ConceptMap and Questionnaire
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
ValueSet | I | DomainResource | A set of codes drawn from one or more code systems A defined code system (if present) SHALL have a different identifier to the value set itself Value set SHALL contain either a define, a compose, or an expansion element A value set with only one import SHALL also have an include and/or an exclude unless the value set defines its own codes | |
url | Σ | 0..1 | uri | Globally unique logical id for value set |
identifier | Σ | 0..1 | Identifier | Additional identifier for the value set (v2 / CDA) |
version | Σ | 0..1 | string | Logical id for this version of the value set |
name | Σ | 0..1 | string | Informal name for this value set |
useContext | Σ | 0..* | CodeableConcept | Content intends to support these contexts ConformanceUseContext (Extensible) |
immutable | Σ | 0..1 | boolean | Indicates whether or not any change to the content logical definition may occur |
publisher | Σ | 0..1 | string | Name of the publisher (Organization or individual) |
contact | Σ | 0..* | Element | Contact details of the publisher |
name | Σ | 0..1 | string | Name of a individual to contact |
telecom | Σ | 0..* | ContactPoint | Contact details for individual or publisher |
description | Σ | 0..1 | string | Human language description of the value set |
requirements | 0..1 | string | Why is this needed? | |
copyright | 0..1 | string | Use and/or Publishing restrictions | |
status | ?! Σ | 1..1 | code | draft | active | retired ConformanceResourceStatus (Required) |
experimental | Σ | 0..1 | boolean | If for testing purposes, not real usage |
extensible | Σ | 0..1 | boolean | Whether this is intended to be used with an extensible binding |
date | Σ | 0..1 | dateTime | Date for given status |
lockedDate | Σ | 0..1 | date | Fixed date for all referenced code systems and value sets |
define | Σ I | 0..1 | Element | When value set defines its own codes Codes must be unique Within a code system definition, all the codes SHALL be unique |
system | Σ | 1..1 | uri | URI to identify the code system |
version | Σ | 0..1 | string | Version of this system |
caseSensitive | Σ | 0..1 | boolean | If code comparison is case sensitive |
concept | 0..* | Element | Concepts in the code system | |
code | 1..1 | code | Code that identifies concept | |
abstract | 0..1 | boolean | If this code is not for use as a real concept | |
display | 0..1 | string | Text to Display to the user | |
definition | 0..1 | string | Formal Definition | |
designation | 0..* | Element | Additional representations for the concept | |
language | 0..1 | code | Language of the designation Language (Required) | |
use | 0..1 | Coding | Details how this designation would be used ConceptDesignationUse (Extensible) | |
value | 1..1 | string | The text value for this designation | |
concept | 0..* | see concept | Child Concepts (is-a / contains) | |
compose | I | 0..1 | Element | When value set includes codes from elsewhere A value set composition SHALL have an include or an import |
import | Σ I | 0..* | uri | Import the contents of another value set |
include | Σ I | 0..* | Element | Include one or more codes from a code system |
system | Σ | 1..1 | uri | The system the codes come from |
version | Σ | 0..1 | string | Specific version of the code system referred to |
concept | 0..* | Element | A concept defined in the system | |
code | 1..1 | code | Code or expression from system | |
display | 0..1 | string | Test to display for this code for this value set | |
designation | 0..* | see designation | Additional representations for this valueset | |
filter | 0..* | Element | Select codes/concepts by their properties (including relationships) | |
property | 1..1 | code | A property defined by the code system | |
op | 1..1 | code | = | is-a | is-not-a | regex | in | not-in FilterOperator (Required) | |
value | 1..1 | code | Code from the system, or regex criteria | |
exclude | I | 0..* | see include | Explicitly exclude codes |
expansion | I | 0..1 | Element | Used when the value set is "expanded" |
identifier | 1..1 | uri | Uniquely identifies this expansion | |
timestamp | 1..1 | dateTime | Time valueset expansion happened | |
parameter | 0..* | Element | Parameter that controlled the expansion process | |
name | 1..1 | string | Name as assigned by server | |
value[x] | I | Value of the parameter | ||
valueString | 0..1 | string | ||
valueBoolean | 0..1 | boolean | ||
valueInteger | 0..1 | integer | ||
valueDecimal | 0..1 | decimal | ||
valueUri | 0..1 | uri | ||
valueCode | 0..1 | code | ||
contains | I | 0..* | Element | Codes in the value set Must have a code if not abstract SHALL have a code or a display Must have a system if a code is present |
system | 0..1 | uri | System value for the code | |
abstract | 0..1 | boolean | If user cannot select this entry | |
version | 0..1 | string | Version in which this code / display is defined | |
code | I | 0..1 | code | Code - if blank, this is not a choosable code |
display | I | 0..1 | string | User display for the concept |
contains | 0..* | see contains | Codes contained in this concept |
UML Diagram
XML Template
<ValueSet xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 0..1 Globally unique logical id for value set --> <identifier><!-- 0..1 Identifier Additional identifier for the value set (v2 / CDA) --></identifier> <version value="[string]"/><!-- 0..1 Logical id for this version of the value set --> <name value="[string]"/><!-- 0..1 Informal name for this value set --> <useContext><!-- 0..* CodeableConcept Content intends to support these contexts --></useContext> <immutable value="[boolean]"/><!-- 0..1 Indicates whether or not any change to the content logical definition may occur --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) --> <contact> <!-- 0..* Contact details of the publisher --> <name value="[string]"/><!-- 0..1 Name of a individual to contact --> <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom> </contact> <description value="[string]"/><!-- 0..1 Human language description of the value set --> <requirements value="[string]"/><!-- 0..1 Why is this needed? --> <copyright value="[string]"/><!-- 0..1 Use and/or Publishing restrictions --> <status value="[code]"/><!-- 1..1 draft | active | retired --> <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage --> <extensible value="[boolean]"/><!-- 0..1 Whether this is intended to be used with an extensible binding --> <date value="[dateTime]"/><!-- 0..1 Date for given status --> <lockedDate value="[date]"/><!-- 0..1 Fixed date for all referenced code systems and value sets --> <define> <!-- 0..1 When value set defines its own codes --> <system value="[uri]"/><!-- 1..1 URI to identify the code system --> <version value="[string]"/><!-- 0..1 Version of this system --> <caseSensitive value="[boolean]"/><!-- 0..1 If code comparison is case sensitive --> <concept> <!-- 0..* Concepts in the code system --> <code value="[code]"/><!-- 1..1 Code that identifies concept --> <abstract value="[boolean]"/><!-- 0..1 If this code is not for use as a real concept --> <display value="[string]"/><!-- 0..1 Text to Display to the user --> <definition value="[string]"/><!-- 0..1 Formal Definition --> <designation> <!-- 0..* Additional representations for the concept --> <language value="[code]"/><!-- 0..1 Language of the designation --> <use><!-- 0..1 Coding Details how this designation would be used --></use> <value value="[string]"/><!-- 1..1 The text value for this designation --> </designation> <concept><!-- 0..* Content as for ValueSet.define.concept Child Concepts (is-a / contains) --></concept> </concept> </define> <compose> <!-- 0..1 When value set includes codes from elsewhere --> <import value="[uri]"/><!-- 0..* Import the contents of another value set --> <include> <!-- 0..* Include one or more codes from a code system --> <system value="[uri]"/><!-- 1..1 The system the codes come from --> <version value="[string]"/><!-- 0..1 Specific version of the code system referred to --> <concept> <!-- 0..* A concept defined in the system --> <code value="[code]"/><!-- 1..1 Code or expression from system --> <display value="[string]"/><!-- 0..1 Test to display for this code for this value set --> <designation><!-- 0..* Content as for ValueSet.define.concept.designation Additional representations for this valueset --></designation> </concept> <filter> <!-- 0..* Select codes/concepts by their properties (including relationships) --> <property value="[code]"/><!-- 1..1 A property defined by the code system --> <op value="[code]"/><!-- 1..1 = | is-a | is-not-a | regex | in | not-in --> <value value="[code]"/><!-- 1..1 Code from the system, or regex criteria --> </filter> </include> <exclude><!-- 0..* Content as for ValueSet.compose.include Explicitly exclude codes --></exclude> </compose> <expansion> <!-- 0..1 Used when the value set is "expanded" --> <identifier value="[uri]"/><!-- 1..1 Uniquely identifies this expansion --> <timestamp value="[dateTime]"/><!-- 1..1 Time valueset expansion happened --> <parameter> <!-- 0..* Parameter that controlled the expansion process --> <name value="[string]"/><!-- 1..1 Name as assigned by server --> <value[x]><!-- 0..1 string|boolean|integer|decimal|uri|code Value of the parameter --></value[x]> </parameter> <contains> <!-- 0..* Codes in the value set --> <system value="[uri]"/><!-- 0..1 System value for the code --> <abstract value="[boolean]"/><!-- 0..1 If user cannot select this entry --> <version value="[string]"/><!-- 0..1 Version in which this code / display is defined --> <code value="[code]"/><!-- 0..1 Code - if blank, this is not a choosable code --> <display value="[string]"/><!-- 0..1 User display for the concept --> <contains><!-- 0..* Content as for ValueSet.expansion.contains Codes contained in this concept --></contains> </contains> </expansion> </ValueSet>
JSON Template
{ "resourceType" : "ValueSet", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "url" : "<uri>", // Globally unique logical id for value set "identifier" : { Identifier }, // Additional identifier for the value set (v2 / CDA) "version" : "<string>", // Logical id for this version of the value set "name" : "<string>", // Informal name for this value set "useContext" : [{ CodeableConcept }], // Content intends to support these contexts "immutable" : <boolean>, // Indicates whether or not any change to the content logical definition may occur "publisher" : "<string>", // Name of the publisher (Organization or individual) "contact" : [{ // Contact details of the publisher "name" : "<string>", // Name of a individual to contact "telecom" : [{ ContactPoint }] // Contact details for individual or publisher }], "description" : "<string>", // Human language description of the value set "requirements" : "<string>", // Why is this needed? "copyright" : "<string>", // Use and/or Publishing restrictions "status" : "<code>", // R! draft | active | retired "experimental" : <boolean>, // If for testing purposes, not real usage "extensible" : <boolean>, // Whether this is intended to be used with an extensible binding "date" : "<dateTime>", // Date for given status "lockedDate" : "<date>", // Fixed date for all referenced code systems and value sets "define" : { // C? When value set defines its own codes "system" : "<uri>", // R! URI to identify the code system "version" : "<string>", // Version of this system "caseSensitive" : <boolean>, // If code comparison is case sensitive "concept" : [{ // Concepts in the code system "code" : "<code>", // R! Code that identifies concept "abstract" : <boolean>, // If this code is not for use as a real concept "display" : "<string>", // Text to Display to the user "definition" : "<string>", // Formal Definition "designation" : [{ // Additional representations for the concept "language" : "<code>", // Language of the designation "use" : { Coding }, // Details how this designation would be used "value" : "<string>" // R! The text value for this designation }], "concept" : [{ Content as for ValueSet.define.concept }] // Child Concepts (is-a / contains) }] }, "compose" : { // C? When value set includes codes from elsewhere "import" : ["<uri>"], // C? Import the contents of another value set "include" : [{ // C? Include one or more codes from a code system "system" : "<uri>", // R! The system the codes come from "version" : "<string>", // Specific version of the code system referred to "concept" : [{ // A concept defined in the system "code" : "<code>", // R! Code or expression from system "display" : "<string>", // Test to display for this code for this value set "designation" : [{ Content as for ValueSet.define.concept.designation }] // Additional representations for this valueset }], "filter" : [{ // Select codes/concepts by their properties (including relationships) "property" : "<code>", // R! A property defined by the code system "op" : "<code>", // R! = | is-a | is-not-a | regex | in | not-in "value" : "<code>" // R! Code from the system, or regex criteria }] }], "exclude" : [{ Content as for ValueSet.compose.include }] // C? Explicitly exclude codes }, "expansion" : { // C? Used when the value set is "expanded" "identifier" : "<uri>", // R! Uniquely identifies this expansion "timestamp" : "<dateTime>", // R! Time valueset expansion happened "parameter" : [{ // Parameter that controlled the expansion process "name" : "<string>", // R! Name as assigned by server // value[x]: Value of the parameter. One of these 6: "valueString" : "<string>" "valueBoolean" : <boolean> "valueInteger" : <integer> "valueDecimal" : <decimal> "valueUri" : "<uri>" "valueCode" : "<code>" }], "contains" : [{ // Codes in the value set "system" : "<uri>", // System value for the code "abstract" : <boolean>, // If user cannot select this entry "version" : "<string>", // Version in which this code / display is defined "code" : "<code>", // C? Code - if blank, this is not a choosable code "display" : "<string>", // C? User display for the concept "contains" : [{ Content as for ValueSet.expansion.contains }] // Codes contained in this concept }] } }
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
ValueSet | I | DomainResource | A set of codes drawn from one or more code systems A defined code system (if present) SHALL have a different identifier to the value set itself Value set SHALL contain either a define, a compose, or an expansion element A value set with only one import SHALL also have an include and/or an exclude unless the value set defines its own codes | |
url | Σ | 0..1 | uri | Globally unique logical id for value set |
identifier | Σ | 0..1 | Identifier | Additional identifier for the value set (v2 / CDA) |
version | Σ | 0..1 | string | Logical id for this version of the value set |
name | Σ | 0..1 | string | Informal name for this value set |
useContext | Σ | 0..* | CodeableConcept | Content intends to support these contexts ConformanceUseContext (Extensible) |
immutable | Σ | 0..1 | boolean | Indicates whether or not any change to the content logical definition may occur |
publisher | Σ | 0..1 | string | Name of the publisher (Organization or individual) |
contact | Σ | 0..* | Element | Contact details of the publisher |
name | Σ | 0..1 | string | Name of a individual to contact |
telecom | Σ | 0..* | ContactPoint | Contact details for individual or publisher |
description | Σ | 0..1 | string | Human language description of the value set |
requirements | 0..1 | string | Why is this needed? | |
copyright | 0..1 | string | Use and/or Publishing restrictions | |
status | ?! Σ | 1..1 | code | draft | active | retired ConformanceResourceStatus (Required) |
experimental | Σ | 0..1 | boolean | If for testing purposes, not real usage |
extensible | Σ | 0..1 | boolean | Whether this is intended to be used with an extensible binding |
date | Σ | 0..1 | dateTime | Date for given status |
lockedDate | Σ | 0..1 | date | Fixed date for all referenced code systems and value sets |
define | Σ I | 0..1 | Element | When value set defines its own codes Codes must be unique Within a code system definition, all the codes SHALL be unique |
system | Σ | 1..1 | uri | URI to identify the code system |
version | Σ | 0..1 | string | Version of this system |
caseSensitive | Σ | 0..1 | boolean | If code comparison is case sensitive |
concept | 0..* | Element | Concepts in the code system | |
code | 1..1 | code | Code that identifies concept | |
abstract | 0..1 | boolean | If this code is not for use as a real concept | |
display | 0..1 | string | Text to Display to the user | |
definition | 0..1 | string | Formal Definition | |
designation | 0..* | Element | Additional representations for the concept | |
language | 0..1 | code | Language of the designation Language (Required) | |
use | 0..1 | Coding | Details how this designation would be used ConceptDesignationUse (Extensible) | |
value | 1..1 | string | The text value for this designation | |
concept | 0..* | see concept | Child Concepts (is-a / contains) | |
compose | I | 0..1 | Element | When value set includes codes from elsewhere A value set composition SHALL have an include or an import |
import | Σ I | 0..* | uri | Import the contents of another value set |
include | Σ I | 0..* | Element | Include one or more codes from a code system |
system | Σ | 1..1 | uri | The system the codes come from |
version | Σ | 0..1 | string | Specific version of the code system referred to |
concept | 0..* | Element | A concept defined in the system | |
code | 1..1 | code | Code or expression from system | |
display | 0..1 | string | Test to display for this code for this value set | |
designation | 0..* | see designation | Additional representations for this valueset | |
filter | 0..* | Element | Select codes/concepts by their properties (including relationships) | |
property | 1..1 | code | A property defined by the code system | |
op | 1..1 | code | = | is-a | is-not-a | regex | in | not-in FilterOperator (Required) | |
value | 1..1 | code | Code from the system, or regex criteria | |
exclude | I | 0..* | see include | Explicitly exclude codes |
expansion | I | 0..1 | Element | Used when the value set is "expanded" |
identifier | 1..1 | uri | Uniquely identifies this expansion | |
timestamp | 1..1 | dateTime | Time valueset expansion happened | |
parameter | 0..* | Element | Parameter that controlled the expansion process | |
name | 1..1 | string | Name as assigned by server | |
value[x] | I | Value of the parameter | ||
valueString | 0..1 | string | ||
valueBoolean | 0..1 | boolean | ||
valueInteger | 0..1 | integer | ||
valueDecimal | 0..1 | decimal | ||
valueUri | 0..1 | uri | ||
valueCode | 0..1 | code | ||
contains | I | 0..* | Element | Codes in the value set Must have a code if not abstract SHALL have a code or a display Must have a system if a code is present |
system | 0..1 | uri | System value for the code | |
abstract | 0..1 | boolean | If user cannot select this entry | |
version | 0..1 | string | Version in which this code / display is defined | |
code | I | 0..1 | code | Code - if blank, this is not a choosable code |
display | I | 0..1 | string | User display for the concept |
contains | 0..* | see contains | Codes contained in this concept |
XML Template
<ValueSet xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <url value="[uri]"/><!-- 0..1 Globally unique logical id for value set --> <identifier><!-- 0..1 Identifier Additional identifier for the value set (v2 / CDA) --></identifier> <version value="[string]"/><!-- 0..1 Logical id for this version of the value set --> <name value="[string]"/><!-- 0..1 Informal name for this value set --> <useContext><!-- 0..* CodeableConcept Content intends to support these contexts --></useContext> <immutable value="[boolean]"/><!-- 0..1 Indicates whether or not any change to the content logical definition may occur --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) --> <contact> <!-- 0..* Contact details of the publisher --> <name value="[string]"/><!-- 0..1 Name of a individual to contact --> <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom> </contact> <description value="[string]"/><!-- 0..1 Human language description of the value set --> <requirements value="[string]"/><!-- 0..1 Why is this needed? --> <copyright value="[string]"/><!-- 0..1 Use and/or Publishing restrictions --> <status value="[code]"/><!-- 1..1 draft | active | retired --> <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage --> <extensible value="[boolean]"/><!-- 0..1 Whether this is intended to be used with an extensible binding --> <date value="[dateTime]"/><!-- 0..1 Date for given status --> <lockedDate value="[date]"/><!-- 0..1 Fixed date for all referenced code systems and value sets --> <define> <!-- 0..1 When value set defines its own codes --> <system value="[uri]"/><!-- 1..1 URI to identify the code system --> <version value="[string]"/><!-- 0..1 Version of this system --> <caseSensitive value="[boolean]"/><!-- 0..1 If code comparison is case sensitive --> <concept> <!-- 0..* Concepts in the code system --> <code value="[code]"/><!-- 1..1 Code that identifies concept --> <abstract value="[boolean]"/><!-- 0..1 If this code is not for use as a real concept --> <display value="[string]"/><!-- 0..1 Text to Display to the user --> <definition value="[string]"/><!-- 0..1 Formal Definition --> <designation> <!-- 0..* Additional representations for the concept --> <language value="[code]"/><!-- 0..1 Language of the designation --> <use><!-- 0..1 Coding Details how this designation would be used --></use> <value value="[string]"/><!-- 1..1 The text value for this designation --> </designation> <concept><!-- 0..* Content as for ValueSet.define.concept Child Concepts (is-a / contains) --></concept> </concept> </define> <compose> <!-- 0..1 When value set includes codes from elsewhere --> <import value="[uri]"/><!-- 0..* Import the contents of another value set --> <include> <!-- 0..* Include one or more codes from a code system --> <system value="[uri]"/><!-- 1..1 The system the codes come from --> <version value="[string]"/><!-- 0..1 Specific version of the code system referred to --> <concept> <!-- 0..* A concept defined in the system --> <code value="[code]"/><!-- 1..1 Code or expression from system --> <display value="[string]"/><!-- 0..1 Test to display for this code for this value set --> <designation><!-- 0..* Content as for ValueSet.define.concept.designation Additional representations for this valueset --></designation> </concept> <filter> <!-- 0..* Select codes/concepts by their properties (including relationships) --> <property value="[code]"/><!-- 1..1 A property defined by the code system --> <op value="[code]"/><!-- 1..1 = | is-a | is-not-a | regex | in | not-in --> <value value="[code]"/><!-- 1..1 Code from the system, or regex criteria --> </filter> </include> <exclude><!-- 0..* Content as for ValueSet.compose.include Explicitly exclude codes --></exclude> </compose> <expansion> <!-- 0..1 Used when the value set is "expanded" --> <identifier value="[uri]"/><!-- 1..1 Uniquely identifies this expansion --> <timestamp value="[dateTime]"/><!-- 1..1 Time valueset expansion happened --> <parameter> <!-- 0..* Parameter that controlled the expansion process --> <name value="[string]"/><!-- 1..1 Name as assigned by server --> <value[x]><!-- 0..1 string|boolean|integer|decimal|uri|code Value of the parameter --></value[x]> </parameter> <contains> <!-- 0..* Codes in the value set --> <system value="[uri]"/><!-- 0..1 System value for the code --> <abstract value="[boolean]"/><!-- 0..1 If user cannot select this entry --> <version value="[string]"/><!-- 0..1 Version in which this code / display is defined --> <code value="[code]"/><!-- 0..1 Code - if blank, this is not a choosable code --> <display value="[string]"/><!-- 0..1 User display for the concept --> <contains><!-- 0..* Content as for ValueSet.expansion.contains Codes contained in this concept --></contains> </contains> </expansion> </ValueSet>
JSON Template
{ "resourceType" : "ValueSet", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "url" : "<uri>", // Globally unique logical id for value set "identifier" : { Identifier }, // Additional identifier for the value set (v2 / CDA) "version" : "<string>", // Logical id for this version of the value set "name" : "<string>", // Informal name for this value set "useContext" : [{ CodeableConcept }], // Content intends to support these contexts "immutable" : <boolean>, // Indicates whether or not any change to the content logical definition may occur "publisher" : "<string>", // Name of the publisher (Organization or individual) "contact" : [{ // Contact details of the publisher "name" : "<string>", // Name of a individual to contact "telecom" : [{ ContactPoint }] // Contact details for individual or publisher }], "description" : "<string>", // Human language description of the value set "requirements" : "<string>", // Why is this needed? "copyright" : "<string>", // Use and/or Publishing restrictions "status" : "<code>", // R! draft | active | retired "experimental" : <boolean>, // If for testing purposes, not real usage "extensible" : <boolean>, // Whether this is intended to be used with an extensible binding "date" : "<dateTime>", // Date for given status "lockedDate" : "<date>", // Fixed date for all referenced code systems and value sets "define" : { // C? When value set defines its own codes "system" : "<uri>", // R! URI to identify the code system "version" : "<string>", // Version of this system "caseSensitive" : <boolean>, // If code comparison is case sensitive "concept" : [{ // Concepts in the code system "code" : "<code>", // R! Code that identifies concept "abstract" : <boolean>, // If this code is not for use as a real concept "display" : "<string>", // Text to Display to the user "definition" : "<string>", // Formal Definition "designation" : [{ // Additional representations for the concept "language" : "<code>", // Language of the designation "use" : { Coding }, // Details how this designation would be used "value" : "<string>" // R! The text value for this designation }], "concept" : [{ Content as for ValueSet.define.concept }] // Child Concepts (is-a / contains) }] }, "compose" : { // C? When value set includes codes from elsewhere "import" : ["<uri>"], // C? Import the contents of another value set "include" : [{ // C? Include one or more codes from a code system "system" : "<uri>", // R! The system the codes come from "version" : "<string>", // Specific version of the code system referred to "concept" : [{ // A concept defined in the system "code" : "<code>", // R! Code or expression from system "display" : "<string>", // Test to display for this code for this value set "designation" : [{ Content as for ValueSet.define.concept.designation }] // Additional representations for this valueset }], "filter" : [{ // Select codes/concepts by their properties (including relationships) "property" : "<code>", // R! A property defined by the code system "op" : "<code>", // R! = | is-a | is-not-a | regex | in | not-in "value" : "<code>" // R! Code from the system, or regex criteria }] }], "exclude" : [{ Content as for ValueSet.compose.include }] // C? Explicitly exclude codes }, "expansion" : { // C? Used when the value set is "expanded" "identifier" : "<uri>", // R! Uniquely identifies this expansion "timestamp" : "<dateTime>", // R! Time valueset expansion happened "parameter" : [{ // Parameter that controlled the expansion process "name" : "<string>", // R! Name as assigned by server // value[x]: Value of the parameter. One of these 6: "valueString" : "<string>" "valueBoolean" : <boolean> "valueInteger" : <integer> "valueDecimal" : <decimal> "valueUri" : "<uri>" "valueCode" : "<code>" }], "contains" : [{ // Codes in the value set "system" : "<uri>", // System value for the code "abstract" : <boolean>, // If user cannot select this entry "version" : "<string>", // Version in which this code / display is defined "code" : "<code>", // C? Code - if blank, this is not a choosable code "display" : "<string>", // C? User display for the concept "contains" : [{ Content as for ValueSet.expansion.contains }] // Codes contained in this concept }] } }
Alternate definitions: Schema/Schematron, Resource Profile (XML, JSON)
Path | Definition | Type | Reference |
---|---|---|---|
ValueSet.useContext | Indicates the countries, regions, disciplines and other aspects of use this artifact is targeted for use within | Extensible | http://hl7.org/fhir/vs/use-context |
ValueSet.status | The lifecycle status of a Value Set or Concept Map | Required | http://hl7.org/fhir/conformance-resource-status |
ValueSet.define.concept.designation.language | A human language | Required | IETF language tag |
ValueSet.define.concept.designation.use | Details of how a designation would be used | Extensible | http://hl7.org/fhir/vs/designation-use |
ValueSet.compose.include.filter.op | The kind of operation to perform as a part of a property based filter | Required | http://hl7.org/fhir/filter-operator |
The identifier and version elements may be used to reference this value set in a design, a profile, a CDA template or V3 message (valueSet and valueSetVersion). These different contexts may make additional restrictions on the possible values of these elements. These elements are generally not needed when using value sets with FHIR implementations as they can make use of the innate identifier and versioning mechanism associated with the resource
Valuesets can define their own codes. A value set that defines codes automatically includes all the codes it defines, and is useful for simple sets of codes that are highly specific and context-dependent. The value set and the code system are both given URI identifiers by which they may be identified from elsewhere (ValueSet.identifier and ValueSet.define.system). These identifiers SHALL be different.
Note: Value sets only define their own codes when they are not defined elsewhere, such as codes defined in SNOMED CT, LOINC, RxNorm etc. To specify a value set that is made up of codes from other code systems, see "compose" below.
Most code systems evolve over time, due to corrections, clarifications, and changes to approach or underlying knowledge or reality. If these changes lead to the meanings of existing codes changing significantly, then the interpretation of the code system becomes version dependent. This significantly complicates implementation based on the code system, to the point where it is not clear that safety can be assured, so SHOULD be avoided whenever possible. It is preferable to assign a new identifier to a code system when any concepts in it have a significant change in meaning (for example, the German diagnostic classification code system ICD10GM2009 has a different system to ICD10GM2008), but this also can have substantial impact on implementation, so is often not practical - for instance, SNOMED CT has a complex version release framework, which may lead to variations in meaning of concepts, but there is only one identifier for LOINC.
For this reason, a code system MAY provide a version identifer in ValueSet.define.version. The version specific identifier SHOULD be provided whenever there are potentially significant changes in meaning across multiple releases of a code system. There is no particular format requirement for the version identifier, though HL7 recommends a date based approach.
When the value set definition of a code system includes a version identifier, the version identifier SHOULD be used in Coding instances that refer to the code system.
Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.
Value sets that include codes defined in some other code system are most useful when dealing with large general code systems such as SNOMED CT, LOINC, RxNorm or various IETF code sets including human language. The value set can be a simple list of included codes or it can be some kind of general selection criteria using the facilities provided by the code system.
When a value set enumerates codes, it is also able to define an alternative display for the code that is to be used where ever the value set is expanded and used in a UI. This facility is provided to cover the following circumstances:
Note that care must be taken in order to avoid "changing the meaning" of the concept by implying that it means something other than the explicit definition of the concept in the underlying system (e.g. in the case above, using a display "Glucose Concentration at 10pm"). For this reason, some contexts of use do not allow a display to be associated with a specific code.
The display name for the code in the value set is only used in the UI. The display in a a Coding must be taken from the underlying system, even if a value set is referenced explicitly in the Coding. The alternative display specified in the value set would go in CodeableConcept.text.
How filters are used with various code systems:
System | Property Name | Operation | Value | Definition | Example |
---|---|---|---|---|---|
V3 Code systems | concept | is-a | [code] | Includes all codes that have a transitive is-a relationship with the concept identified by the value | Relationship Type |
A value set can be "expanded", where the definition of the value set is used to create a simple collection of codes suitable for use for data entry or validation. This is most useful when a value set includes all the children of a code or a set of codes by filter.
A resource that represents a value set expansion includes the same identification details as the definition of the value set, and MAY include the definition of the value set (define and compose elements). In addition it has a expansion element which contains the list of codes that constitute the value set expansion. If the expansion is heirarchical (codes contain other concepts), there is no implication about the logical relationship between them; this is guidance for helping human user navigate the choice of codes that may or may not relate to the logical definitions of the codes or concepts.
When a request for an expansion is received (e.g. for the $expand operation, the following process should be followed:
The "result set" is then represented in expansion. Note that the expansion structure is inherently ordered, and also provides support for a hierarchical tree of items. This specification does not fix the meaning of use of either of these, and the conceptual approach described should not be understood to prohibit any implementation approach in these regards. There is a defined operation to ask a server to perform this expansion.
An expansion may include entries in the expansion that only serve an arbitrary grouping purpose, to make it easier for a human to use the list. These entries have no system or code, and must be marked as abstract. Note that the value set define and compose offer no support for defining these, but this does not exclude servers from using extensions or other knowledge to introduce such groups as an implementation feature.
Whether to store expanded value sets, or simply to store their definitions, and expand on the fly is a matter for system deployment. Any system that stores an expansion must be concerned with how to determine whether it is current, which requires deep knowledge of how the expansion was created. A system with a dedicated terminology server that returns expansions on demand avoids this problem, but leaves open the question of how to audit the specific expansion that was used for a particular case. One solution to this is to use a dedicated terminology server, and have the clients ask for expansions on demand based on the value set definitions, and for the server to store (and reuse as appropriate) the returned expansion (ValueSet.expansion.identifier).
Sometimes code systems may be used to represent more complex information than just code, display name and code system. For example a code system of drug information, of observation types, of locations, and other similar registry-type information. In FHIR, these are handled by splitting the concept into two distinct parts - the ValueSet resource is used to manage the codes, display names and relationships. A separate "detail" resource (e.g. Medication for drugs, DataElement for observation types, Location for location, etc.) is used to convey detailed information (dose form & strength, allowed data type or permitted values, address & hours of operation, etc.) One "detail" resource instance is created for each code.
This division accomplishes several things:
Note that this division in FHIR does not imply that a similar division is required in the internal representation used by systems exposing a FHIR interface. Similarly, some systems may choose to only expose or maintain one aspect of such information types (i.e. only the discrete resource instances or only the value set.)
The linkage between the "detail" resource and the ValueSet is accomplished via the
code
element (or equivalent) on the detail resource. As well, the "name" or
"title" on the detail resource generally corresponds with the display name on the matching
code. Most detail resources will also have an "identifier" element. This can be
set to the same value and namespace as the code, but if the only identifier a resource has
is its defining code, it may be better to omit the identifier entirely.
Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
Name | Type | Description | Paths |
code | token | A code defined in the value set | ValueSet.define.concept.code |
context | token | A use context assigned to the value set | ValueSet.useContext |
date | date | The value set publication date | ValueSet.date |
description | string | Text search in the description of the value set | ValueSet.description |
expansion | uri | Uniquely identifies this expansion | ValueSet.expansion.identifier |
identifier | token | The identifier for the value set | ValueSet.identifier |
name | string | The name of the value set | ValueSet.name |
publisher | string | Name of the publisher of the value set | ValueSet.publisher |
reference | uri | A code system included or excluded in the value set or an imported value set | ValueSet.compose.include.system |
status | token | The status of the value set | ValueSet.status |
system | uri | The system for any codes defined by this value set | ValueSet.define.system |
url | uri | The logical url for the value set | ValueSet.url |
version | token | The version identifier of the value set | ValueSet.version |