This page is part of the FHIR Specification (v0.4.0: DSTU 2 Draft). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2
This resource has 4 operations associated with it. For more information about operations, including how they are invoked, see Operations.
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 or valueset must be provided.
An expanded value set will be returned, or an OperationOutcome with an error message
Formal Definition (as a OperationDefinition).
URL: [base]/ValueSet/$expand
URL: [base]/ValueSet/[id]/$expand
In Parameters: | ||||
Name | Cardinality | Type | Profile | Documentation |
identifier | 0..1 | uri | A logical value set identifier (i.e. ValueSet.identifier). The server must know the value set (e.g. it is defined explicitly in the server's valuesets, or it is defined implicitly by some code system known to the server | |
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 | |
filter | 0..1 | string | A text filter that is applied to restrict the codes that are returned (this is useful in a UI context) | |
date | 0..1 | dateTime | The date for which the expansion should be generated. Normally, this 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. | |
Out Parameters: | ||||
Name | Cardinality | Type | Profile | Documentation |
return | 1..1 | ValueSet | The result of the expansion Note: as this the only out parameter, it is a resource, and it has the name 'return', the result of this operation is returned directly as a resource |
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.
Different servers may return different results from expanding a value set for the following reasons:
Given a code/system, or a Coding, get additional details about the concept
Formal Definition (as a OperationDefinition).
URL: [base]/ValueSet/$lookup
In Parameters: | |||||
Name | Cardinality | Type | Profile | Documentation | |
code | 0..1 | code | The code that is to be validated. If a code is provided, a system must be provided | ||
system | 0..1 | uri | The system for the code that is to be validated | ||
version | 0..1 | string | The version of the system, if one was provided in the source data | ||
coding | 0..1 | Coding | A coding to look up | ||
date | 0..1 | dateTime | The date for which the information should be returned. Normally, this is the current conditions (which is the default value) but under some circumstances, systems need to acccess this information 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. | ||
Out Parameters: | |||||
Name | Cardinality | Type | Profile | Documentation | |
name | 1..1 | string | A display name for the code system | ||
version | 0..1 | string | The version that these details are based on | ||
display | 1..1 | string | The preferred display for this concept | ||
abstract | 0..1 | boolean | Whether this code is an abstract concept | ||
designation | 0..* | Additional representations for this concept | |||
language | 0..1 | code | The language this designation is defined for | ||
use | 0..1 | Coding | A code that details how this designation would be used | ||
value | 1..1 | string | The text value for this designation |
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 identifier or valueset must be provided.
One (and only one) of the in parameters (code, coding, codeableConcept) must be provided.
The outcome is an OperationOutcome with hints, warnings, or errors.
Formal Definition (as a OperationDefinition).
URL: [base]/ValueSet/$validate
URL: [base]/ValueSet/[id]/$validate
In Parameters: | ||||
Name | Cardinality | Type | Profile | Documentation |
identifier | 0..1 | uri | A logical value set identifier (i.e. ValueSet.identifier). The server must know the value set (e.g. it is defined explicitly in the server's valuesets, or it is defined implicitly by some code system known to the server | |
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 | |
code | 0..1 | code | The code that is to be validated. If a code is provided, a system must be provided | |
system | 0..1 | uri | The system for the code that is to be validated | |
version | 0..1 | string | The version of the system, if one was provided in the source data | |
display | 0..1 | string | 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 athe recommended display name in an extension in the outcome | |
coding | 0..1 | Coding | A coding to validate | |
codeableConcept | 0..1 | CodeableConcept | 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 | |
date | 0..1 | dateTime | 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. | |
abstract | 0..1 | boolean | if true, then an abstract code is allowed to be used in the context of the code that is being validated. Typically, abstract codes are allowed to be used in value set specifications (e.g. any code that is subsumed by an abstract code). If false (which is the default value), then only concrete codes as defined by the value set are allowed | |
Out Parameters: | ||||
Name | Cardinality | Type | Profile | Documentation |
result | 1..1 | boolean | True if the concept details supplied are valid | |
message | 0..1 | string | Error details, if result = false. If this is provided when result = true, the message carries hints and wanrings | |
display | 0..1 | string | A valid display for the concept if the system wishes to display this to a user |
Validate a set of concepts against value sets in a single oeration
Typically, this would be called when a validating a resource or document that contains many codes, to reduce network latency events
Formal Definition (as a OperationDefinition).
URL: [base]/ValueSet/$batch
In Parameters: | |||||
Name | Cardinality | Type | Profile | Documentation | |
item | 0..* | An item to be validated | |||
concept | 1..1 | CodeableConcept | A codeable concept to be validated. If the source is a coding, or a code/system pair, wrap it in a CodeableConcept | ||
uri | 1..1 | uri | The value set to validate the concept against. This is a logical value set identifier (i.e. ValueSet.identifier). The server must know the value set (e.g. it is defined explicitly in the server's valuesets, or it is defined implicitly by some code system known to the server | ||
date | 0..1 | dateTime | 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. | ||
Out Parameters: | |||||
Name | Cardinality | Type | Profile | Documentation | |
item | 0..* | The outcome of validating an item. There must be an entry for every item in the same order | |||
result | 1..1 | boolean | True if the concept details supplied are valid | ||
message | 0..1 | string | Error details, if result = false. If this is provided when result = true, the message carries hints and wanrings | ||
display | 0..1 | string | A valid display for the concept if the system wishes to display this to a user |