Conformance
This
page
is
part
of
the
Snapshot
#3
for
FHIR
Specification
(v4.3.0:
R4B
-
STU
).
The
current
version
which
supercedes
this
version
is
5.0.0
R5
,
released
to
support
Connectathon
32
.
For
a
full
list
of
available
versions,
see
the
Directory
of
published
versions
.
Page
versions:
R5
R4B
R4
R3
| FHIR Infrastructure Work Group | Maturity Level : N/A | Standards Status : Informative | Compartments : Not linked to any defined compartments |
Raw Turtle (+ also see Turtle/RDF Format Specification )
GraphDefinition example
@prefix fhir: <http://hl7.org/fhir/> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . # - resource -------------------------------------------------------------------[] a fhir:GraphDefinition; fhir:Resource.id [ fhir:value "example"];[a fhir:GraphDefinition; fhir:nodeRole fhir:treeRoot; fhir:Resource.id [ fhir:value "example"]; # fhir:DomainResource.text [fhir:Narrative.status [ fhir:value "generated" ] ]; fhir:GraphDefinition.url [ fhir:value "http://h7.org/fhir/GraphDefinition/example"]; fhir:GraphDefinition.name [ fhir:value "Document Generation Template"]; fhir:GraphDefinition.status [ fhir:value "draft"]; fhir:GraphDefinition.experimental [ fhir:value "true"]; fhir:GraphDefinition.date [ fhir:value "2015-08-04"]; fhir:GraphDefinition.publisher [ fhir:value "FHIR Project"];fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: GraphDefinition</b><a name=\"example\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource GraphDefinition "example" </p></div><p><b>url</b>: <code>http://h7.org/fhir/GraphDefinition/example</code></p><p><b>name</b>: Document Generation Template</p><p><b>status</b>: draft</p><p><b>date</b>: 2015-08-04</p><p><b>publisher</b>: FHIR Project</p><p><b>contact</b>: <a href=\"http://hl7.org/fhir\">http://hl7.org/fhir</a></p><p><b>description</b>: Specify to include list references when generating a document using the $document operation</p><p><b>start</b>: <span title=\" \n the $document operation will include everything directly linked to by the composition resource.\n In our case, we want any resources referred to by lists referenced from the composition to \n be included as well. \n \n We do this by defining a 'graph' of resources - and then we'll say to the $document server,\n aggregate this graph as well as other resources. So we define a graph that starts at composition,\n goes from section to list, and includes all the resources the list includes. \n \n While we're at it, we're going to say that all these resources must be about the same patient.\n Note that there are use cases for crossing patient record boundaries in documents, but not *this case*.\n \n &#10; this graph starts with a composition. We don't care what the specific profile is\n (though the statement above 'this case doesn't cross patients' implies that we do care a little) \">comp1</span></p><blockquote><p><b>node</b></p><p><b>nodeId</b>: comp1</p><p><b>description</b>: The base composition</p><p><b>type</b>: Composition</p><p><b>profile</b>: <a href=\"clinicaldocument.html\">Clinical Document</a></p></blockquote><blockquote><p><b>node</b></p><p><b>nodeId</b>: list1</p><p><b>description</b>: A list resource that a section entry reference points to</p><p><b>type</b>: List</p></blockquote><blockquote><p><b>node</b></p><p><b>nodeId</b>: resN</p><p><b>description</b>: Generic resource that's the target of a list reference</p><p><b>type</b>: Resource</p></blockquote><blockquote><p><b>link</b></p><p><b>description</b>: Link from Composition.section to list</p><p><b>sourceId</b>: comp1</p><p><b>path</b>: <span title=\" any section entry. Todo: this recurses; are we profiling this at all levels? \">Composition.section.entry</span></p><p><b>targetId</b>: <span title=\" \n one target. This graph is not making rules about the content of the section entries - that\n would be done in a profile. it's just saying, if you see a reference to a list in a section\n entry, these are the rules that describe the graph\n \">list1</span></p><h3>Compartments</h3><table class=\"grid\"><tr><td>-</td><td><b>Use</b></td><td><b>Rule</b></td><td><b>Code</b></td></tr><tr><td>*</td><td>requires</td><td>identical</td><td>Patient</td></tr></table></blockquote><blockquote><p><b>link</b></p><p><b>description</b>: Include any list entries</p><p><b>sourceId</b>: list1</p><p><b>path</b>: List.entry.item</p><p><b>targetId</b>: resN</p><h3>Compartments</h3><table class=\"grid\"><tr><td>-</td><td><b>Use</b></td><td><b>Rule</b></td><td><b>Code</b></td></tr><tr><td>*</td><td>requires</td><td>identical</td><td>Patient</td></tr></table></blockquote></div>" ]; # fhir:GraphDefinition.url [ fhir:value "http://h7.org/fhir/GraphDefinition/example"]; # fhir:GraphDefinition.name [ fhir:value "Document Generation Template"]; # fhir:GraphDefinition.status [ fhir:value "draft"]; # fhir:GraphDefinition.date [ fhir:value "2015-08-04"^^xsd:date]; # fhir:GraphDefinition.publisher [ fhir:value "FHIR Project"]; # fhir:GraphDefinition.contact [ fhir:index 0; fhir:ContactDetail.telecom [ fhir:index 0; fhir:ContactPoint.system [ fhir:value "url" ]; fhir:ContactPoint.value [ fhir:value "http://hl7.org/fhir" ] ]]; fhir:GraphDefinition.description [ fhir:value "Specify to include list references when generating a document using the $document operation"]; fhir:GraphDefinition.start [ fhir:value "Composition"];]; # fhir:GraphDefinition.description [ fhir:value "Specify to include list references when generating a document using the $document operation"]; # fhir:GraphDefinition.start [ fhir:value "comp1"]; # the $document operation will include everything directly linked to by the composition resource. In our case, we want any resources referred to by lists referenced from the composition to be included as well. We do this by defining a 'graph' of resources - and then we'll say to the $document server, aggregate this graph as well as other resources. So we define a graph that starts at composition, goes from section to list, and includes all the resources the list includes. While we're at it, we're going to say that all these resources must be about the same patient. Note that there are use cases for crossing patient record boundaries in documents, but not *this case*. , this graph starts with a composition. We don't care what the specific profile is (though the statement above 'this case doesn't cross patients' implies that we do care a little) fhir:GraphDefinition.node [ fhir:index 0; fhir:GraphDefinition.node.nodeId [ fhir:value "comp1" ]; fhir:GraphDefinition.node.description [ fhir:value "The base composition" ]; fhir:GraphDefinition.node.type [ fhir:value "Composition" ]; fhir:GraphDefinition.node.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/clinicaldocument"; fhir:link <http://hl7.org/fhir/StructureDefinition/clinicaldocument> ] ], [ fhir:index 1; fhir:GraphDefinition.node.nodeId [ fhir:value "list1" ]; fhir:GraphDefinition.node.description [ fhir:value "A list resource that a section entry reference points to" ]; fhir:GraphDefinition.node.type [ fhir:value "List" ] ], [ fhir:index 2; fhir:GraphDefinition.node.nodeId [ fhir:value "resN" ]; fhir:GraphDefinition.node.description [ fhir:value "Generic resource that's the target of a list reference" ]; fhir:GraphDefinition.node.type [ fhir:value "Resource" ] ]; # fhir:GraphDefinition.link [ fhir:index 0;fhir:GraphDefinition.path [ fhir:value "Composition.section.entry" ]; fhir:GraphDefinition.description [ fhir:value "Link to List" ]; fhir:GraphDefinition.target [fhir:GraphDefinition.link.description [ fhir:value "Link from Composition.section to list" ]; fhir:GraphDefinition.link.sourceId [ fhir:value "comp1" ]; fhir:GraphDefinition.link.path [ fhir:value "Composition.section.entry" ]; # any section entry. Todo: this recurses; are we profiling this at all levels? fhir:GraphDefinition.link.targetId [ fhir:value "list1" ]; # \n one target. This graph is not making rules about the content of the section entries - that\n would be done in a profile. it's just saying, if you see a reference to a list in a section\n entry, these are the rules that describe the graph\n fhir:GraphDefinition.link.compartment [ fhir:index 0;fhir:GraphDefinition.type [ fhir:value "List" ]; fhir:GraphDefinition.compartment [ fhir:index 0; fhir:GraphDefinition.use [ fhir:value "requirement" ]; fhir:GraphDefinition.code [ fhir:value "Patient" ]; fhir:GraphDefinition.rule [ fhir:value "identical" ] ]; fhir:GraphDefinition.link [ fhir:index 0; fhir:GraphDefinition.path [ fhir:value "List.entry.item" ]; fhir:GraphDefinition.description [ fhir:value "Include any list entries" ]; fhir:GraphDefinition.target [ fhir:index 0; fhir:GraphDefinition.type [ fhir:value "Resource" ]; fhir:GraphDefinition.compartment [ fhir:index 0; fhir:GraphDefinition.use [ fhir:value "requirement" ]; fhir:GraphDefinition.code [ fhir:value "Patient" ]; fhir:GraphDefinition.rule [ fhir:value "identical" ] ] ] ]fhir:GraphDefinition.link.compartment.use [ fhir:value "requires" ]; fhir:GraphDefinition.link.compartment.rule [ fhir:value "identical" ]; fhir:GraphDefinition.link.compartment.code [ fhir:value "Patient" ] ]] .], [ fhir:index 1; fhir:GraphDefinition.link.description [ fhir:value "Include any list entries" ]; fhir:GraphDefinition.link.sourceId [ fhir:value "list1" ]; fhir:GraphDefinition.link.path [ fhir:value "List.entry.item" ]; fhir:GraphDefinition.link.targetId [ fhir:value "resN" ]; fhir:GraphDefinition.link.compartment [ fhir:index 0; fhir:GraphDefinition.link.compartment.use [ fhir:value "requires" ]; fhir:GraphDefinition.link.compartment.rule [ fhir:value "identical" ]; fhir:GraphDefinition.link.compartment.code [ fhir:value "Patient" ] ] ]] . # define the section -> list link # - ontology header ------------------------------------------------------------ [a owl:Ontology; owl:imports fhir:fhir.ttl] . # -------------------------------------------------------------------------------------
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.
FHIR
®©
HL7.org
2011+.
FHIR
Release
4B
(v4.3.0)
hl7.fhir.r4b.core#4.3.0
R5
Ballot
hl7.fhir.core#5.0.0-snapshot3
generated
on
Sat,
May
28,
Wed,
Dec
14,
2022
12:55+1000.
07:16+1100.
Links:
Search
|
Version
History
|
Table
of
Contents
|
Glossary
|
QA
Page
|
Compare
to
R4
R4B
|
Compare
to
R5
Draft
|
|
Propose
a
change