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
If
the
resource
is
contained
in
another
resource,
it
SHALL
be
referred
to
from
elsewhere
in
the
resource
(
expression
or
SHALL
refer
to
the
containing
resource
:
contained.where(('#'+id
in
%resource.descendants().reference).not()).empty(),
xpath:
not(exists(for
$id
contained.where((('#'+id.trace('id')
in
f:contained/*/@id
return
$id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#',
$id))])))
%resource.descendants().select(reference
|
as(uri)))
or
descendants().where(reference='#'
|
as(uri)='#').exists()).not()).trace('unmatched',
id).empty()
A
resource
should
have
narrative
for
robust
management
text.`div`.exists()
This
is
(only)
a
best
practice
guideline
because:
When
a
resource
has
no
narrative,
only
systems
that
fully
understand
the
data
can
display
the
resource
to
a
human
safely.
Including
a
human
readable
representation
in
the
resource
makes
for
a
much
more
robust
eco-system
and
not(exists(f:contained/*/f:meta/f:lastUpdated)))
cheaper
handling
of
resources
by
intermediary
systems.
Some
ecosystems
restrict
distribution
of
resources
to
only
those
systems
that
do
fully
understand
the
resources,
and
as
a
consequence
implementers
may
believe
that
the
narrative
is
superfluous.
However
experience
shows
that
such
eco-systems
often
open
up
to
new
participants
over
time.
DomainResource.text
Definition
A
human-readable
narrative
that
contains
a
summary
of
the
resource,
resource
and
may
can
be
used
to
represent
the
content
of
the
resource
to
a
human.
The
narrative
need
not
encode
all
the
structured
data,
but
is
required
to
contain
sufficient
detail
to
make
it
"clinically
safe"
"clinically
safe"
for
a
human
to
just
read
the
narrative.
Resource
definitions
may
define
what
content
should
be
represented
in
the
narrative
to
ensure
clinical
safety.
Short
Display
Text
summary
of
the
resource,
for
human
interpretation
Contained
resources
do
not
have
a
narrative.
Resources
that
are
not
contained
SHOULD
have
a
narrative.
In
some
cases,
a
resource
may
only
have
text
with
little
or
no
additional
discrete
data
(as
long
as
all
minOccurs=1
elements
are
satisfied).
This
may
be
necessary
for
data
from
legacy
systems
where
information
is
captured
as
a
"text
blob"
"text
blob"
or
where
text
is
additionally
entered
raw
or
narrated
and
encoded
in
formation
information
is
added
later.
A
resource
should
have
narrative
for
robust
management
text.`div`.exists()
This
is
contained
(only)
a
best
practice
guideline
because:
When
a
resource
has
no
narrative,
only
systems
that
fully
understand
the
data
can
display
the
resource
to
a
human
safely.
Including
a
human
readable
representation
in
another
resource,
it
SHALL
NOT
contain
any
the
resource
makes
for
a
much
more
robust
eco-system
and
cheaper
handling
of
resources
by
intermediary
systems.
Some
ecosystems
restrict
distribution
of
resources
to
only
those
systems
that
do
fully
understand
the
resources,
and
as
a
consequence
implementers
may
believe
that
the
narrative
(
expression
is
superfluous.
However
experience
shows
that
such
eco-systems
often
open
up
to
new
participants
over
time.
:
contained.text.empty(),
xpath:
not(parent::f:contained
and
f:text))
DomainResource.contained
Definition
These
resources
do
not
have
an
independent
existence
apart
from
the
resource
that
contains
them
-
they
cannot
be
identified
independently,
and
nor
can
they
have
their
own
independent
transaction
scope.
This
is
allowed
to
be
a
Parameters
resource
if
and
only
if
it
is
referenced
by
a
resource
that
provides
context/meaning.
This
should
never
be
done
when
the
content
can
be
identified
properly,
as
once
identification
is
lost,
it
is
extremely
difficult
(and
context
dependent)
to
restore
it
again.
Contained
resources
may
have
profiles
and
tags
in
their
meta
elements,
but
SHALL
NOT
have
security
labels.
Contained
resources
may
be
a
resource
type
defined
in
the
FHIR
specification,
or
an
additional
resource
.
If
the
resource
is
contained
in
another
resource,
it
SHALL
be
referred
to
from
elsewhere
in
the
resource
or
SHALL
refer
to
the
containing
resource
contained.where((('#'+id.trace('id')
in
%resource.descendants().select(reference
|
as(uri)))
or
descendants().where(reference='#'
|
as(uri)='#').exists()).not()).trace('unmatched',
id).empty()
If
a
resource
is
contained
in
another
resource,
it
SHALL
NOT
have
a
security
label
contained.meta.security.empty()
DomainResource.extension
Definition
May
be
used
to
represent
additional
information
that
is
not
part
of
the
basic
definition
of
the
resource.
In
order
to
To
make
the
use
of
extensions
safe
and
manageable,
managable,
there
is
a
strict
set
of
governance
applied
to
the
definition
and
use
of
extensions.
Though
any
implementer
is
allowed
to
can
define
an
extension,
there
is
a
set
of
requirements
that
SHALL
be
met
as
part
of
the
definition
of
the
extension.
There
can
be
no
stigma
associated
with
the
use
of
extensions
by
any
application,
project,
or
standard
-
regardless
of
the
institution
or
jurisdiction
that
uses
or
defines
the
extensions.
The
use
of
extensions
is
what
allows
the
FHIR
specification
to
retain
a
core
level
of
simplicity
for
everyone.
DomainResource.modifierExtension
Definition
May
be
used
to
represent
additional
information
that
is
not
part
of
the
basic
definition
of
the
resource,
resource
and
that
modifies
the
understanding
of
the
element
that
contains
it.
it
and/or
the
understanding
of
the
containing
element's
descendants.
Usually
modifier
elements
provide
negation
or
qualification.
In
order
to
To
make
the
use
of
extensions
safe
and
manageable,
managable,
there
is
a
strict
set
of
governance
applied
to
the
definition
and
use
of
extensions.
Though
any
implementer
is
allowed
to
define
an
extension,
there
is
a
set
of
requirements
that
SHALL
be
met
as
part
of
the
definition
of
the
extension.
Applications
processing
a
resource
are
required
to
check
for
modifier
extensions.
Modifier
extensions
SHALL
NOT
change
the
meaning
of
any
elements
on
Resource
or
DomainResource
(including
cannot
change
the
meaning
of
modifierExtension
itself).
true
(Reason:
Modifier
extensions
are
expected
to
modify
the
meaning
or
interpretation
of
the
resource
that
contains
them)
Requirements
Modifier
extensions
allow
for
extensions
that
cannot
be
safely
ignored
to
be
clearly
distinguished
from
the
vast
majority
of
extensions
which
can
be
safely
ignored.
This
promotes
interoperability
by
eliminating
the
need
for
implementers
to
prohibit
the
presence
of
extensions.
For
further
information,
see
the
definition
of
modifier
extensions
.
There
can
be
no
stigma
associated
with
the
use
of
extensions
by
any
application,
project,
or
standard
-
regardless
of
the
institution
or
jurisdiction
that
uses
or
defines
the
extensions.
The
use
of
extensions
is
what
allows
the
FHIR
specification
to
retain
a
core
level
of
simplicity
for
everyone.