R5 Final QA

This page is part of the FHIR Specification (v5.0.0-draft-final: Final QA Preview for R5 - see ballot notes). 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

Example Bundle/bundle-references (Turtle)

FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: 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: <https://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 -------------------------------------------------------------------

[a fhir:Bundle ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "bundle-references"] ; # 
  fhir:type [ fhir:v "collection"] ; # 
  fhir:entry ( [
     fhir:fullUrl [ fhir:v "http://example.org/fhir/Patient/23"^^xsd:anyURI ] ;
     fhir:resource ( <http://example.org/fhir/Patient/23> )
  ] [
     fhir:fullUrl [ fhir:v "urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d"^^xsd:anyURI ] ;
     fhir:resource ( <urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d> )
  ] [
     fhir:fullUrl [ fhir:v "http://example.org/fhir/Observation/123"^^xsd:anyURI ] ;
     fhir:resource ( <http://example.org/fhir/Observation/123> )
  ] [
     fhir:fullUrl [ fhir:v "http://example.org/fhir/Observation/124"^^xsd:anyURI ] ;
     fhir:resource ( <http://example.org/fhir/Observation/124> )
  ] [
     fhir:fullUrl [ fhir:v "http://example.org/fhir/Observation/12"^^xsd:anyURI ] ;
     fhir:resource ( <http://example.org/fhir/Observation/12> )
  ] [
     fhir:fullUrl [ fhir:v "http://example.org/fhir/Observation/14"^^xsd:anyURI ] ;
     fhir:resource ( <http://example.org/fhir/Observation/14> )
  ] [
     fhir:fullUrl [ fhir:v "http://example.org/fhir-2/Observation/14"^^xsd:anyURI ] ;
     fhir:resource ( <http://example.org/fhir-2/Observation/14> )
  ] [
     fhir:fullUrl [ fhir:v "http://example.org/fhir/Patient/45"^^xsd:anyURI ] ;
     fhir:resource ( <http://example.org/fhir/Patient/45> )
  ] [
     fhir:fullUrl [ fhir:v "http://example.org/fhir/Patient/45"^^xsd:anyURI ] ;
     fhir:resource ( <http://example.org/fhir/Patient/45> )
  ] [
     fhir:fullUrl [ fhir:v "http://example.org/fhir/Observation/47"^^xsd:anyURI ] ;
     fhir:resource ( <http://example.org/fhir/Observation/47> )
  ] [
     fhir:fullUrl [ fhir:v "http://example.org/fhir/Observation/48"^^xsd:anyURI ] ;
     fhir:resource ( <http://example.org/fhir/Observation/48> )
  ] )] . #    A patient that already has an id on a server   

<http://example.org/fhir/Patient/23> a fhir:Patient ;
  fhir:id [ fhir:v "23"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p style=\"border: 1px #661aff solid; background-color: #e6e6ff; padding: 10px;\"><b>Anonymous Patient</b> (no stated gender), DoB Unknown ( id: 1234567)</p><hr/></div>"
  ] ; # 
  fhir:identifier ( [
     fhir:system [ fhir:v "http://example.org/ids"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "1234567" ]
  ] ) . # 

<urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d> a fhir:Patient ;
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p style=\"border: 1px #661aff solid; background-color: #e6e6ff; padding: 10px;\"><b>Anonymous Patient</b> (no stated gender), DoB Unknown</p><hr/></div>"
  ] . # 

<http://example.org/fhir/Observation/123> a fhir:Observation ;
  fhir:id [ fhir:v "123"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b><a name=\"123\"> </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 Observation &quot;123&quot; </p></div><p><b>status</b>: final</p><p><b>code</b>: Glucose [Moles/volume] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#15074-8)</span></p><p><b>subject</b>: <a href=\"broken-link.html\">Patient/23</a></p></div>"
  ] ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:15074-8 ;
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "15074-8" ] ;
       fhir:display [ fhir:v "Glucose [Moles/volume] in Blood" ]
     ] )
  ] ; # 
  fhir:subject [
     fhir:reference [ fhir:v "Patient/23" ] #    this is reference to the first patient above   
  ] . # 

<http://example.org/fhir/Observation/124> a fhir:Observation ;
  fhir:id [ fhir:v "124"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b><a name=\"124\"> </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 Observation &quot;124&quot; </p></div><p><b>status</b>: final</p><p><b>code</b>: Glucose [Moles/volume] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#15074-8)</span></p><p><b>subject</b>: <a href=\"broken-link.html\">http://example.org/fhir/Patient/23</a></p></div>"
  ] ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:15074-8 ;
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "15074-8" ] ;
       fhir:display [ fhir:v "Glucose [Moles/volume] in Blood" ]
     ] )
  ] ; # 
  fhir:subject [
     fhir:link <http://example.org/fhir/Patient/23> ;
     fhir:reference [ fhir:v "http://example.org/fhir/Patient/23" ] #    this is reference to the first patient above   
  ] . # 

<http://example.org/fhir/Observation/12> a fhir:Observation ;
  fhir:id [ fhir:v "12"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b><a name=\"12\"> </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 Observation &quot;12&quot; </p></div><p><b>status</b>: final</p><p><b>code</b>: Glucose [Moles/volume] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#15074-8)</span></p><p><b>subject</b>: <a href=\"broken-link.html\">urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d</a></p></div>"
  ] ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:15074-8 ;
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "15074-8" ] ;
       fhir:display [ fhir:v "Glucose [Moles/volume] in Blood" ]
     ] )
  ] ; # 
  fhir:subject [
     fhir:reference [ fhir:v "urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d" ] #    reference to the second patient above   
  ] . # 

<http://example.org/fhir/Observation/14> a fhir:Observation ;
  fhir:id [ fhir:v "14"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b><a name=\"14\"> </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 Observation &quot;14&quot; </p></div><p><b>status</b>: final</p><p><b>code</b>: Glucose [Moles/volume] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#15074-8)</span></p><p><b>subject</b>: <a href=\"broken-link.html\">http://example.org/fhir-2/Patient/1</a></p></div>"
  ] ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:15074-8 ;
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "15074-8" ] ;
       fhir:display [ fhir:v "Glucose [Moles/volume] in Blood" ]
     ] )
  ] ; # 
  fhir:subject [
     fhir:link <http://example.org/fhir-2/Patient/1> ;
     fhir:reference [ fhir:v "http://example.org/fhir-2/Patient/1" ] #    reference to a patient not found in this bundle   
  ] . # 

<http://example.org/fhir-2/Observation/14> a fhir:Observation ;
  fhir:id [ fhir:v "14"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b><a name=\"14\"> </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 Observation &quot;14&quot; </p></div><p><b>status</b>: final</p><p><b>code</b>: Glucose [Moles/volume] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#15074-8)</span></p><p><b>subject</b>: <a href=\"broken-link.html\">Patient/23</a></p></div>"
  ] ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:15074-8 ;
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "15074-8" ] ;
       fhir:display [ fhir:v "Glucose [Moles/volume] in Blood" ]
     ] )
  ] ; # 
  fhir:subject [
     fhir:reference [ fhir:v "Patient/23" ] #    reference to a patient not found in this bundle   
  ] . # 

<http://example.org/fhir/Patient/45> a fhir:Patient, fhir:Patient ;
  fhir:id [ fhir:v "45"], [ fhir:v "45"] ; # 
  fhir:meta [
     fhir:versionId [ fhir:v "1" ]
  ], [
     fhir:versionId [ fhir:v "2" ]
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p style=\"border: 1px #661aff solid; background-color: #e6e6ff; padding: 10px;\"><b>Name 1</b> (no stated gender), DoB Unknown</p><hr/></div>"
  ], [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p style=\"border: 1px #661aff solid; background-color: #e6e6ff; padding: 10px;\"><b>Name 2</b> (no stated gender), DoB Unknown</p><hr/></div>"
  ] ; # 
  fhir:name ( [
     fhir:text [ fhir:v "Name 1" ]
  ] [
     fhir:text [ fhir:v "Name 2" ]
  ] ) . # 

<http://example.org/fhir/Observation/47> a fhir:Observation ;
  fhir:id [ fhir:v "47"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b><a name=\"47\"> </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 Observation &quot;47&quot; </p></div><p><b>status</b>: final</p><p><b>code</b>: Glucose [Moles/volume] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#15074-8)</span></p><p><b>subject</b>: <a href=\"broken-link.html\">Patient/45/_history/2</a></p></div>"
  ] ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:15074-8 ;
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "15074-8" ] ;
       fhir:display [ fhir:v "Glucose [Moles/volume] in Blood" ]
     ] )
  ] ; # 
  fhir:subject [
     fhir:reference [ fhir:v "Patient/45/_history/2" ]
  ] . # 

<http://example.org/fhir/Observation/48> a fhir:Observation ;
  fhir:id [ fhir:v "48"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b><a name=\"48\"> </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 Observation &quot;48&quot; </p></div><p><b>status</b>: final</p><p><b>code</b>: Glucose [Moles/volume] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#15074-8)</span></p><p><b>subject</b>: <span/></p></div>"
  ] ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:15074-8 ;
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "15074-8" ] ;
       fhir:display [ fhir:v "Glucose [Moles/volume] in Blood" ]
     ] )
  ] ; # 
  fhir:subject [
     fhir:identifier [
       fhir:system [ fhir:v "http://example.org/ids"^^xsd:anyURI ] ;
       fhir:value [ fhir:v "1234567" ]
     ]
  ] . # 

# -------------------------------------------------------------------------------------


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.