6.13 ValueSet リソース

logo fhir

HomeInfrastructureValueSet [valueset]

Resource ValueSet - Content6.13

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

The resource name as it appears in a RESTful URL is [root]/valueset/

Value sets may be constructed in one of two ways:

  • A value set can define its own codes, and/or
  • A value set can be composed of codes defined in other code systems, either by listing the codes or by providing a set of selection criteria

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.

ValueSet resources are 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.

Resource Content6.13.1

<ValueSet xmlns="http://hl7.org/fhir"> <!-- from Resource: extension, narrative, 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 | experimental | review | production | withdrawn | superseded § --> <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage § --> <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 --> <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 --> <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 --> <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 --> <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

Terminology Bindings 6.13.1.1

Constraints6.13.1.2

  • Inv-2: A value set with only one import must also have an include and/or an exclude unless the value set defines its own codes (xpath: not(exists(f:compose)) or (count(f:compose/f:import)!=1 or exists(f:compose/f:include) or exists(f:compose/f:exclude) or exists(f:define)))
  • Inv-5: Value set must contain either a define, a compose, or an expansion element (xpath: exists(f:define) or exists(f:compose) or exists(f:expansion))
  • Inv-7: A defined code system (if present) must have a different identifier to the value set itself (xpath: not(exists(f:define)) or (f:define/f:system/@value != f:identifier/@value))
  • Inv-1: On ValueSet.compose: A value set composition must have an include or an import (xpath on f:ValueSet/f:compose:exists(f:include) or exists(f:import))
  • Inv-6: On ValueSet.expansion.contains: Must have a code or a display (xpath on f:ValueSet/f:expansion/f:contains:exists(f:code) or exists(f:display))

Identifier and Version6.13.2

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

Value Sets that define codes6.13.3

A value set that defines codes automatically includes all the codes it defines. This kind of value set 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 must be different.

  • ValueSet.define.system is the URI that identifies these codes when used in a Coding
  • The usability of the codes is closely linked to the quality of the definitions. Although a definition is not required for each concept, a good definition SHOULD be provided
  • If concepts contain other concepts, then the contained concepts are "subsumed" by the containing concept (there is an "is-a" relationship between the codes).
  • An abstract concept must have contained concepts

Value Sets that include codes defined elsewhere6.13.4

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.

  • Within an include or exclude criterion, multiple filters and concept selections are intersected. All the conditions specified must be true.
  • The value set always includes any codes it defines itself. A typical use for this is when including a set of codes from elsewhere, and adding a few additional codes to cover cases not catered to by the included codes
  • An include statement includes any enumerated codes and any codes that meet the filter criteria
  • If the system reference is not version specific and filters are present, then the contents of the value set are open and change over time as the underlying code systems are updated
  • The content of the value set is constructed by unioning of all the import and include statements and then eliminating any of the 'excluded' codes.
  • A value set needs to do something. It can't simply include an existing value set without also including additional content or excluding content
  • Using the property filters is only possible where the underlying code system defines appropriate properties. Note that in some cases, the underlying code system defines the logical concepts but not the syntax for exercising them. In such cases, the literal definitions may be provided by a third party. See below for notes about its use against common code systems

Code systems Note6.13.4.1

How filters are used with various code systems:

Value Set Expansion 6.13.5

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.

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=...

This is a request to produce a value set expansion for the value set with the provided id. The value set can be identified by other means, such as identifier and version. There is an additional parameter flat=true|false, which the client can use to specify whether a hierarchical value set expansion is acceptable or not.

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.

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 heirachical (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.

Search Parameters 6.13.6

Search Parameters for RESTful searches. The standard parameters also apply. See Searching for more information.