2nd DSTU Draft For Comment

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

6.23.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.23.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:
NameCardinalityTypeProfileDocumentation
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)

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:
NameCardinalityTypeProfileDocumentation
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:

  • The underlying code systems are different (e.g. different versions, possibly with different defined behaviour)
  • The server optimises 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

6.23.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:
NameCardinalityTypeProfileDocumentation
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:
NameCardinalityTypeProfileDocumentation
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.23.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 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:
NameCardinalityTypeProfileDocumentation
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:
NameCardinalityTypeProfileDocumentation
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.23.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:
NameCardinalityTypeProfileDocumentation
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:
NameCardinalityTypeProfileDocumentation
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