Release 4 FHIR CI-Build

This page is part of the Continuous Integration Build of FHIR Specification (v4.0.1: R4 - Mixed Normative and STU ) in it's permanent home (it will always (will be available incorrect/inconsistent at this URL). The current version which supercedes this version is 5.0.0 . For a full list of available versions, see times).
See the Directory of published versions . Page versions: R5 R4B R4 R3

Bundle-example.ttl

Example Bundle/bundle-example (Turtle)

Maturity Level : N/A
Responsible Owner: FHIR Infrastructure Work Group Standards Status : Informative Compartments : Not linked to any No defined compartments

Raw Turtle (+ also see Turtle/RDF Format Specification )

An example of a search response

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@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-example> a fhir:Bundle;
  fhir:nodeRole fhir:treeRoot;
  fhir:Resource.id [ fhir:value "bundle-example"];
  fhir:Resource.meta [
     fhir:Meta.lastUpdated [ fhir:value "2014-08-18T01:43:30Z"^^xsd:dateTime ]
  ];
  fhir:Bundle.type [ fhir:value "searchset"];
  fhir:Bundle.total [ fhir:value "3"^^xsd:nonNegativeInteger];
  fhir:Bundle.link [
     fhir:index 0;
     fhir:Bundle.link.relation [ fhir:value "self" ];
     fhir:Bundle.link.url [ fhir:value "https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2" ]
  ], [
     fhir:index 1;
     fhir:Bundle.link.relation [ fhir:value "next" ];
     fhir:Bundle.link.url [ fhir:value "https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2" ]
  ];
  fhir:Bundle.entry [
     fhir:index 0;
     fhir:Bundle.entry.fullUrl [ fhir:value "https://example.com/base/MedicationRequest/3123" ];
     fhir:Bundle.entry.resource <https://example.com/base/MedicationRequest/3123>;
     fhir:Bundle.entry.search [
       fhir:Bundle.entry.search.mode [ fhir:value "match" ];
       fhir:Bundle.entry.search.score [ fhir:value "1"^^xsd:decimal ]

<http://hl7.org/fhir/Bundle/bundle-example> a fhir:Bundle ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "bundle-example"] ; # 
  fhir:meta [
     fhir:lastUpdated [ fhir:v "2014-08-18T01:43:30Z"^^xsd:dateTime ]
  ] ; #   this example bundle is a search set  ,   when the search was executed  
  fhir:type [ fhir:v "searchset"] ; # 
  fhir:total [ fhir:v "3"^^xsd:nonNegativeInteger] ; #   the total number of matches. This is a stupid example - there's a grand total of 3 matches, and 
#    we're only going to return the first 1, with a next link, in order to demonstrate what a page link
#    looks like  
  fhir:link ( [
     fhir:relation [ fhir:v "self" ] ;
     fhir:url [
       fhir:v "https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2"^^xsd:anyURI ;
       fhir:l <https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication&_count=2>

     ]
  ], [
     fhir:index 1;
     fhir:Bundle.entry.fullUrl [ fhir:value "https://example.com/base/Medication/example" ];
     fhir:Bundle.entry.resource <https://example.com/base/Medication/example>;
     fhir:Bundle.entry.search [
       fhir:Bundle.entry.search.mode [ fhir:value "include" ]

  ] [
     fhir:relation [ fhir:v "next" ] ;
     fhir:url [
       fhir:v "https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2"^^xsd:anyURI ;
       fhir:l <https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2>

     ]
  ] .

  ] ) ; #   all search sets include the self link - the server's statement of what it thought it was 
#    searching on. The client can use this to cross-check whether the server executed what it 
#    asked the server to, if it cares  
  fhir:entry ( [
     fhir:fullUrl [
       fhir:v "https://example.com/base/MedicationRequest/3123"^^xsd:anyURI ;
       fhir:l <https://example.com/base/MedicationRequest/3123>
     ] ;
     fhir:resource ( <https://example.com/base/MedicationRequest/3123> ) ;
     fhir:search [
       fhir:mode [ fhir:v "match" ] ; #   this resource included as a match to the search criteria.\n         Servers are not required to populate this, but should, because\n         there are a few cases where it might be ambiguous whether a \n         resource is added because it's a match or an include          
       fhir:score [ fhir:v "1"^^xsd:decimal ] #   score. For matches where the criteria are not determinate,\n        e.g. text search on narrative, the server can include a score to indicate\n        how well the resource matches the conditions. Since this search is by patient\n        identifier, there's nothing fuzzy about it, but for example purposes:  
     ] #   and now optional search information  
  ] [
     fhir:fullUrl [
       fhir:v "https://example.com/base/Medication/example"^^xsd:anyURI ;
       fhir:l <https://example.com/base/Medication/example>
     ] ;
     fhir:resource ( <https://example.com/base/Medication/example> ) ;
     fhir:search [
       fhir:mode [ fhir:v "include" ] #   added because the client asked to include the medications  
     ]
  ] ) . #   now, the actual entries  


<https://example.com/base/MedicationRequest/3123> a fhir:MedicationRequest;
  fhir:Resource.id [ fhir:value "3123"];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 3123</p><p><b>status</b>: unknown</p><p><b>intent</b>: order</p><p><b>medication</b>: <a>Medication/example</a></p><p><b>subject</b>: <a>Patient/347</a></p></div>"
  ];
  fhir:MedicationRequest.status [ fhir:value "unknown"];
  fhir:MedicationRequest.intent [ fhir:value "order"];
  fhir:MedicationRequest.medicationReference [
     fhir:link <http://hl7.org/fhir/Medication/example>;
     fhir:Reference.reference [ fhir:value "Medication/example" ]
  ];
  fhir:MedicationRequest.subject [
     fhir:link <http://hl7.org/fhir/Patient/347>;
     fhir:Reference.reference [ fhir:value "Patient/347" ]
  ] .

<https://example.com/base/MedicationRequest/3123> a fhir:MedicationRequest ;
  fhir:id [ fhir:v "3123"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: MedicationRequest 3123</b></p><a name=\"3123\"> </a><a name=\"hc3123\"> </a><p><b>status</b>: Unknown</p><p><b>intent</b>: Order</p><h3>Medications</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Reference</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"broken-link.html\">Medication/example</a></td></tr></table><p><b>subject</b>: <a href=\"patient-example-f001-pieter.html\">Pieter van de Heuvel  Male, DoB: 1944-11-17 ( urn:oid:2.16.840.1.113883.2.4.6.3#?ngen-9? (use: usual, ))</a></p></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:status [ fhir:v "unknown"] ; #   snip  
  fhir:intent [ fhir:v "order"] ; # 
  fhir:medication [
     fhir:reference [
       fhir:l <http://hl7.org/fhir/Medication/example> ;
       fhir:reference [ fhir:v "Medication/example" ]
     ]
  ] ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/Patient/f001> ;
     fhir:reference [ fhir:v "Patient/f001" ]
  ] . # 


<http://hl7.org/fhir/Medication/example> a fhir:Medication .

<http://hl7.org/fhir/Patient/347> a fhir:Patient .

<https://example.com/base/Medication/example> a fhir:Medication;
  fhir:Resource.id [ fhir:value "example"];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p></div>"
  ] .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/Patient/f001> a fhir:Patient .


<http://hl7.org/fhir/Bundle/bundle-example.ttl> a owl:Ontology;
  owl:imports fhir:fhir.ttl;
  owl:versionIRI <http://build.fhir.org/Bundle/bundle-example.ttl> .

<https://example.com/base/Medication/example> a fhir:Medication ;
  fhir:id [ fhir:v "example"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Medication example</b></p><a name=\"example\"> </a><a name=\"hcexample\"> </a></div>"^^rdf:XMLLiteral ]
  ] . # 


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


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.