This
page
is
part
of
the
FHIR
Specification
(v3.0.2:
STU
3).
The
current
version
which
supercedes
this
version
is
5.0.0
.
For
a
full
list
Continuous
Integration
Build
of
available
versions,
see
FHIR
(will
be
incorrect/inconsistent
at
times).
See
the
Directory
of
published
versions
.
Page
versions:
R5
R4B
R4
R3
R2
Responsible
Owner:
Work
Group
|
|
|
Compartments
:
|
This resource has 2 operations associated with it:
| $expand | Value Set Expansion |
| $validate-code | Value Set based Validation |
For
more
information
about
operations,
including
how
they
are
invoked,
see
Operations
.
4.8.16.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,
context
or
valueset
must
be
provided.
An
expanded
value
set
will
be
returned,
or
an
OperationOutcome
with
an
error
message.
The
official
URL
for
this
operation
definition
is
http://hl7.org/fhir/OperationDefinition/ValueSet-expand
Formal
Definition
(as
a
OperationDefinition
).
URL:
[base]/ValueSet/$expand
URL:
[base]/ValueSet/[id]/$expand
This
is
an
idempotent
operation
In
Parameters:
Name
Cardinality
Type
Binding
Profile
Documentation
url
0..1
uri
A
canonical
url
for
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
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
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
profile
registry
that
the
server
is
using,
but
can
be
used
to
delegate
the
mapping
from
an
application
context
to
a
binding
at
run-time
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
profile
0..1
uri
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
functionality
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.
Known
uses
for
profile
include:
*
whether
to
return
the
value
set
content
logical
definition
with
the
expansion
*
whether
to
include
inactive
concepts
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.
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)
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
includeDesignations
0..1
boolean
Controls
whether
concept
designations
are
to
be
included
or
excluded
in
value
set
expansions.
Overrides
the
value
in
the
expansion
profile
if
there
is
one
includeDefinition
0..1
boolean
Controls
whether
the
value
set
definition
is
included
or
excluded
in
value
set
expansions.
Overrides
the
value
in
the
expansion
profile
if
addition,
there
is
one
activeOnly
0..1
boolean
Controls
whether
inactive
concepts
are
included
or
excluded
in
value
set
expansions.
Overrides
the
value
in
the
expansion
profile
if
there
is
one.
Note
that
if
the
value
set
explicitly
specifies
operations
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
excludeNested
0..1
boolean
Controls
whether
or
not
the
value
set
expansion
nests
codes
or
not
(i.e.
ValueSet.expansion.contains.contains).
Overrides
the
value
in
the
expansion
profile
if
there
is
one
excludeNotForUI
0..1
boolean
Controls
whether
or
not
the
value
set
expansion
includes
codes
which
cannot
be
displayed
in
user
interfaces.
Overrides
the
value
in
the
expansion
profile
if
there
is
one
excludePostCoordinated
0..1
boolean
Controls
whether
or
not
the
value
set
expansion
includes
post
coordinated
codes.
Overrides
the
value
in
the
expansion
profile
if
there
is
one
displayLanguage
0..1
code
Specifies
the
language
to
be
used
for
description
in
the
expansions
i.e.
the
language
apply
to
be
used
for
ValueSet.expansion.contains.display.
Overrides
the
value
in
the
expansion
profile
if
there
is
one
all
resource
types:
|
|
|
|
|
|
|
|
|
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
For
more
than
one
is
present
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
displayLanguage
0..1
code
Specifies
the
language
to
be
used
for
description
when
validating
the
display
property
Out
Parameters:
Name
Cardinality
Type
Binding
Profile
Documentation
result
1..1
boolean
True
if
the
concept
details
supplied
information
about
operations,
including
how
they
are
valid
message
0..1
string
Error
details,
if
result
=
false.
If
this
is
provided
when
result
=
true,
the
message
carries
hints
and
warnings
display
0..1
string
A
valid
display
for
the
concept
if
the
system
wishes
to
display
this
to
a
user
4.8.16.2.1
Examples
Simple
validation
of
a
code/system
against
a
known
value
set
(Request):
GET [base]/ValueSet/23/$validate-code?system=http://loinc.org&code=1963-8&display=test
Validate
a
CodeableConcept
against
a
client
specified
value
set
(Request):
POST [base]/ValueSet/$validate-code
[other headers]
{
"ResourceType" : "Parameters",
"parameter" : [
{
"name" : "coding",
"valueCodeableConcept" : {
"coding" : {
"system" : "http://loinc.org",
"code" : "1963-8",
"display" : "test"
}
}
},
{
"name" : "valueSet",
"resource": {
"resourceType" : "ValueSet",
[etc]
}
}
]
}
Test
whether
a
Snomed
Concept
399211009
(History
of
myocardial
infarction)
is
subsumed
by
22298006
(Myocardial
infarction)
(Request):
GET [base]/ValueSet/$validate-code?system=http://snomed.info/sct&code=399211009&identifier=http://snomed.info/sct?fhir_vs%3Disa/22298006
Response:
HTTP/1.1 200 OK
[other headers]
{
"resourceType" : "Parameters",
"parameter" : [
{
"name" : "result",
"valueBoolean" : "false"
},
{
"name" : "message",
"valueString" : "The display \"test\" is incorrect"
},
{
"name" : "display",
"valueString" : "Bicarbonate [Moles/volume] in Serum"
}
]
}
invoked,
see
Operations
.