ValueSet
A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between `CodeSystem` definitions and their use in coded elements.
- Backends
- PostgreSQLElasticsearch
- Interactions
- CreateReadUpdatePatchDelete
- Search
- 16 of 18 parameters tested
Structure
| Element | Card. | Type | Description |
|---|---|---|---|
urlΣ | 0..1 | uri | Canonical identifier for this value set, represented as a URI (globally unique) |
identifierΣ | 0..* | Identifier | Additional identifier for the value set (business identifier) |
versionΣ | 0..1 | string | Business version of the value set |
nameΣ | 0..1 | string | Name for this value set (computer friendly) |
titleΣ | 0..1 | string | Name for this value set (human friendly) |
statusRequired?!Σ | 1..1 | code | draft | active | retired | unknownBinding (required): publication-status |
experimentalΣ | 0..1 | boolean | For testing purposes, not real usage |
dateΣ | 0..1 | dateTime | Date last changed |
publisherΣ | 0..1 | string | Name of the publisher (organization or individual) |
contactΣ | 0..* | ContactDetail | Contact details for the publisher |
description | 0..1 | markdown | Natural language description of the value set |
useContextΣ | 0..* | UsageContext | The context that the content is intended to support |
jurisdictionΣ | 0..* | CodeableConcept | Intended jurisdiction for value set (if applicable)Binding (extensible): jurisdiction |
immutableΣ | 0..1 | boolean | Indicates whether or not any change to the content logical definition may occur |
purpose | 0..1 | markdown | Why this value set is defined |
copyright | 0..1 | markdown | Use and/or publishing restrictions |
compose | 0..1 | BackboneElement | Content logical definition of the value set (CLD) |
lockedDateΣ | 0..1 | date | Fixed date for references with no specified version (transitive) |
inactiveΣ | 0..1 | boolean | Whether inactive codes are in the value set |
includeRequiredΣ | 1..* | BackboneElement | Include one or more codes from a code system or other value set(s) |
systemΣ | 0..1 | uri | The system the codes come from |
versionΣ | 0..1 | string | Specific version of the code system referred to |
concept | 0..* | BackboneElement | A concept defined in the system |
codeRequired | 1..1 | code | Code or expression from system |
display | 0..1 | string | Text to display for this code for this value set in this valueset |
designation | 0..* | BackboneElement | Additional representations for this concept |
language | 0..1 | code | Human language of the designationBinding (preferred): languages |
use | 0..1 | Coding | Types of uses of designationsBinding (extensible): designation-use |
valueRequired | 1..1 | string | The text value for this designation |
filterΣ | 0..* | BackboneElement | Select codes/concepts by their properties (including relationships) |
propertyRequiredΣ | 1..1 | code | A property/filter defined by the code system |
opRequiredΣ | 1..1 | code | = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | existsBinding (required): filter-operator |
valueRequiredΣ | 1..1 | string | Code from the system, or regex criteria, or boolean value for exists |
valueSetΣ | 0..* | canonical(ValueSet) | Select the contents included in this value set |
exclude | 0..* | Same as ValueSet.compose.include | Explicitly exclude codes from a code system or other value sets |
expansion | 0..1 | BackboneElement | Used when the value set is "expanded" |
identifier | 0..1 | uri | Identifies the value set expansion (business identifier) |
timestampRequired | 1..1 | dateTime | Time ValueSet expansion happened |
total | 0..1 | integer | Total number of codes in the expansion |
offset | 0..1 | integer | Offset at which this resource starts |
parameter | 0..* | BackboneElement | Parameter that controlled the expansion process |
nameRequired | 1..1 | string | Name as assigned by the client or server |
value[x] | 0..1 | string | boolean | integer | decimal | uri | code | dateTime | Value of the named parameter |
contains | 0..* | BackboneElement | Codes in the value set |
system | 0..1 | uri | System value for the code |
abstract | 0..1 | boolean | If user cannot select this entry |
inactive | 0..1 | boolean | If concept is inactive in the code system |
version | 0..1 | string | Version in which this code/display is defined |
code | 0..1 | code | Code - if blank, this is not a selectable code |
display | 0..1 | string | User display for the concept |
designation | 0..* | Same as ValueSet.compose.include.concept.designation | Additional representations for this item |
contains | 0..* | Same as ValueSet.expansion.contains | Codes contained under this entry |
Σ in _summary results · ?! modifier element · 1.. required · inherited elements in grey
Search parameters
Query with GET [base]/ValueSet?[parameter]=[value]. Type decides which modifiers and prefixes apply, see search features.
| Parameter | Type | Description | PG | ES |
|---|---|---|---|---|
code | token | This special parameter searches for codes in the value set. See additional notes on the ValueSet resource ValueSet.expansion.contains.code | ValueSet.compose.include.concept.code | ||
context | token | A use context assigned to the value set (ValueSet.useContext.value.ofType(CodeableConcept)) | ||
context-quantity | quantity | A quantity- or range-valued use context assigned to the value set (ValueSet.useContext.value.ofType(Quantity)) | (ValueSet.useContext.value.ofType(Range)) | ||
context-type | token | A type of use context assigned to the value set ValueSet.useContext.code | ||
context-type-quantity | composite | A use context type and quantity- or range-based value assigned to the value set ValueSet.useContext | ||
context-type-value | composite | A use context type and value assigned to the value set ValueSet.useContext | ||
date | date | The value set publication date ValueSet.date | ||
description | string | The description of the value set ValueSet.description | ||
expansion | uri | Identifies the value set expansion (business identifier) ValueSet.expansion.identifier | ||
identifier | token | External identifier for the value set ValueSet.identifier | ||
jurisdiction | token | Intended jurisdiction for the value set ValueSet.jurisdiction | ||
name | string | Computationally friendly name of the value set ValueSet.name | ||
publisher | string | Name of the publisher of the value set ValueSet.publisher | ||
reference | uri | A code system included or excluded in the value set or an imported value set ValueSet.compose.include.system | ||
status | token | The current status of the value set ValueSet.status | ||
title | string | The human-friendly name of the value set ValueSet.title | ||
url | uri | The uri that identifies the value set ValueSet.url | ||
version | token | The business version of the value set ValueSet.version |
PG: PostgreSQL, ES: Elasticsearch. passes its TestScript checks, fails, not tested yet. The author of the resource Logical id of this artifact When the resource version last changed Profiles this resource claims to conform to Security Labels applied to this resource Identifies where the resource comes from Tags applied to this resource Derived from the R4B DefinitionCommon parameters on every resource (8)
_haste-health-authorreference _idtoken _lastUpdateddate _profileuri _securitytoken _sourceuri _tagtoken _typetoken
Operations
Invoke with Value Set Expansion 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 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 The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion 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. 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 If a context is provided, a context direction may also be provided. Valid values are: 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) 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: 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 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. Paging support - where to start if a subset is desired (default = 0). Offset is number of records (not number of pages) 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 Controls whether concept designations are to be included or excluded in value set expansions 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 Controls whether the value set definition is included or excluded in value set expansions 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 Controls whether or not the value set expansion nests codes or not (i.e. ValueSet.expansion.contains.contains) 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. Controls whether or not the value set expansion includes post coordinated codes Specifies the language to be used for description in the expansions i.e. the language to be used for ValueSet.expansion.contains.display 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 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 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 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 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 Value Set based Validation Validate that a coded value is in the set of codes allowed by a value set. If the operation is not called at the instance level, one of the in parameters url, context or valueSet must be provided. One (and only one) of the in parameters code, coding, or codeableConcept must be provided. The operation returns a result (true / false), an error message, and the recommended display for the code Value set Canonical URL. 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 The context of the value set, so that the server can resolve this to a value set to validate against. 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 The value set is provided directly as part of the request. Servers may choose not to accept value sets in this fashion. This parameter is used when the client wants the server to expand a value set that is not stored on the server The identifier that is used to identify a specific version of the value set to be used when validating the code. 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. The code that is to be validated. If a code is provided, a system or a context must be provided (if a context is provided, then the server SHALL ensure that the code is not ambiguous without a system) The system for the code that is to be validated The version of the system, if one was provided in the source data The display associated with the code, if provided. If a display is provided a code must be provided. If no display is provided, the server cannot validate the display value, but may choose to return a recommended display name using the display parameter in the outcome. Whether displays are case sensitive is code system dependent A coding to validate A full codeableConcept to validate. The server returns true if one of the coding values is in the value set, and may also validate that the codings are not in conflict with each other if more than one is present The date for which the validation should be checked. Normally, this is the current conditions (which is the default values) but under some circumstances, systems need to validate that a correct code was used at some point 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. If this parameter has a value of true, the client is stating that the validation is being performed in a context where a concept designated as 'abstract' is appropriate/allowed to be used, and the server should regard abstract codes as valid. If this parameter is false, abstract codes are not considered to be valid. Note that. 'abstract' is a property defined by many HL7 code systems that indicates that the concept is a logical grouping concept that is not intended to be used asa 'concrete' concept to in an actual patient/care/process record. This language is borrowed from Object Orienated theory where 'asbtract' objects are never instantiated. However in the general record and terminology eco-system, there are many contexts where it is appropraite to use these codes e.g. as decision making criterion, or when editing value sets themselves. This parameter allows a client to indicate to the server that it is working in such a context. Specifies the language to be used for description when validating the display property True if the concept details supplied are valid Error details, if result = false. If this is provided when result = true, the message carries hints and warnings A valid display for the concept if the system wishes to display this to a userPOST [base]/ValueSet/$[name] on the type, or POST [base]/ValueSet/[id]/$[name] on one resource, sending a Parameters resource as the body. See invoke-type and invoke-instance.$expand
TypeInstanceOperationOutcome with an error message.POST [base]/ValueSet/$expandPOST [base]/ValueSet/[id]/$expandParameters: 21 in, 1 out
Name Card. Type Description In url 0..1 uri valueSet 0..1 ValueSet valueSetVersion 0..1 string context 0..1 uri contextDirection 0..1 code filter 0..1 string date 0..1 dateTime offset 0..1 integer count 0..1 integer includeDesignations 0..1 boolean designation 0..* string includeDefinition 0..1 boolean activeOnly 0..1 boolean excludeNested 0..1 boolean excludeNotForUI 0..1 boolean excludePostCoordinated 0..1 boolean displayLanguage 0..1 code exclude-system 0..* canonical system-version 0..* canonical check-system-version 0..* canonical force-system-version 0..* canonical Out return 1..1 ValueSet $validate-code
TypeInstancePOST [base]/ValueSet/$validate-codePOST [base]/ValueSet/[id]/$validate-codeParameters: 13 in, 3 out
Name Card. Type Description In url 0..1 uri context 0..1 uri valueSet 0..1 ValueSet valueSetVersion 0..1 string code 0..1 code system 0..1 uri systemVersion 0..1 string display 0..1 string coding 0..1 Coding codeableConcept 0..1 CodeableConcept date 0..1 dateTime abstract 0..1 boolean displayLanguage 0..1 code Out result 1..1 boolean message 0..1 string display 0..1 string