> For the complete documentation index, see [llms.txt](https://docs.b2ihealthcare.com/snow-owl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.b2ihealthcare.com/snow-owl/7.x/index-3/index-3/valuesets.md).

# ValueSet

## ValueSet API

The endpoints `/ValueSet` and `/ValueSet/{valueSetId}` and corresponding operations expose the following types of terminology resources:

* SNOMED CT Simple Type Reference Sets with Concepts as referenced components.
* SNOMED CT Query Type Reference Sets with ECL expressions (each member is a Value Set)
* Snow Owl's generic Value Sets

`Delete` and `create` operations are not implemented.

## $expand

All value sets accessible via the `/ValueSet` endpoints can be *expanded*.

For SNOMED CT URIs, implicit value sets are supported:

* ?fhir\_vs - all Concept IDs in the edition/version. If the base URI is <http://snomed.info/sct>, this means all possible SNOMED CT concepts
* ?fhir\_vs=isa/\[sctid] - all concept IDs that are subsumed by the specified Concept.
* ?fhir\_vs=refset - all concept ids that correspond to real references sets defined in the specified SNOMED CT edition
* ?fhir\_vs=refset/\[sctid] - all concept IDs in the specified reference set

The in-parameters are not yet supported.

## $validate-code

Codes can be validated against a given Value Set specified by the value set's logical id or canonical URL. In terms of Snow Owl terminology components, codes are validated against:

* SNOMED CT Simple Type Reference Sets with Concepts as referenced components.
* SNOMED CT Query Type Reference Sets with ECL expressions (each member is a Value Set)
* Snow Owl's generic Value Sets

Validation performs the following checks:

* The existence of the given Value Set (**error** if not found)
* The existence of the reference in the existing Value Set to the given code (**error** if not found)
* The existence of the given code in the system (**error** if not found)
* Potential version mismatch (*\_error* if the reference points to a version that is different to the code's version)&#x20;
* The status of the given code and reference (**warning** if code is inactive while reference is active)

For SNOMED CT URIs, implicit value sets are supported:

* ?fhir\_vs - all Concept IDs in the edition/version. If the base URI is <http://snomed.info/sct>, this means all possible SNOMED CT concepts
* ?fhir\_vs=isa/\[sctid] - all concept IDs that are subsumed by the specified Concept.
* ?fhir\_vs=refset - all concept ids that correspond to real references sets defined in the specified SNOMED CT edition
* ?fhir\_vs=refset/\[sctid] - all concept IDs in the specified reference set
