This page is part of the FHIR Specification (v0.0.82: DSTU 1). 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
A value set specifies a set of codes drawn from one or more code systems.
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.
The ValueSet resource design is based on the fundamental definitions found in the HL7 v3 Core Principles document and the functionality described in the OMG CTS 2 specification. Value set resources can be converted to CTS2 value set and code system resources.
This resource is referenced by ConceptMap, Profile and Questionnaire
<ValueSet xmlns="http://hl7.org/fhir"> <!-- from Resource: extension, modifierExtension, language, text, and contained --> <identifier value="[string]"/><!-- 0..1 Logical id to reference this value set § --> <version value="[string]"/><!-- 0..1 Logical id for this version of the value set § --> <name value="[string]"/><!-- 1..1 Informal name for this value set § --> <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) § --> <telecom><!-- 0..* Contact Contact information of the publisher § --></telecom> <description value="[string]"/><!-- 1..1 Human language description of the value set § --> <copyright value="[string]"/><!-- 0..1 About the value set or its content --> <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 § --> <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 --> <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 § --> <code value="[code]"/><!-- 0..* Code or concept from system --> <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 When value set is an expansion --> <identifier><!-- 0..1 Identifier Uniquely identifies this expansion --></identifier> <timestamp value="[instant]"/><!-- 1..1 Time valueset expansion happened --> <contains> <!-- 0..* Codes in the value set --> <system value="[uri]"/><!-- 0..1 System value for the code --> <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>
Alternate definitions: Schema/Schematron, Resource Profile
Path | Definition | Type | Reference |
---|---|---|---|
ValueSet.status | The lifecycle status of a Value Set or Concept Map | Fixed | http://hl7.org/fhir/valueset-status |
ValueSet.compose.include.filter.op | The kind of operation to perform as a part of a property based filter | Fixed | 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, LOINC has re-defined the meaning of codes in the past, 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.
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.
How filters are used with various code systems:
System | Property Name | Operation | Value | Definition | Example |
---|---|---|---|---|---|
SNOMED CT | expression | = | [expression] | The result of the filter is the result of executing the given SNOMED CT expression (see the draft SNOMED CT Query Language) | (no example yet) |
concept | is-a | [concept] | Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value The SNOMED CT Query Language expression for this is DescendentsAndSelf([concept]) |
Administation Methods | |
concept | in | [concept] | Includes all concept ids that are in the reference set identified by the concept Id provided as the value The SNOMED CT Query Language expression for this is MembersOf([concept]) |
Administation Methods | |
LOINC | [property] | = / regex | [value] | Includes all codes where the named property has the given value. Valid Property Names are all the names listed in the "Field Name" column in LOINC Database Structure (Appendix A of the LOINC manual). Of these, the 6 properties COMPONENT, PROPERTY, TIME_ASPCT, SYSTEM, SCALE_TYP, and METHOD_TYP are most likely to be useful. In addition, the following 5 property names are defined in the Document Ontology: Document.Kind, Document.TypeOfService, Document.Setting, Document.Role, and Document.SubjectMatterDomain. | Document Codes |
Type | = | Method | All the LOINC codes for particular methods defined in LOINC | Observation Methods | |
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.
In general, the following process should be followed when expanding a value set:
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 codes. 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.
An application MAY offer to expand value sets for other applications. In this case, the standard way to produce a value set expansion is to perform a query on the value set with _query=expand:
GET [service-url]/ValueSet/?_query=expand&id=:valueSet&...
This is a request to produce a value set expansion for the value set with the provided id which is either a logical id, or an absolute reference to a value set. The value set can be identified by other means, such as identifier and version. Servers can define their own additional parameters that influence the expansion process, such in relation to order and hierarchy.
The value set expansion returned by this query should be treated as a transient result that will change over time (whether it does or not depends on how the value set is specified), so applications should repeat the query each time the value set is used.
An application may offer to provide code validation services for other applications. In this case, the standard way for an application to ask for validation is to perform a query on the value set with _query=validate:
GET [service-url]/ValueSet/?_query=validate&id=:valueSet&system=:system&version=:version&code=:code&...
The values for system, version, and code are those from the Coding data type. Version is optional, and code and system are mandatory. Additionally, the parameter "coding" or "codeableconcept" can be used - the value of these parameters is a URL encoded XML or JSON representation of the two data types respectively. An additional boolean parameter "extensible" can be provided to specify whether the applicable binding is extensible or not.
The result of this query is an Operation Outcome. If there are no errors in the outcome (OperationOutcome.issue.severity), then the code is considered to be valid.
Search parameters for this resource. The standard parameters also apply. See Searching for more information about searching in REST, messaging, and services.
Name | Type | Description | Paths |
_id | token | The logical resource id associated with the resource (must be supported by all servers) | |
_language | token | The language of the resource | |
code | token | A code defined in the value set | ValueSet.define.concept.code |
date | date | The value set publication date | ValueSet.date |
description | string | Text search in the description of the value set | ValueSet.description |
identifier | token | The identifier of 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 | token | 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 | token | The system for any codes defined by this value set | ValueSet.define.system |
version | token | The version identifier of the value set | ValueSet.version |