This resource contains a set of codes from one or more code systems that are intended for use in a particular context.
Value sets define which codes are allowed for a specific field. For example, a value set might list the allowed codes for a document type, an encounter type, or a lab test category. Codes may come from standard code systems (e.g., SNOMED CT or LOINC) or from organization-specific code systems.
Each health system may support a different set of codes for the same field. Instead of asking each health system for its code lists, you can expand a value set to find out which codes your connection’s system supports.
$expand
Retrieve the codes that your connection’s system supports for a specific element of a FHIR® resource.
For example, you might expand the value set for DocumentReference.type to find out which document types a health system sends and accepts before you exchange documents with them.
The response lists each supported code with its code system and display name.
cURL request example
Query Parameters
- contextrequired, string
The resource element to get the codes for, in the format
<ResourceType>.<element path>, such asDocumentReference.typeorEncounter.type. - contextDirectionrequired, string
Which codes to get:
outgoingfor the codes the system sends in responses and accepts in search parameters, orincomingfor the codes it accepts in a create or update. - filterstring
Narrows the codes that are returned. In FHIR, this is a text filter on the codes. Some systems, such as Epic, use it to select a category instead, such as
category:clinical-note.
- resourceTyperequired, string
Identifies the type of the resource
Value:ValueSet - statusrequired, string
The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.
Possible Values:draft,active,retired,unknown - idstring
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
- expansionobject
A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.
- timestamprequired, string
The time at which the expansion was produced by the expanding system.
- totalnumber
The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.
- parameterArray of object
A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.
- namerequired, string
Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.
- valueStringstring
The value of the parameter.
Only one of
valueString,valueUri,valueCodemay be present. - valueUristring
The value of the parameter.
Only one of
valueString,valueUri,valueCodemay be present. - valueCodestring
The value of the parameter.
Only one of
valueString,valueUri,valueCodemay be present.
- containsArray of object
The codes that are contained in the value set expansion.
- systemstring
An absolute URI which is the code system in which the code for this item in the expansion is defined.
- codestring
The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.
- displaystring
The recommended display for this item in the expansion.
A ValueSet expansion that lists the codes the connection's system supports.