Page Status: updated 2022-03-22

ValueSet

Page index

Introduction

The ValueSet resource, shown in the profile NLLValueSet, represents a set of codes that is used in a specific context.

The codes in a value set are a combination of codes from one or many code systems. The value set can include all codes in a code system, or only a subset of the codes from the code system.

Coded values are used in many different resources, e.g. Medication, MedicationRequest etc. Elements of type 'code' or 'Coding' are bound to a value set in a profile. However when data is exchanged in run time, coded values are described by the code and the code system, not by the value set.

Overview

idS Σ0..1System.String
urlS Σ0..1uri
identifierΣ0..*Identifier
versionS Σ0..1string
nameS Σ I0..1string
titleS Σ0..1string
statusS Σ ?!1..1codeBinding
experimentalΣ0..1boolean
dateS Σ0..1dateTime
publisherS Σ0..1string
contactΣ0..*ContactDetail
descriptionS0..1markdown
useContextΣ0..*UsageContext
jurisdictionΣ0..*CodeableConceptBinding
immutableΣ0..1boolean
purpose0..1markdown
copyright0..1markdown
lockedDateΣ0..1date
inactiveΣ0..1boolean
systemS Σ I0..1uri
versionS Σ0..1string
definitionS I0..1Extension(string)
codeS1..1code
displayS0..1string
languageS0..1codeBinding
systemS Σ0..1uriBinding
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
valueS1..1string
propertyΣ1..1code
opΣ1..1codeBinding
valueΣ1..1string
valueSetΣ I0..*canonical(ValueSet)
excludeI0..*see (include)
identifier0..1uri
timestamp1..1dateTime
total0..1integer
offset0..1integer
name1..1string
valueStringstring
valueBooleanboolean
valueIntegerinteger
valueDecimaldecimal
valueUriuri
valueCodecode
valueDateTimedateTime
system0..1uri
abstract0..1boolean
inactive0..1boolean
version0..1string
codeI0..1code
displayI0..1string
designation0..*see (designation)
contains0..*see (contains)

Details

Description of all elements can be found here, Element descriptions.

Mapping of FHIR element names to the National Medication List names can be found here, Element language mappings.

There is an extension, concept.definition, that some value sets use to provide defintions of each concept. Note that the definition is not visible in the 'overview' tab when looking at a value set. The definition is however visible in the Table, XML and JSON tabs.

Supported operations

HTTP methods

Operation Supported Comment
Search (GET, POST) yes See below for supported search options.
Insert (POST) no
Update (PUT) no
Delete (DEL) no
Operation (GET, POST) yes See below for supported extended operations.

When interacting with this resource a set of HTTP-headers must be included in the request, see HTTP Header and Authorization.

Query operations

Supported queries

The following query alternatives are available for this resource.

  1. ../ValueSet
  2. ../ValueSet/[id]
  3. ../ValueSet/[id]/_history{/[vid]}
  4. ../ValueSet?code=[string]

Compartment searches

Compartments are not supported by this resource.

Include & reverse includes

Include and revinclude are not supported by this resource.

For generic information about how to search in FHIR look here.

Search parameters

The table below shows all supported search parameters.

Parameter Description Comment
ValueSet/[id] A read based on the logical ID (UUID) of a value set
../ValueSet/<uuid>
_history A vread to get all versions of a value set
../ValueSet/<uuid>/_history
_history/[vid] A vread to get a specific version of a value set
../ValueSet/<uuid>/_history/3
code Code to search for. All value sets containing the code will be returned.
..?code=43067004

Other operations

Operation Comment
$validate-code

Invocations

POST ../ValueSet/[id]/$validate-code?code=[string]{&version=[string]}{&date=[string]}{&display=[string]}

This operation does NOT change content.

This operation checks if a code exists in the current version of a specific value set unless a date or version is specified. It can also be used to check the display text.

This is a standard operation in FHIR, see $validate-code for more information.

Parameter Description Comment
code Code to search for
..?code=43067004
version Version of the value set
..&version=1.0.3
date Version of the value set at a date
..&date=20210301
display A display text to compare with
..&display=h%E5rbotten