This
page
is
part
of
the
FHIR
Specification
(v5.0.0:
R5
-
STU
v6.0.0-ballot1:
Release
6
Ballot
(1st
Draft)
(see
Ballot
Notes
).
This
is
the
The
current
published
version
in
it's
permanent
home
(it
will
always
be
available
at
this
URL).
is
5.0.0
.
For
a
full
list
of
available
versions,
see
the
Directory
of
published
versions
.
Page
versions:
R5
R4B
R4
R3
Linkage.shex
Raw
ShEx
ShEx
statement
for
linkage
PREFIX fhir: <http://hl7.org/fhir/>
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
IMPORT <code.shex>
IMPORT <boolean.shex>
IMPORT <Resource.shex>
IMPORT <Reference.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <DomainResource.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
start=@<Linkage> AND {fhir:nodeRole [fhir:treeRoot]}
# Links records for 'same' item
<Linkage> EXTENDS @<DomainResource> CLOSED {
a [fhir:Linkage]?;
fhir:nodeRole [fhir:treeRoot]?;
fhir:active @<boolean>?; # Whether this linkage assertion is
# active or not
fhir:author @<Reference> AND {fhir:link
@<Organization> OR
@<Practitioner> OR
@<PractitionerRole> ? }?; # Who is responsible for linkages
fhir:item @<OneOrMore_Linkage.item>; # Item to be linked
}
# Item to be linked
<Linkage.item> EXTENDS @<BackboneElement> CLOSED {
fhir:type @<code> AND
{fhir:v @fhirvs:linkage-type}; # source | alternate | historical
fhir:resource @<Reference> AND {fhir:link
@<Resource> ? }; # Resource being linked
}
#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Linkage.item> CLOSED {
rdf:first @<Linkage.item> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Linkage.item>
}
#---------------------- Value Sets ------------------------
# Used to distinguish different roles a resource can play within a set of linked resources.
fhirvs:linkage-type ["source" "alternate" "historical"]
PREFIX fhir: <http://hl7.org/fhir/>
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
IMPORT <code.shex>
IMPORT <boolean.shex>
IMPORT <Resource.shex>
IMPORT <Reference.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <DomainResource.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
start=@<Linkage> AND {fhir:nodeRole [fhir:treeRoot]}
# Links records for 'same' item
<Linkage> EXTENDS @<DomainResource> CLOSED {
a [fhir:Linkage]?;
fhir:nodeRole [fhir:treeRoot]?;
fhir:active @<boolean>?; # Whether this linkage assertion is
# active or not
fhir:author @<Reference> AND {fhir:link
@<Organization> OR
@<Practitioner> OR
@<PractitionerRole> ? }?; # Who is responsible for linkages
fhir:item @<OneOrMore_Linkage.item>; # Item to be linked
}
# Item to be linked
<Linkage.item> EXTENDS @<BackboneElement> CLOSED {
fhir:type @<code> AND
{fhir:v @fhirvs:linkage-type}; # source | alternate | historical
fhir:resource @<Reference> AND {fhir:link
@<Resource> ? }; # Resource being linked
}
#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Linkage.item> CLOSED {
rdf:first @<Linkage.item> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Linkage.item>
}
#---------------------- Value Sets ------------------------
# Used to distinguish different roles a resource can play within a set of linked resources.
fhirvs:linkage-type ["source" "alternate" "historical"]
Usage
note:
every
effort
has
been
made
to
ensure
that
the
ShEx
files
are
correct
and
useful,
but
they
are
not
a
normative
part
of
the
specification.