This page is part of the Documentation Templates and Rules (v2.2.0-ballot: STU 2.2 Ballot) based on FHIR (HL7® FHIR® Standard) R4. This version is a pre-release. The current official version is 2.1.0. For a full list of available versions, see the Directory of published versions
Page standards status: Trial-use | Maturity Level: 2 |
<OperationDefinition xmlns="http://hl7.org/fhir">
<id value="DTR-ValueSet-expand"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: OperationDefinition DTR-ValueSet-expand</b></p><a name="DTR-ValueSet-expand"> </a><a name="hcDTR-ValueSet-expand"> </a><p>URL: [base]/ValueSet/$expand</p><h3>Parameters</h3><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>url</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#uri">uri</a></td><td/><td><div><p>A canonical reference to a value set. The server must know the value set (e.g. it is defined explicitly in the server's value sets, or it is defined implicitly by some code system known to the server</p>
</div></td></tr><tr><td>IN</td><td>filter</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td/><td><div><p>A text filter that is applied to restrict the codes that are returned (this is useful in a UI context). The interpretation of this is delegated to the server in order to allow to determine the most optimal search approach for the context. The server can document the way this parameter works in TerminologyCapabilities.expansion.textFilter. Typical usage of this parameter includes functionality like:</p>
<ul>
<li>using left matching e.g. "acut ast"</li>
<li>allowing for wild cards such as %, &, ?</li>
<li>searching on definition as well as display(s)</li>
<li>allowing for search conditions (and / or / exclusions)</li>
</ul>
<p>Text Search engines such as Lucene or Solr, long with their considerable functionality, might also be used. The optional text search might also be code system specific, and servers might have different implementations for different code systems</p>
</div></td></tr><tr><td>IN</td><td>offset</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4/datatypes.html#integer">integer</a></td><td/><td><div><p>Paging support - where to start if a subset is desired (default = 0). Offset is number of records (not number of pages)</p>
</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4/valueset.html">ValueSet</a></td><td/><td><div><p>The result of the expansion. Servers generating expansions SHOULD ensure that all the parameters that affect the contents of the expansion are recorded in the ValueSet.expansion.parameter list</p>
</div></td></tr></table></div>
</text>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
<valueCode value="cds"/>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="2">
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
<valueCanonical
value="http://hl7.org/fhir/us/davinci-dtr/ImplementationGuide/hl7.fhir.us.davinci-dtr"/>
</extension>
</valueInteger>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
<valueCode value="trial-use">
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
<valueCanonical
value="http://hl7.org/fhir/us/davinci-dtr/ImplementationGuide/hl7.fhir.us.davinci-dtr"/>
</extension>
</valueCode>
</extension>
<url
value="http://hl7.org/fhir/us/davinci-dtr/OperationDefinition/DTR-ValueSet-expand"/>
<version value="2.2.0-ballot"/>
<name value="DTRValuesetExpansion"/>
<title value="DTR Value Set Expansion"/>
<status value="active"/>
<kind value="operation"/>
<date value="2025-07-14T08:00:00+11:00"/>
<publisher value="HL7 International / Clinical Decision Support"/>
<contact>
<name value="HL7 International / Clinical Decision Support"/>
<telecom>
<system value="url"/>
<value value="http://www.hl7.org/Special/committees/dss"/>
</telecom>
</contact>
<description
value="The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. The operation is called at the system level and a url **SHALL** be provided. Additionally, the valueset **SHALL** use the current date as the expansion date and **SHALL** include only active codes. An expanded value set will be returned, or an OperationOutcome with an error message.
For more details regarding this operation, see the FHIR R4 [`$expand`](https://hl7.org/fhir/R4/operation-valueset-expand.html) operation definition."/>
<jurisdiction>
<coding>
<system value="urn:iso:std:iso:3166"/>
<code value="US"/>
</coding>
</jurisdiction>
<code value="expand"/>
<base value="http://hl7.org/fhir/OperationDefinition/ValueSet-expand"/>
<resource value="ValueSet"/>
<system value="false"/>
<type value="true"/>
<instance value="false"/>
<parameter>
<name value="url"/>
<use value="in"/>
<min value="1"/>
<max value="1"/>
<documentation
value="A canonical reference to a value set. The server must know the value set (e.g. it is defined explicitly in the server's value sets, or it is defined implicitly by some code system known to the server"/>
<type value="uri"/>
</parameter>
<parameter>
<name value="filter"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="A text filter that is applied to restrict the codes that are returned (this is useful in a UI context). The interpretation of this is delegated to the server in order to allow to determine the most optimal search approach for the context. The server can document the way this parameter works in TerminologyCapabilities.expansion.textFilter. Typical usage of this parameter includes functionality like:
* using left matching e.g. "acut ast"
* allowing for wild cards such as %, &, ?
* searching on definition as well as display(s)
* allowing for search conditions (and / or / exclusions)
Text Search engines such as Lucene or Solr, long with their considerable functionality, might also be used. The optional text search might also be code system specific, and servers might have different implementations for different code systems"/>
<type value="string"/>
</parameter>
<parameter>
<name value="offset"/>
<use value="in"/>
<min value="0"/>
<max value="1"/>
<documentation
value="Paging support - where to start if a subset is desired (default = 0). Offset is number of records (not number of pages)"/>
<type value="integer"/>
</parameter>
<parameter>
<name value="return"/>
<use value="out"/>
<min value="1"/>
<max value="1"/>
<documentation
value="The result of the expansion. Servers generating expansions SHOULD ensure that all the parameters that affect the contents of the expansion are recorded in the ValueSet.expansion.parameter list"/>
<type value="ValueSet"/>
</parameter>
</OperationDefinition>