Snapshot 3: Connectathon 32 Base

This is Snapshot #3 for FHIR R5, released to support Connectathon 32. For a full list of available versions, see the Directory of published versions.

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: <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 -------------------------------------------------------------------

[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>
  ]] . #    A patient that already has an id on a server   

<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 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: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 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: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: 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: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 "Patient/23" ] #    this is reference to the first patient above   
  ] . # 

<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: 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: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" ] #    this is reference to the first patient above   
  ] . # 

<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: 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: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" ] #    reference to the second patient above   
  ] . # 

<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: 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: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" ] #    reference to a patient not found in this bundle   
  ] . # 

<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: 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: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 "Patient/23" ] #    reference to a patient not found in this bundle   
  ] . # 

<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 style=\"border: 1px #661aff solid; background-color: #e6e6ff; padding: 10px;\"><b>Name 1</b> (no stated gender), DoB Unknown</p><hr/></div>"
  ], [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.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: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: 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: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 "Patient/45/_history/2" ]
  ] . # 

<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: 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: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 ------------------------------------------------------------

[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.