Page Status: updated 2023-09-05

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..1string
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
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
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
lockedDateΣ0..1date
inactiveΣ0..1boolean
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
systemS Σ I0..1uri
versionS Σ0..1string
id0..1string
definitionS I0..1Extension(string)
modifierExtensionΣ ?! I0..*Extension
codeS1..1code
displayS0..1string
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
languageS0..1codeBinding
id0..1string
extensionI0..*Extension
systemS Σ0..1uriBinding
versionΣ0..1string
codeS Σ0..1code
displayS Σ0..1string
userSelectedΣ0..1boolean
valueS1..1string
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
propertyΣ1..1code
opΣ1..1codeBinding
valueΣ1..1string
valueSetΣ I0..*canonical(ValueSet)
excludeI0..*see (include)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
identifier0..1uri
timestamp1..1dateTime
total0..1integer
offset0..1integer
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
name1..1string
valueStringstring
valueBooleanboolean
valueIntegerinteger
valueDecimaldecimal
valueUriuri
valueCodecode
valueDateTimedateTime
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
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 of a value set
../ValueSet/access-types
_history A vread to get all versions of a value set
../ValueSet/access-types/_history
_history/[vid] A vread to get a specific version of a value set
../ValueSet/access-types/_history/1.0.3
code Code to search for. All value sets containing the code will be returned.
..?code=43067004

Other operations

$validate-code

Invocations

GET ../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.

Parameters (In)

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=le2021-03-01
le and eq are supported. No prefix is by default the same as eq.
display A display text to compare with
..&display=h%E5rbotten

Parameters (Out)

Parameter Description Comment
result True if the concept details supplied are valid
true
message Information about the outcome
Koden "14175009" existerar.
display A valid display for the concept if the system wishes to display this to a user
reumatisk ledsjukdom