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

6.13 Resource ValueSet - Content

A value set specifies a set of codes drawn from one or more code systems.

6.13.1 Scope and Usage

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.

6.13.2 Boundaries and Relationships

6.13.3 Background and Context

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.

6.13.4 Resource Content

ValueSet (Resource)The identifier that is used to identify this value set when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)identifier : string 0..1The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestampversion : string 0..1A free text natural language name describing the value setname : string 1..1The name of the individual or organization that published the value setpublisher : string 0..1Contacts of the publisher to assist a user in finding and communicating with the publishertelecom : Contact 0..*A free text natural language description of the use of the value set - reason for definition, conditions of use, etcdescription : string 1..1A copyright statement relating to the value set and/or its contentscopyright : string 0..1The status of the value set (this element modifies the meaning of other elements)status : code 1..1 <<The lifecycle status of a Value Set or Concept MapValueSetStatus>>This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usageexperimental : boolean 0..1Whether this is intended to be used with an extensible binding or notextensible : boolean 0..1The date that the value set status was last changeddate : dateTime 0..1DefineURI to identify the code systemsystem : uri 1..1The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and trackedversion : string 0..1If code comparison is case sensitive when codes within this system are compared to each othercaseSensitive : boolean 0..1ConceptCode that identifies conceptcode : code 1..1If this code is not for use as a real conceptabstract : boolean 0..1Text to Display to the userdisplay : string 0..1The formal definition of the concept. Formal definitions are not required, because of the prevalence of legacy systems without them, but they are highly recommended, as without them there is no formal meaning associated with the conceptdefinition : string 0..1ComposeIncludes the contents of the referenced value set as a part of the contents of this value setimport : uri 0..*ConceptSetThe code system from which the selected codes come fromsystem : uri 1..1The version of the code system that the codes are selected fromversion : string 0..1Specifies a code or concept to be included or excluded. The list of codes is considered ordered, though the order may not have any particular significancecode : code 0..*FilterA code that identifies a property defined in the code systemproperty : code 1..1The kind of operation to perform as a part of the filter criteriaop : code 1..1 <<The kind of operation to perform as a part of a property based filterFilterOperator>>The match value may be either a code defined by the system, or a string value which is used a regex match on the literal string of the property valuevalue : code 1..1ExpansionAn identifier that uniquely identifies this expansion of the valueset. Systems may re-use the same identifier as long as the expansion and the definition remain the same, but are not required to do soidentifier : Identifier 0..1Time valueset expansion happenedtimestamp : instant 1..1ContainsSystem value for the codesystem : uri 0..1Code - if blank, this is not a choosable codecode : code 0..1User display for the conceptdisplay : string 0..1Child Concepts (is-a / contains)concept0..*Concepts in the code systemconcept0..*When value set defines its own codesdefine0..1Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be truefilter0..*Include one or more codes from a code systeminclude0..*Exclude one or more codes from the value setexclude0..*When value set includes codes from elsewherecompose0..1Codes contained in this conceptcontains0..*Codes in the value setcontains0..*When value set is an expansionexpansion0..1

This resource is referenced by ConceptMap, Profile and Questionnaire

<ValueSet xmlns="http://hl7.org/fhir"> doco
 <!-- 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

6.13.4.1 Terminology Bindings

PathDefinitionTypeReference
ValueSet.status The lifecycle status of a Value Set or Concept MapFixedhttp://hl7.org/fhir/valueset-status
ValueSet.compose.include.filter.op The kind of operation to perform as a part of a property based filterFixedhttp://hl7.org/fhir/filter-operator

6.13.4.2 Constraints

6.13.5 Identifier and Version

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

6.13.6 Value Sets that define codes

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.

6.13.6.1 Versioning Code Systems

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.

6.13.7 Value Sets that include codes defined elsewhere

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.

6.13.7.1 Code systems Note

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

6.13.8 Value Set Expansion

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.

6.13.9 Value Set Validation

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.

6.13.10 Search Parameters

Search parameters for this resource. The standard parameters also apply. See Searching for more information about searching in REST, messaging, and services.

NameTypeDescriptionPaths
_idtokenThe logical resource id associated with the resource (must be supported by all servers)
_languagetokenThe language of the resource
codetokenA code defined in the value setValueSet.define.concept.code
datedateThe value set publication dateValueSet.date
descriptionstringText search in the description of the value setValueSet.description
identifiertokenThe identifier of the value setValueSet.identifier
namestringThe name of the value setValueSet.name
publisherstringName of the publisher of the value setValueSet.publisher
referencetokenA code system included or excluded in the value set or an imported value setValueSet.compose.include.system
statustokenThe status of the value setValueSet.status
systemtokenThe system for any codes defined by this value setValueSet.define.system
versiontokenThe version identifier of the value setValueSet.version

comments powered by Disqus