ValueSet
Last updated
Last updated
Snow Owl TS supports interactions and operations related to value sets, as described in the FHIR R5 terminology service specification. For certain toolings implicit value sets are also expandable; these are described below in detail.
Value set URIs following SNOMED International's URI format are evaluated based on the associated SNOMED CT code system's content. The following URIs can be set as the url
parameter of the request:
http://snomed.info/sct/900000000000207008?fhir_vs
- all concepts of the International Edition (may include a version suffix as well).
The implicit value set URI for SNOMED CT code systems should always include a module identifier to avoid confusion.
http://snomed.info/sct/900000000000207008?fhir_vs=isa/409822003
- all concepts of the International Edition that are descendants of 409822003|Domain bacteria|
http://snomed.info/sct/900000000000207008?fhir_vs=refset
- all reference set identifier concepts in the International Edition
http://snomed.info/sct/900000000000207008?fhir_vs=refset/733073007
- all concepts of the International Edition that are members of the reference set 733073007|OWL axiom reference set|
Regular value sets are only supported in the paid edition of Snow Owl.
GET requests that include the value set identifier as the final path segment(s) return the resource state:
PUT requests that include a resource identifier will update an existing value set or create a new instance:
The response code is 201 Created
if the resource did not exist previously, and the URL is included in the Location
response header. Existing value sets (like in the example above) are updated and a 200 OK
response is returned instead.
If an error occurs during the update, a 400 Bad Request
response with an OperationOutcome
resource as the response body is emitted instead.
The following non-standard request headers can be used to control certain aspects of the commit process:
X-Effective-Date
-> the effective date to use if a version identifier is present in the resource without a corresponding date
element
X-Author
-> sets the user identifier that the commit should be attributed to (defaults to the authenticated user)
X-Owner
-> sets the owner of the resource, for access control purposes in external systems (defaults to the author or the authenticated user if the former is not set)
X-Owner-Profile
-> sets the human-readable name of the owner of the resource, for presentation purposes in external systems
X-Bundle-Id
-> specifies the parent bundle's resource identifier (defaults to the root bundle if not set)
Value sets are currently limited to a single code system and version (domain) they can refer to when including or excluding concepts.
A DELETE request removes an existing value set:
Successful removal of a resource results in a 204 No Content
response.
Value sets that have been published can not be removed without adding the force=true
query parameter to signal a forced deletion (this option is only available to administrators however). The example value set was never published and so can be deleted without this option.
In create
interactions a POST request is sent to the path corresponding to the resource type. Any identifier included in the request body is ignored and a new, random one is generated from scratch.
The response code is 201 Created
if the interaction is successful. The request URL that can be used in eg. follow-up read
interactions is included in the response header named Location
.
GET requests with a request path that points to the resource type returns all value sets that satisfy the specified search criteria, in the form of query parameters. The following example uses the count
summary mode to determine the number of draft value sets in the system, without returning any of the matches:
Just as with code system resources, POST requests are unsupported in Snow Owl and will be met with a 405 Method Not Allowed
response.
The following search parameters are supported:
_id
-> matches value sets by logical identifier
name
-> matches value sets by name (in Snow Owl this is set to the logical identifier)
title
-> matches value sets by title (Snow Owl uses exact, phrase and prefix matching during its lexical search activities)
url
-> matches value sets by their assigned url
value
version
-> matches value sets by their version
value
status
-> matches value sets by resource status (eg. draft, active, etc.)
Snow Owl supports the following input parameters for value set expansion:
url
-> the URI of the value set to expand (can be an implicit or an explicit one)
valueSetVersion
-> the version of the value set for use for the expansion
activeOnly
-> to return only active codes in the response
filter
-> to filter the results lexically
includeDesignations
-> whether to include all designations or not in the returned response
displayLanguage
-> to select the language for the returned display values
count
-> to select the number of codes to be returned in the expansion (10 by default)
after
-> state tracking parameter for concept set paging
The value set with expanded concepts is returned in entirety for this request. It includes a link that can be followed to retrieve the next page of expanded concepts:
Supplying a value set as part of the request (via the input parameter valueSet
) is not supported – nor can additional resources be supplied for expansion via the unofficial
The operation is supported both on the instance level (in this case the value set is located by resource ID) as well as the type level (a canonical URL must be supplied in the url
input parameter to identify the value set to use).
Codes can only be validated against persisted value sets, not implicit ones.
Encountering any of the following conditions will fail the code validation check:
The specified value set does not exist
The value set does not contain the specified code in its expansion
The code does not exist in the code system specified in the request (the corresponding parameter, system
is mandatory in Snow Owl)
The specified code system version differs from the version referenced by the value set
The following example checks whether 429885007|Bar|
satisfies the aforementioned conditions in the value set containing all basic dose forms we created earlier:
The returned response uses a filter mentioned in that is supported by SNOMED CT – this enables including or excluding concepts using an ECL expression.
Similarly to CodeSystem read
interactions, query parameters _format
, _summary
, _elements
and _pretty
are also applicable, see for a detailed description of these options.