This page is part of the FHIR Specification (v0.0.82: DSTU 1). 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

6.21.15 Resource ValueSet - Operations

This resource has 4 operations associated with it. For more information about operations, including how they are invoked, see Operations.

6.21.15.1 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 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:
NameCardinalityTypeStructureDefinitionDocumentation
identifier0..1uri

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

valueSet0..1ValueSet

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

filter0..1string

A text filter that is applied to restrict the codes that are returned (this is useful in a UI context)

profile0..1uri

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

date0..1dateTime

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:
NameCardinalityTypeStructureDefinitionDocumentation
return1..1ValueSet

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:

6.21.15.2 Concept Look Up

Given a code/system, or a Coding, get additional details about the concept

Formal Definition (as a OperationDefinition).

URL: [base]/ValueSet/$lookup

In Parameters:
NameCardinalityTypeStructureDefinitionDocumentation
code0..1code

The code that is to be validated. If a code is provided, a system must be provided

system0..1uri

The system for the code that is to be validated

version0..1string

The version of the system, if one was provided in the source data

coding0..1Coding

A coding to look up

date0..1dateTime

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:
NameCardinalityTypeStructureDefinitionDocumentation
name1..1string

A display name for the code system

version0..1string

The version that these details are based on

display1..1string

The preferred display for this concept

abstract0..1boolean

Whether this code is an abstract concept

designation0..*

Additional representations for this concept

   language0..1code

The language this designation is defined for

   use0..1Coding

A code that details how this designation would be used

   value1..1string

The text value for this designation

6.21.15.3 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 "identifier" or "valueset" must be provided.

One (and only one) of the in parameters (code, coding, codeableConcept) must be provided.

The operation returns a result (true / false), an error message, and the recommended display for the code

Formal Definition (as a OperationDefinition).

URL: [base]/ValueSet/$validate-code

URL: [base]/ValueSet/[id]/$validate-code

In Parameters:
NameCardinalityTypeStructureDefinitionDocumentation
identifier0..1uri

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

valueSet0..1ValueSet

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

code0..1code

The code that is to be validated. If a code is provided, a system must be provided

system0..1uri

The system for the code that is to be validated

version0..1string

The version of the system, if one was provided in the source data

display0..1string

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

coding0..1Coding

A coding to validate

codeableConcept0..1CodeableConcept

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

date0..1dateTime

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.

abstract0..1boolean

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:
NameCardinalityTypeStructureDefinitionDocumentation
result1..1boolean

True if the concept details supplied are valid

message0..1string

Error details, if result = false. If this is provided when result = true, the message carries hints and wanrings

display0..1string

A valid display for the concept if the system wishes to display this to a user

6.21.15.4 Batch Mode Validation

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:
NameCardinalityTypeStructureDefinitionDocumentation
item0..*

An item to be validated

   concept1..1CodeableConcept

A codeable concept to be validated. If the source is a coding, or a code/system pair, wrap it in a CodeableConcept

   uri1..1uri

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

date0..1dateTime

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:
NameCardinalityTypeStructureDefinitionDocumentation
item0..*

The outcome of validating an item. There must be an entry for every item in the same order

   result1..1boolean

True if the concept details supplied are valid

   message0..1string

Error details, if result = false. If this is provided when result = true, the message carries hints and wanrings

   display0..1string

A valid display for the concept if the system wishes to display this to a user