FHIR © HL7.org  |  Server Home  |  Health Intersections FHIR Server v1.0.287  |  FHIR Version 4.0.0  | 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 url, 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 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

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 valueSetVersion 0..1 string

The identifier that is used to identify a specific version of the value set to be used when generating the expansion. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available.

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 conformance 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 contextDirection 0..1 code

If a context is provided, a context direction may also be provided. Valid values are:

  • 'incoming': the codes a client can use for PUT/POST operations, and
  • 'outgoing', the codes a client might receive from the server.

The purpose is to inform the server whether to use the value set associated with the context for reading or writing purposes (note: for most elements, this is the same value set, but there are a few elements where the reading and writing value sets are different)

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. 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

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

IN designation 0..* string

A token that specifies a system+code that is either a use or a language. Designations that match by language or use are included in the expansion. If no designation is specified, it is at the server discretion which designations to return

IN includeDefinition 0..1 boolean

Controls whether the value set definition is included or excluded in value set expansions

IN activeOnly 0..1 boolean

Controls whether inactive concepts are included or excluded in value set expansions. 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)

IN excludeNotForUI 0..1 boolean

Controls whether or not the value set expansion is assembled for a user interface use or not. Value sets intended for User Interface might include 'abstract' codes or have nested contains with items with no code or abstract = true, with the sole purpose of helping a user navigate through the list efficiently, where as a value set not generated for UI use might be flat, and only contain the selectable codes in the value set. The exact implications of 'for UI' depend on the code system, and what properties it exposes for a terminology server to use. In the FHIR Specification itself, the value set expansions are generated with excludeNotForUI = false, and the expansions used when generated schema / code etc, or performing validation, are all excludeNotForUI = true.

IN excludePostCoordinated 0..1 boolean

Controls whether or not the value set expansion includes post coordinated codes

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

IN exclude-system 0..* canonical

Code system, or a particular version of a code system to be excluded from the value set expansion. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56

IN system-version 0..* canonical

Specifies a version to use for a system, if the value set does not specify which one to use. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56

IN check-system-version 0..* canonical

Edge Case: Specifies a version to use for a system. If a value set specifies a different version, an error is returned instead of the expansion. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56

IN force-system-version 0..* canonical

Edge Case: Specifies a version to use for a system. This parameter overrides any specified version in the value set (and any it depends on). The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56. Note that this has obvious safety issues, in that it may result in a value set expansion giving a different list of codes that is both wrong and unsafe, and implementers should only use this capability reluctantly. It primarily exists to deal with situations where specifications have fallen into decay as time passes. If the value is override, the version used SHALL explicitly be represented in the expansion parameters

OUT return 1..1 ValueSet

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

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 MAY 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, or use the count parameter to request a subset of the expansion for limited purposes. 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


{
  "resourceType" : "OperationDefinition",
  "id" : "ValueSet-expand",
  "meta" : {
    "versionId" : "1",
    "lastUpdated" : "2018-12-14T02:02:44.707Z"
  },
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <h2>Value Set Expansion</h2>\n <p>OPERATION: Value Set Expansion</p>\n <p>The official URL for this operation definition is: </p>\n <pre>http://hl7.org/fhir/OperationDefinition/ValueSet-expand</pre>\n <div>\n <p>The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation.</p>\n\n <p>If the operation is not called at the instance level, one of the in parameters url, context or valueSet must be provided. An expanded value set will be returned, or an OperationOutcome with an error message.</p>\n\n </div>\n <p>URL: [base]/ValueSet/$expand</p>\n <p>URL: [base]/ValueSet/[id]/$expand</p>\n <p>Parameters</p>\n <table class=\"grid\">\n <tr>\n <td>\n <b>Use</b>\n </td>\n <td>\n <b>Name</b>\n </td>\n <td>\n <b>Cardinality</b>\n </td>\n <td>\n <b>Type</b>\n </td>\n <td>\n <b>Binding</b>\n </td>\n <td>\n <b>Documentation</b>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>url</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#uri\">uri</a>\n </td>\n <td/>\n <td>\n <div>\n <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>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>valueSet</td>\n <td>0..1</td>\n <td>\n <a href=\"valueset.html\">ValueSet</a>\n </td>\n <td/>\n <td>\n <div>\n <p>The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>valueSetVersion</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#string\">string</a>\n </td>\n <td/>\n <td>\n <div>\n <p>The identifier that is used to identify a specific version of the value set to be used when generating the expansion. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available.</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>context</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#uri\">uri</a>\n </td>\n <td/>\n <td>\n <div>\n <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 conformance 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>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>contextDirection</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#code\">code</a>\n </td>\n <td/>\n <td>\n <div>\n <p>If a context is provided, a context direction may also be provided. Valid values are:</p>\n\n <ul>\n\n <li>'incoming': the codes a client can use for PUT/POST operations, and</li>\n\n <li>'outgoing', the codes a client might receive from the server.</li>\n\n </ul>\n\n <p>The purpose is to inform the server whether to use the value set associated with the context for reading or writing purposes (note: for most elements, this is the same value set, but there are a few elements where the reading and writing value sets are different)</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>filter</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#string\">string</a>\n </td>\n <td/>\n <td>\n <div>\n <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 \n <a href=\"terminologycapabilities.html\">TerminologyCapabilities</a>..expansion.textFilter. Typical usage of this parameter includes functionality like:\n </p>\n\n <ul>\n\n <li>using left matching e.g. \"acut ast\"</li>\n\n <li>allowing for wild cards such as %, &amp;, ?</li>\n\n <li>searching on definition as well as display(s)</li>\n\n <li>allowing for search conditions (and / or / exclusions)</li>\n\n </ul>\n\n <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>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>date</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#dateTime\">dateTime</a>\n </td>\n <td/>\n <td>\n <div>\n <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>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>offset</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#integer\">integer</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Paging support - where to start if a subset is desired (default = 0). Offset is number of records (not number of pages)</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>count</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#integer\">integer</a>\n </td>\n <td/>\n <td>\n <div>\n <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>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>includeDesignations</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#boolean\">boolean</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Controls whether concept designations are to be included or excluded in value set expansions</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>designation</td>\n <td>0..*</td>\n <td>\n <a href=\"datatypes.html#string\">string</a>\n </td>\n <td/>\n <td>\n <div>\n <p>A \n <a href=\"search.html#token\">token</a> that specifies a system+code that is either a use or a language. Designations that match by language or use are included in the expansion. If no designation is specified, it is at the server discretion which designations to return\n </p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>includeDefinition</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#boolean\">boolean</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Controls whether the value set definition is included or excluded in value set expansions</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>activeOnly</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#boolean\">boolean</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Controls whether inactive concepts are included or excluded in value set expansions. 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>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>excludeNested</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#boolean\">boolean</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains)</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>excludeNotForUI</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#boolean\">boolean</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Controls whether or not the value set expansion is assembled for a user interface use or not. Value sets intended for User Interface might include \n <a href=\"codesystem.html#status\">'abstract' codes</a> or have nested contains with items with no code or abstract = true, with the sole purpose of helping a user navigate through the list efficiently, where as a value set not generated for UI use might be flat, and only contain the selectable codes in the value set. The exact implications of 'for UI' depend on the code system, and what properties it exposes for a terminology server to use. In the FHIR Specification itself, the value set expansions are generated with excludeNotForUI = false, and the expansions used when generated schema / code etc, or performing validation, are all excludeNotForUI = true.\n </p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>excludePostCoordinated</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#boolean\">boolean</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Controls whether or not the value set expansion includes post coordinated codes</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>displayLanguage</td>\n <td>0..1</td>\n <td>\n <a href=\"datatypes.html#code\">code</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>exclude-system</td>\n <td>0..*</td>\n <td>\n <a href=\"datatypes.html#canonical\">canonical</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Code system, or a particular version of a code system to be excluded from the value set expansion. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>system-version</td>\n <td>0..*</td>\n <td>\n <a href=\"datatypes.html#canonical\">canonical</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Specifies a version to use for a system, if the value set does not specify which one to use. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>check-system-version</td>\n <td>0..*</td>\n <td>\n <a href=\"datatypes.html#canonical\">canonical</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Edge Case: Specifies a version to use for a system. If a value set specifies a different version, an error is returned instead of the expansion. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>IN</td>\n <td>force-system-version</td>\n <td>0..*</td>\n <td>\n <a href=\"datatypes.html#canonical\">canonical</a>\n </td>\n <td/>\n <td>\n <div>\n <p>Edge Case: Specifies a version to use for a system. This parameter overrides any specified version in the value set (and any it depends on). The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56. Note that this has obvious safety issues, in that it may result in a value set expansion giving a different list of codes that is both wrong and unsafe, and implementers should only use this capability reluctantly. It primarily exists to deal with situations where specifications have fallen into decay as time passes. If the value is override, the version used SHALL explicitly be represented in the expansion parameters</p>\n\n </div>\n </td>\n </tr>\n <tr>\n <td>OUT</td>\n <td>return</td>\n <td>1..1</td>\n <td>\n <a href=\"valueset.html\">ValueSet</a>\n </td>\n <td/>\n <td>\n <div>\n <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>\n\n </div>\n </td>\n </tr>\n </table>\n <div>\n <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.</p>\n\n <p>If the expansion is too large (at the discretion of the server), the server MAY 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, or use the count parameter to request a subset of the expansion for limited purposes. 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.</p>\n\n <p>Different servers may return different results from expanding a value set for the following reasons:</p>\n\n <ul>\n\n <li>The underlying code systems are different (e.g. different versions, possibly with different defined behavior)</li>\n\n <li>The server optimizes filter includes differently, such as sorting by code frequency</li>\n\n <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>\n\n </ul>\n\n <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 \n <a href=\"extension-valueset-unclosed.html\">http://hl7.org/fhir/StructureDefinition/valueset-unclosed</a> can be used to indicate that the expansion is incomplete\n </p>\n\n </div>\n </div>"
  },
  "extension" : [
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger" : 5
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode" : "normative"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
      "valueCode" : "4.0.0"
    }
  ],
  "url" : "http://hl7.org/fhir/OperationDefinition/ValueSet-expand",
  "version" : "4.0.0",
  "name" : "Value Set Expansion",
  "status" : "draft",
  "kind" : "operation",
  "date" : "2018-12-14T01:14:32+00:00",
  "publisher" : "HL7 (FHIR Project)",
  "contact" : [
    {
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://hl7.org/fhir"
        },
        {
          "system" : "email",
          "value" : "fhir@lists.hl7.org"
        }
      ]
    }
  ],
  "description" : "The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. \n\nIf the operation is not called at the instance level, one of the in parameters url, context or valueSet must be provided. An expanded value set will be returned, or an OperationOutcome with an error message.
",
  "code" : "expand",
  "comment" : "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. \n\nIf the expansion is too large (at the discretion of the server), the server MAY 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, or use the count parameter to request a subset of the expansion for limited purposes. 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. \n\nDifferent servers may return different results from expanding a value set for the following reasons: \n\n* The underlying code systems are different (e.g. different versions, possibly with different defined behavior) \n* The server optimizes filter includes differently, such as sorting by code frequency \n* 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\n\nWhen 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" : [
    "ValueSet"
  ],
  "system" : false,
  "type" : true,
  "instance" : true,
  "parameter" : [
    {
      "name" : "url",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "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" : "uri"
    },
    {
      "name" : "valueSet",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion",
      "type" : "ValueSet"
    },
    {
      "name" : "valueSetVersion",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "The identifier that is used to identify a specific version of the value set to be used when generating the expansion. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available.",
      "type" : "string"
    },
    {
      "name" : "context",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "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 conformance 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" : "uri"
    },
    {
      "name" : "contextDirection",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "If a context is provided, a context direction may also be provided. Valid values are: \n\n* 'incoming': the codes a client can use for PUT/POST operations, and \n* 'outgoing', the codes a client might receive from the server.\n\nThe purpose is to inform the server whether to use the value set associated with the context for reading or writing purposes (note: for most elements, this is the same value set, but there are a few elements where the reading and writing value sets are different)",
      "type" : "code"
    },
    {
      "name" : "filter",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "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](terminologycapabilities.html)..expansion.textFilter. Typical usage of this parameter includes functionality like:\n\n* using left matching e.g. \"acut ast\"\n* allowing for wild cards such as %, &, ?\n* searching on definition as well as display(s)\n* allowing for search conditions (and / or / exclusions)\n\nText 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" : "string"
    },
    {
      "name" : "date",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "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" : "dateTime"
    },
    {
      "name" : "offset",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Paging support - where to start if a subset is desired (default = 0). Offset is number of records (not number of pages)",
      "type" : "integer"
    },
    {
      "name" : "count",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "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" : "integer"
    },
    {
      "name" : "includeDesignations",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Controls whether concept designations are to be included or excluded in value set expansions",
      "type" : "boolean"
    },
    {
      "name" : "designation",
      "use" : "in",
      "min" : 0,
      "max" : "*",
      "documentation" : "A [token](search.html#token) that specifies a system+code that is either a use or a language. Designations that match by language or use are included in the expansion. If no designation is specified, it is at the server discretion which designations to return",
      "type" : "string"
    },
    {
      "name" : "includeDefinition",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Controls whether the value set definition is included or excluded in value set expansions",
      "type" : "boolean"
    },
    {
      "name" : "activeOnly",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Controls whether inactive concepts are included or excluded in value set expansions. 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" : "boolean"
    },
    {
      "name" : "excludeNested",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains)",
      "type" : "boolean"
    },
    {
      "name" : "excludeNotForUI",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Controls whether or not the value set expansion is assembled for a user interface use or not. Value sets intended for User Interface might include ['abstract' codes](codesystem.html#status) or have nested contains with items with no code or abstract = true, with the sole purpose of helping a user navigate through the list efficiently, where as a value set not generated for UI use might be flat, and only contain the selectable codes in the value set. The exact implications of 'for UI' depend on the code system, and what properties it exposes for a terminology server to use. In the FHIR Specification itself, the value set expansions are generated with excludeNotForUI = false, and the expansions used when generated schema / code etc, or performing validation, are all excludeNotForUI = true.",
      "type" : "boolean"
    },
    {
      "name" : "excludePostCoordinated",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Controls whether or not the value set expansion includes post coordinated codes",
      "type" : "boolean"
    },
    {
      "name" : "displayLanguage",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "documentation" : "Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display",
      "type" : "code"
    },
    {
      "name" : "exclude-system",
      "use" : "in",
      "min" : 0,
      "max" : "*",
      "documentation" : "Code system, or a particular version of a code system to be excluded from the value set expansion. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56",
      "type" : "canonical"
    },
    {
      "name" : "system-version",
      "use" : "in",
      "min" : 0,
      "max" : "*",
      "documentation" : "Specifies a version to use for a system, if the value set does not specify which one to use. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56",
      "type" : "canonical"
    },
    {
      "name" : "check-system-version",
      "use" : "in",
      "min" : 0,
      "max" : "*",
      "documentation" : "Edge Case: Specifies a version to use for a system. If a value set specifies a different version, an error is returned instead of the expansion. The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56",
      "type" : "canonical"
    },
    {
      "name" : "force-system-version",
      "use" : "in",
      "min" : 0,
      "max" : "*",
      "documentation" : "Edge Case: Specifies a version to use for a system. This parameter overrides any specified version in the value set (and any it depends on). The format is the same as a canonical URL: [system]|[version] - e.g. http://loinc.org|2.56. Note that this has obvious safety issues, in that it may result in a value set expansion giving a different list of codes that is both wrong and unsafe, and implementers should only use this capability reluctantly. It primarily exists to deal with situations where specifications have fallen into decay as time passes. If the value is override, the version used SHALL explicitly be represented in the expansion parameters",
      "type" : "canonical"
    },
    {
      "name" : "return",
      "use" : "out",
      "min" : 1,
      "max" : "1",
      "documentation" : "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" : "ValueSet"
    }
  ]
}