This
page
is
part
of
the
FHIR
Specification
(v0.0.82:
(v1.0.2:
DSTU
1).
2).
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 is the narrative for the resource. See also the XML or JSON format.
OPERATION: Validate a resource
The
validate
interaction
operation
checks
whether
the
attached
content
would
be
acceptable
either
generally,
or
as
a
create,
or
an
update
or
as
a
delete
to
an
existing
resource.
The
action
the
server
takes
depends
on
the
mode
parameter:
Modes update and delete can only be used when the operation is invoked at the resource instance level. The return from this operation is an OperationOutcome
URL:
[base]/Resource/$Validate
a
resource
[base]/Resource/$validate
URL:
[base]/Resource/[id]/$Validate
a
resource
[base]/Resource/[id]/$validate
Parameters
| Use | Name | Cardinality | Type | Binding | Documentation |
| IN | resource | 0..1 | Resource |
Must
be
present
|
|
| IN | mode | 0..1 |
| http://hl7.org/fhir/ValueSet/resource-validation-mode (Required) |
Default
is
'no
|
| IN | profile | 0..1 | uri |
If
this
is
nominated,
then
the
resource
is
validated
against
this
specific
profile.
If
a
profile
is
nominated,
and
the
server
cannot
validate
|
|
| OUT | return | 1..1 | OperationOutcome |
If the operation outcome does not list any errors, and a mode was specified, then this is an indication that the operation would be expected to succeed (excepting for transactional integrity issues, see below) |
This
operation
may
be
used
during
design
and
development
to
validate
application
design.
It
can
also
be
used
at
run-time.
One
possible
use
might
be
that
a
client
asks
the
server
whether
a
proposed
update
is
valid
as
the
user
is
editing
a
dialog,
dialog
and
displays
an
updated
error
to
the
user.
The
operation
can
be
used
as
part
of
a
light-weight
two
phase
commit
protocol
but
there
is
no
expectation
that
the
server
will
hold
the
content
of
the
resource
after
this
operation
is
used,
or
that
the
server
guarantees
to
succesfully
successfully
perform
an
actual
create,
update
or
delete
after
the
validation
operation
completes.
Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.