This page is part of the FHIR Specification (v4.5.0: R5 Preview #3). 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
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)
An example bundle that demonstrates various reference resolution paths
@prefix fhir: <http://hl7.org/fhir/> . @prefix loinc: <http://loinc.org/rdf#> . @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 ------------------------------------------------------------------- <http://hl7.org/fhir/Bundle/bundle-references> a fhir:Bundle; fhir:nodeRole fhir:treeRoot; fhir:Resource.id [ fhir:value "bundle-references"]; fhir:Bundle.type [ fhir:value "collection"]; fhir:Bundle.entry [ fhir:index 0; fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Patient/23" ]; fhir:Bundle.entry.resource <http://example.org/fhir/Patient/23> ], [ fhir:index 1; fhir:Bundle.entry.fullUrl [ fhir:value "urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d" ]; fhir:Bundle.entry.resource <urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d> ], [ fhir:index 2; fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Observation/123" ]; fhir:Bundle.entry.resource <http://example.org/fhir/Observation/123> ], [ fhir:index 3; fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Observation/124" ]; fhir:Bundle.entry.resource <http://example.org/fhir/Observation/124> ], [ fhir:index 4; fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Observation/12" ]; fhir:Bundle.entry.resource <http://example.org/fhir/Observation/12> ], [ fhir:index 5; fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Observation/14" ]; fhir:Bundle.entry.resource <http://example.org/fhir/Observation/14> ], [ fhir:index 6; fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir-2/Observation/14" ]; fhir:Bundle.entry.resource <http://example.org/fhir-2/Observation/14> ], [ fhir:index 7; fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Patient/45" ]; fhir:Bundle.entry.resource <http://example.org/fhir/Patient/45> ], [ fhir:index 8; fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Patient/45" ]; fhir:Bundle.entry.resource <http://example.org/fhir/Patient/45> ], [ fhir:index 9; fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Observation/47" ]; fhir:Bundle.entry.resource <http://example.org/fhir/Observation/47> ], [ fhir:index 10; fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Observation/48" ]; fhir:Bundle.entry.resource <http://example.org/fhir/Observation/48> ] . <http://example.org/fhir/Patient/23> a fhir:Patient; fhir:Resource.id [ fhir:value "23"]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: 23</p><p><b>identifier</b>: id: 1234567</p></div>" ]; fhir:Patient.identifier [ fhir:index 0; fhir:Identifier.system [ fhir:value "http://example.org/ids" ]; fhir:Identifier.value [ fhir:value "1234567" ] ] . <urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d> a fhir:Patient; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p></div>" ] . <http://example.org/fhir/Observation/123> a fhir:Observation; fhir:Resource.id [ fhir:value "123"]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: 123</p><p/><p><b>code</b>: <span>Glucose [Moles/volume] in Blood</span></p><p><b>subject</b>: <a>Patient/23</a></p></div>" ]; fhir:Observation.status [ fhir:value "final"]; fhir:Observation.code [ fhir:CodeableConcept.coding [ fhir:index 0; a loinc:15074-8; fhir:Coding.system [ fhir:value "http://loinc.org" ]; fhir:Coding.code [ fhir:value "15074-8" ]; fhir:Coding.display [ fhir:value "Glucose [Moles/volume] in Blood" ] ] ]; fhir:Observation.subject [ fhir:link <http://hl7.org/fhir/Patient/23>; fhir:Reference.reference [ fhir:value "Patient/23" ] ] . <http://hl7.org/fhir/Patient/23> a fhir:Patient . <http://example.org/fhir/Observation/124> a fhir:Observation; fhir:Resource.id [ fhir:value "124"]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: 124</p><p/><p><b>code</b>: <span>Glucose [Moles/volume] in Blood</span></p><p><b>subject</b>: <a>http://example.org/fhir/Patient/23</a></p></div>" ]; fhir:Observation.status [ fhir:value "final"]; fhir:Observation.code [ fhir:CodeableConcept.coding [ fhir:index 0; a loinc:15074-8; fhir:Coding.system [ fhir:value "http://loinc.org" ]; fhir:Coding.code [ fhir:value "15074-8" ]; fhir:Coding.display [ fhir:value "Glucose [Moles/volume] in Blood" ] ] ]; fhir:Observation.subject [ fhir:link <http://example.org/fhir/Patient/23>; fhir:Reference.reference [ fhir:value "http://example.org/fhir/Patient/23" ] ] . <http://example.org/fhir/Observation/12> a fhir:Observation; fhir:Resource.id [ fhir:value "12"]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: 12</p><p/><p><b>code</b>: <span>Glucose [Moles/volume] in Blood</span></p><p><b>subject</b>: <a>urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d</a></p></div>" ]; fhir:Observation.status [ fhir:value "final"]; fhir:Observation.code [ fhir:CodeableConcept.coding [ fhir:index 0; a loinc:15074-8; fhir:Coding.system [ fhir:value "http://loinc.org" ]; fhir:Coding.code [ fhir:value "15074-8" ]; fhir:Coding.display [ fhir:value "Glucose [Moles/volume] in Blood" ] ] ]; fhir:Observation.subject [ fhir:Reference.reference [ fhir:value "urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d" ] ] . <http://example.org/fhir/Observation/14> a fhir:Observation; fhir:Resource.id [ fhir:value "14"]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: 14</p><p/><p><b>code</b>: <span>Glucose [Moles/volume] in Blood</span></p><p><b>subject</b>: <a>http://example.org/fhir-2/Patient/1</a></p></div>" ]; fhir:Observation.status [ fhir:value "final"]; fhir:Observation.code [ fhir:CodeableConcept.coding [ fhir:index 0; a loinc:15074-8; fhir:Coding.system [ fhir:value "http://loinc.org" ]; fhir:Coding.code [ fhir:value "15074-8" ]; fhir:Coding.display [ fhir:value "Glucose [Moles/volume] in Blood" ] ] ]; fhir:Observation.subject [ fhir:link <http://example.org/fhir-2/Patient/1>; fhir:Reference.reference [ fhir:value "http://example.org/fhir-2/Patient/1" ] ] . <http://example.org/fhir-2/Observation/14> a fhir:Observation; fhir:Resource.id [ fhir:value "14"]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: 14</p><p/><p><b>code</b>: <span>Glucose [Moles/volume] in Blood</span></p><p><b>subject</b>: <a>Patient/23</a></p></div>" ]; fhir:Observation.status [ fhir:value "final"]; fhir:Observation.code [ fhir:CodeableConcept.coding [ fhir:index 0; a loinc:15074-8; fhir:Coding.system [ fhir:value "http://loinc.org" ]; fhir:Coding.code [ fhir:value "15074-8" ]; fhir:Coding.display [ fhir:value "Glucose [Moles/volume] in Blood" ] ] ]; fhir:Observation.subject [ fhir:link <http://hl7.org/fhir/Patient/23>; fhir:Reference.reference [ fhir:value "Patient/23" ] ] . <http://example.org/fhir/Patient/45> a fhir:Patient, fhir:Patient; fhir:Resource.id [ fhir:value "45"], [ fhir:value "45"]; fhir:Resource.meta [ fhir:Meta.versionId [ fhir:value "1" ] ], [ fhir:Meta.versionId [ fhir:value "2" ] ]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: 45</p><p><b>meta</b>: </p><p><b>name</b>: Name 1</p></div>" ], [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: 45</p><p><b>meta</b>: </p><p><b>name</b>: Name 2</p></div>" ]; fhir:Patient.name [ fhir:index 0; fhir:HumanName.text [ fhir:value "Name 1" ] ], [ fhir:index 0; fhir:HumanName.text [ fhir:value "Name 2" ] ] . <http://example.org/fhir/Observation/47> a fhir:Observation; fhir:Resource.id [ fhir:value "47"]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: 47</p><p/><p><b>code</b>: <span>Glucose [Moles/volume] in Blood</span></p><p><b>subject</b>: <a>Patient/45/_history/2</a></p></div>" ]; fhir:Observation.status [ fhir:value "final"]; fhir:Observation.code [ fhir:CodeableConcept.coding [ fhir:index 0; a loinc:15074-8; fhir:Coding.system [ fhir:value "http://loinc.org" ]; fhir:Coding.code [ fhir:value "15074-8" ]; fhir:Coding.display [ fhir:value "Glucose [Moles/volume] in Blood" ] ] ]; fhir:Observation.subject [ fhir:link <http://hl7.org/fhir/Patient/45/_history/2>; fhir:Reference.reference [ fhir:value "Patient/45/_history/2" ] ] . <http://hl7.org/fhir/Patient/45/_history/2> a fhir:Patient . <http://example.org/fhir/Observation/48> a fhir:Observation; fhir:Resource.id [ fhir:value "48"]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ]; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>id</b>: 48</p><p/><p><b>code</b>: <span>Glucose [Moles/volume] in Blood</span></p><p><b>subject</b>: <span/></p></div>" ]; fhir:Observation.status [ fhir:value "final"]; fhir:Observation.code [ fhir:CodeableConcept.coding [ fhir:index 0; a loinc:15074-8; fhir:Coding.system [ fhir:value "http://loinc.org" ]; fhir:Coding.code [ fhir:value "15074-8" ]; fhir:Coding.display [ fhir:value "Glucose [Moles/volume] in Blood" ] ] ]; fhir:Observation.subject [ fhir:Reference.identifier [ fhir:Identifier.system [ fhir:value "http://example.org/ids" ]; fhir:Identifier.value [ fhir:value "1234567" ] ] ] . # - ontology header ------------------------------------------------------------ <http://hl7.org/fhir/Bundle/bundle-references.ttl> a owl:Ontology; owl:imports fhir:fhir.ttl; owl:versionIRI <http://build.fhir.org/Bundle/bundle-references.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.