FHIR © HL7.org  |  Server Home  |  Health Intersections FHIR Server v1.0.278  |  FHIR Version 3.0.1  | User: ANONYMOUS (Unknown)  

Resource "ValueSet-expand" Version "1" (OperationDefinition)

Tags:

XML or JSON representation . provenance for this resource

Value Set Expansion

OPERATION: Value Set Expansion

The official URL for this operation definition is:

http://hl7.org/fhir/OperationDefinition/ValueSet-expand

The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. If the operation is not called at the instance level, one of the in parameters identifier, context or valueset must be provided. An expanded value set will be returned, or an OperationOutcome with an error message.

URL: [base]/ValueSet/$expand

URL: [base]/ValueSet/[id]/$expand

Parameters

Use Name Cardinality Type Binding Documentation
IN url 0..1 uri

A canonical url for 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

IN valueSet 0..1 ValueSet

The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion

IN context 0..1 uri

The context of the value set, so that the server can resolve this to a value set to expand. The recommended format for this URI is [Structure Definition URL]#[name or path into structure definition] e.g. http://hl7.org/fhir/StructureDefinition/observation-hspc-height-hspcheight#Observation.interpretation. Other forms may be used but are not defined. This form is only usable if the terminology server also has access to the profile registry that the server is using, but can be used to delegate the mapping from an application context to a binding at run-time

IN filter 0..1 string

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

IN profile 0..1 uri

A reference to an external definition that provides additional control information about how the expansion is performed. At this time, there is no agreed format or functionality for the target of this URI. The VSAC Documentation provides one example of the use of this parameter. Implementers using this element will need to agree on an appropriate mechanism for use within their interoperability community. Known uses for profile include: * whether to return the value set content logical definition with the expansion * whether to include inactive concepts

IN date 0..1 dateTime

The date for which the expansion should be generated. if a date is provided, it means that the server should use the value set / code system definitions as they were on the given date, or return an error if this is not possible. Normally, the date is the current conditions (which is the default value) but under some circumstances, systems need to generate an expansion as it would have been in the past. A typical example of this would be where code selection is constrained to the set of codes that were available when the patient was treated, not when the record is being edited. Note that which date is appropriate is a matter for implementation policy.

IN offset 0..1 integer

Paging support - where to start if a subset is desired (default = 0). Offset is number of records (not number of pages)

IN count 0..1 integer

Paging support - how many codes should be provided in a partial page view. Paging only applies to flat expansions - servers ignore paging if the expansion is not flat. If count = 0, the client is asking how large the expansion is. Servers SHOULD honor this request for hierarchical expansions as well, and simply return the overall count

IN includeDesignations 0..1 boolean

Controls whether concept designations are to be included or excluded in value set expansions. Overrides the value in the expansion profile if there is one

IN includeDefinition 0..1 boolean

Controls whether the value set definition is included or excluded in value set expansions. Overrides the value in the expansion profile if there is one

IN activeOnly 0..1 boolean

Controls whether inactive concepts are included or excluded in value set expansions. Overrides the value in the expansion profile if there is one. Note that if the value set explicitly specifies that inactive codes are included, this parameter can still remove them from a specific expansion, but this parameter cannot include them if the value set excludes them

IN excludeNested 0..1 boolean

Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains). Overrides the value in the expansion profile if there is one

IN excludeNotForUI 0..1 boolean

Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces. Overrides the value in the expansion profile if there is one

IN excludePostCoordinated 0..1 boolean

Controls whether or not the value set expansion includes post coordinated codes. Overrides the value in the expansion profile if there is one

IN displayLanguage 0..1 code

Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display. Overrides the value in the expansion profile if there is one

IN limitedExpansion 0..1 boolean

If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete. Overrides the value in the expansion profile if there is one

OUT return 1..1 ValueSet

The result of the expansion

The value set expansion returned by this query should be treated as a transient result that will change over time (whether it does or not depends on how the value set is specified), so applications should repeat the operation each time the value set is used.

If the expansion is too large (at the discretion of the server), the server will return an error (OperationOutcome with code too-costly). Clients can work through large flat expansions in a set of pages (partial views of the full expansion) instead of just getting the full expansion in a single exchange by using offset and count parameters. Servers are not obliged to support paging, but if they do, SHALL support both the offset and count parameters. Hierarchical expansions are not subject to paging and servers simply return the entire expansion.

Different servers may return different results from expanding a value set for the following reasons:

  • The underlying code systems are different (e.g. different versions, possibly with different defined behavior)
  • The server optimizes filter includes differently, such as sorting by code frequency
  • Servers introduce arbitrary groups to assist a user to navigate the lists based either on extensions in the definition, or additional knowledge available to the server

When a server cannot correctly expand a value set because it does not fully understand the code systems (e.g. it has the wrong version, or incomplete definitions) then it SHALL return an error. If the value set itself is unbounded due to the inclusion of post-coordinated value sets (e.g. SNOMED CT, UCUM), then the extension http://hl7.org/fhir/StructureDefinition/valueset-unclosed can be used to indicate that the expansion is incomplete


<?xml version="1.0" encoding="UTF-8"?>
<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="ValueSet-expand"/>
  <meta>
    <versionId value="1"/>
    <lastUpdated value="2018-09-06T12:38:08.046Z"/>
  </meta>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
      <h2>Value Set Expansion</h2>
      <p>OPERATION: Value Set Expansion</p>
      <p>The official URL for this operation definition is: </p>
      <pre>http://hl7.org/fhir/OperationDefinition/ValueSet-expand</pre>
      <div>
        <p>The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. If the operation is not called at the instance level, one of the in parameters identifier, context or valueset must be provided. An expanded value set will be returned, or an OperationOutcome with an error message.</p> </div>
      <p>URL: [base]/ValueSet/$expand</p>
      <p>URL: [base]/ValueSet/[id]/$expand</p>
      <p>Parameters</p>
      <table class="grid">
        <tr>
          <td>
            <b>Use</b> </td>
          <td>
            <b>Name</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>0..1</td>
          <td>uri</td>
          <td/>
          <td>
            <div>
              <p>A canonical url for 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>valueSet</td>
          <td>0..1</td>
          <td>ValueSet</td>
          <td/>
          <td>
            <div>
              <p>The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>context</td>
          <td>0..1</td>
          <td>uri</td>
          <td/>
          <td>
            <div>
              <p>The context of the value set, so that the server can resolve this to a value set to expand. The recommended format for this URI is [Structure Definition URL]#[name or path into structure definition] e.g. http://hl7.org/fhir/StructureDefinition/observation-hspc-height-hspcheight#Observation.interpretation. Other forms may be used but are not defined. This form is only usable if the terminology server also has access to the profile registry that the server is using, but can be used to delegate the mapping from an application context to a binding at run-time</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>filter</td>
          <td>0..1</td>
          <td>string</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</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>profile</td>
          <td>0..1</td>
          <td>uri</td>
          <td/>
          <td>
            <div>
              <p>A reference to an external definition that provides additional control information about how the expansion is performed. At this time, there is no agreed format or functionality for the target of this URI. The
                <a href="http://www.nlm.nih.gov/vsac/support/authorguidelines/updatingvaluesets.html">VSAC Documentation</a>provides one example of the use of this parameter. Implementers using this element will need to agree on an appropriate mechanism for use within their interoperability community. Known uses for profile include: * whether to return the value set content logical definition with the expansion * whether to include inactive concepts </p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>date</td>
          <td>0..1</td>
          <td>dateTime</td>
          <td/>
          <td>
            <div>
              <p>The date for which the expansion should be generated. if a date is provided, it means that the server should use the value set / code system definitions as they were on the given date, or return an error if this is not possible. Normally, the date is the current conditions (which is the default value) but under some circumstances, systems need to generate an expansion as it would have been in the past. A typical example of this would be where code selection is constrained to the set of codes that were available when the patient was treated, not when the record is being edited. Note that which date is appropriate is a matter for implementation policy.</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>offset</td>
          <td>0..1</td>
          <td>integer</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>IN</td>
          <td>count</td>
          <td>0..1</td>
          <td>integer</td>
          <td/>
          <td>
            <div>
              <p>Paging support - how many codes should be provided in a partial page view. Paging only applies to flat expansions - servers ignore paging if the expansion is not flat. If count = 0, the client is asking how large the expansion is. Servers SHOULD honor this request for hierarchical expansions as well, and simply return the overall count</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>includeDesignations</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
          <td>
            <div>
              <p>Controls whether concept designations are to be included or excluded in value set expansions. Overrides the value in the expansion profile if there is one</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>includeDefinition</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
          <td>
            <div>
              <p>Controls whether the value set definition is included or excluded in value set expansions. Overrides the value in the expansion profile if there is one</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>activeOnly</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
          <td>
            <div>
              <p>Controls whether inactive concepts are included or excluded in value set expansions. Overrides the value in the expansion profile if there is one. Note that if the value set explicitly specifies that inactive codes are included, this parameter can still remove them from a specific expansion, but this parameter cannot include them if the value set excludes them</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>excludeNested</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
          <td>
            <div>
              <p>Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains). Overrides the value in the expansion profile if there is one</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>excludeNotForUI</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
          <td>
            <div>
              <p>Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces. Overrides the value in the expansion profile if there is one</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>excludePostCoordinated</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
          <td>
            <div>
              <p>Controls whether or not the value set expansion includes post coordinated codes. Overrides the value in the expansion profile if there is one</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>displayLanguage</td>
          <td>0..1</td>
          <td>code</td>
          <td/>
          <td>
            <div>
              <p>Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display. Overrides the value in the expansion profile if there is one</p> </div> </td> </tr>
        <tr>
          <td>IN</td>
          <td>limitedExpansion</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
          <td>
            <div>
              <p>If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete. Overrides the value in the expansion profile if there is one</p> </div> </td> </tr>
        <tr>
          <td>OUT</td>
          <td>return</td>
          <td>1..1</td>
          <td>ValueSet</td>
          <td/>
          <td>
            <div>
              <p>The result of the expansion</p> </div> </td> </tr> </table>
      <div>
        <p>The value set expansion returned by this query should be treated as a transient result that will change over time (whether it does or not depends on how the value set is specified), so applications should repeat the operation each time the value set is used.
          <br/> </p>
        <p>If the expansion is too large (at the discretion of the server), the server will return an error (OperationOutcome with code too-costly). Clients can work through large flat expansions in a set of pages (partial views of the full expansion) instead of just getting the full expansion in a single exchange by using offset and count parameters. Servers are not obliged to support paging, but if they do, SHALL support both the offset and count parameters. Hierarchical expansions are not subject to paging and servers simply return the entire expansion.
          <br/> </p>
        <p>Different servers may return different results from expanding a value set for the following reasons:
          <br/> </p>
        <ul>
          <li>The underlying code systems are different (e.g. different versions, possibly with different defined behavior)</li>
          <li>The server optimizes filter includes differently, such as sorting by code frequency</li>
          <li>Servers introduce arbitrary groups to assist a user to navigate the lists based either on extensions in the definition, or additional knowledge available to the server</li> </ul>
        <p>When a server cannot correctly expand a value set because it does not fully understand the code systems (e.g. it has the wrong version, or incomplete definitions) then it SHALL return an error. If the value set itself is unbounded due to the inclusion of post-coordinated value sets (e.g. SNOMED CT, UCUM), then the extension
          <a href="extension-valueset-unclosed.html">http://hl7.org/fhir/StructureDefinition/valueset-unclosed</a>can be used to indicate that the expansion is incomplete </p> </div> </div>
  </text>
  <url value="http://hl7.org/fhir/OperationDefinition/ValueSet-expand"/>
  <name value="Value Set Expansion"/>
  <status value="draft"/>
  <kind value="operation"/>
  <date value="2017-04-19T07:44:43+10:00"/>
  <publisher value="HL7 (FHIR Project)"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://hl7.org/fhir"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="fhir@lists.hl7.org"/>
    </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. If the operation is not called at the instance level, one of the in parameters identifier, context or valueset must be provided. An expanded value set will be returned, or an OperationOutcome with an error message."/>
  <code value="expand"/>
  <comment value="The value set expansion returned by this query should be treated as a transient result that will change over time (whether it does or not depends on how the value set is specified), so applications should repeat the operation each time the value set is used. &#10;&#10;If the expansion is too large (at the discretion of the server), the server will return an error (OperationOutcome with code too-costly). Clients can work through large flat expansions in a set of pages (partial views of the full expansion) instead of just getting the full expansion in a single exchange by using offset and count parameters. Servers are not obliged to support paging, but if they do, SHALL support both the offset and count parameters. Hierarchical expansions are not subject to paging and servers simply return the entire expansion. &#10;&#10;Different servers may return different results from expanding a value set for the following reasons: &#10;&#10;* The underlying code systems are different (e.g. different versions, possibly with different defined behavior) &#10;* The server optimizes filter includes differently, such as sorting by code frequency &#10;* Servers introduce arbitrary groups to assist a user to navigate the lists based either on extensions in the definition, or additional knowledge available to the server&#10;&#10;When a server cannot correctly expand a value set because it does not fully understand the code systems (e.g. it has the wrong version, or incomplete definitions) then it SHALL return an error. If the value set itself is unbounded due to the inclusion of post-coordinated value sets (e.g. SNOMED CT, UCUM), then the extension [http://hl7.org/fhir/StructureDefinition/valueset-unclosed](extension-valueset-unclosed.html) can be used to indicate that the expansion is incomplete"/>
  <resource value="ValueSet"/>
  <system value="false"/>
  <type value="true"/>
  <instance value="true"/>
  <parameter>
    <name value="url"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="A canonical url for a value set. The server must know the value set (e.g. it is defined explicitly in the server&apos;s value sets, or it is defined implicitly by some code system known to the server"/>
    <type value="uri"/>
  </parameter>
  <parameter>
    <name value="valueSet"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion"/>
    <type value="ValueSet"/>
  </parameter>
  <parameter>
    <name value="context"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="The context of the value set, so that the server can resolve this to a value set to expand. The recommended format for this URI is [Structure Definition URL]#[name or path into structure definition] e.g. http://hl7.org/fhir/StructureDefinition/observation-hspc-height-hspcheight#Observation.interpretation. Other forms may be used but are not defined. This form is only usable if the terminology server also has access to the profile registry that the server is using, but can be used to delegate the mapping from an application context to a binding at run-time"/>
    <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"/>
    <type value="string"/>
  </parameter>
  <parameter>
    <name value="profile"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="A reference to an external definition that provides additional control information about how the expansion is performed. At this time, there is no agreed format or functionality for the target of this URI. The [VSAC Documentation](http://www.nlm.nih.gov/vsac/support/authorguidelines/updatingvaluesets.html) provides one example of the use of this parameter. Implementers using this element will need to agree on an appropriate mechanism for use within their interoperability community. Known uses for profile include: * whether to return the value set content logical definition with the expansion * whether to include inactive concepts"/>
    <type value="uri"/>
  </parameter>
  <parameter>
    <name value="date"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="The date for which the expansion should be generated. if a date is provided, it means that the server should use the value set / code system definitions as they were on the given date, or return an error if this is not possible. Normally, the date is the current conditions (which is the default value) but under some circumstances, systems need to generate an expansion as it would have been in the past. A typical example of this would be where code selection is constrained to the set of codes that were available when the patient was treated, not when the record is being edited. Note that which date is appropriate is a matter for implementation policy."/>
    <type value="dateTime"/>
  </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="count"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Paging support - how many codes should be provided in a partial page view. Paging only applies to flat expansions - servers ignore paging if the expansion is not flat. If count = 0, the client is asking how large the expansion is. Servers SHOULD honor this request for hierarchical expansions as well, and simply return the overall count"/>
    <type value="integer"/>
  </parameter>
  <parameter>
    <name value="includeDesignations"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Controls whether concept designations are to be included or excluded in value set expansions. Overrides the value in the expansion profile if there is one"/>
    <type value="boolean"/>
  </parameter>
  <parameter>
    <name value="includeDefinition"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Controls whether the value set definition is included or excluded in value set expansions. Overrides the value in the expansion profile if there is one"/>
    <type value="boolean"/>
  </parameter>
  <parameter>
    <name value="activeOnly"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Controls whether inactive concepts are included or excluded in value set expansions. Overrides the value in the expansion profile if there is one. Note that if the value set explicitly specifies that inactive codes are included, this parameter can still remove them from a specific expansion, but this parameter cannot include them if the value set excludes them"/>
    <type value="boolean"/>
  </parameter>
  <parameter>
    <name value="excludeNested"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains). Overrides the value in the expansion profile if there is one"/>
    <type value="boolean"/>
  </parameter>
  <parameter>
    <name value="excludeNotForUI"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Controls whether or not the value set expansion includes codes which cannot be displayed in user interfaces. Overrides the value in the expansion profile if there is one"/>
    <type value="boolean"/>
  </parameter>
  <parameter>
    <name value="excludePostCoordinated"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Controls whether or not the value set expansion includes post coordinated codes. Overrides the value in the expansion profile if there is one"/>
    <type value="boolean"/>
  </parameter>
  <parameter>
    <name value="displayLanguage"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display. Overrides the value in the expansion profile if there is one"/>
    <type value="code"/>
  </parameter>
  <parameter>
    <name value="limitedExpansion"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation value="If the value set being expanded is incomplete (because it is too big to expand), return a limited expansion (a subset) with an indicator that expansion is incomplete. Overrides the value in the expansion profile if there is one"/>
    <type value="boolean"/>
  </parameter>
  <parameter>
    <name value="return"/>
    <use value="out"/>
    <min value="1"/>
    <max value="1"/>
    <documentation value="The result of the expansion"/>
    <type value="ValueSet"/>
  </parameter>
</OperationDefinition>