ValueSet
Introduction
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.
Tooling support
SNOMED CT (implicit)
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 of409822003|Domain bacteria|
http://snomed.info/sct/900000000000207008?fhir_vs=refset
- all reference set identifier concepts in the International Editionhttp://snomed.info/sct/900000000000207008?fhir_vs=refset/733073007
- all concepts of the International Edition that are members of the reference set733073007|OWL axiom reference set|
Regular value sets are only supported in the paid edition of Snow Owl.
Interactions
read (instance)
GET requests that include the value set identifier as the final path segment(s) return the resource state:
update (instance)
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 correspondingdate
elementX-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 systemsX-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.
delete (instance)
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.
create (type)
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
.
search (type)
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 identifiername
-> 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 assignedurl
valueversion
-> matches value sets by theirversion
valuestatus
-> matches value sets by resource status (eg. draft, active, etc.)
Operations
$expand
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 expansionactiveOnly
-> to return only active codes in the responsefilter
-> to filter the results lexicallyincludeDesignations
-> whether to include all designations or not in the returned responsedisplayLanguage
-> to select the language for the returned display valuescount
-> 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
$validate-code
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:
Last updated