FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

Example Bundle/bundle-request-transaction-complex (Turtle)

FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: No defined compartments

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

A complex example transaction request

@prefix fhir: <http://hl7.org/fhir/> .
@prefix loinc: <https://loinc.org/rdf/> .
@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 sct: <http://snomed.info/id/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://hl7.org/fhir/Bundle/bundle-request-transaction-complex> a fhir:Bundle ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "bundle-request-transaction-complex"] ; # 
  fhir:meta [
     fhir:lastUpdated [ fhir:v "2025-03-20T00:00:00Z"^^xsd:dateTime ]
  ] ; # 
  fhir:type [ fhir:v "transaction"] ; # 
  fhir:entry ( [
     fhir:fullUrl [ fhir:v "urn:uuid:a008e191-0dfa-3ab3-b035-49d7d2e69cb4"^^xsd:anyURI ] ;
     fhir:resource ( <urn:uuid:a008e191-0dfa-3ab3-b035-49d7d2e69cb4> ) ;
     fhir:request [
       fhir:method [ fhir:v "POST" ] ;
       fhir:url [ fhir:v "Practitioner"^^xsd:anyURI ] ;
       fhir:ifNoneExist [ fhir:v "identifier=http://hl7.org/fhir/sid/us-npi|9999947796" ]
     ]
  ] [
     fhir:fullUrl [ fhir:v "urn:uuid:dbc4a3f7-9c69-4435-3ce3-4e1988ab6b91"^^xsd:anyURI ] ;
     fhir:resource ( <urn:uuid:dbc4a3f7-9c69-4435-3ce3-4e1988ab6b91> ) ;
     fhir:request [
       fhir:method [ fhir:v "POST" ] ;
       fhir:url [ fhir:v "Patient"^^xsd:anyURI ]
     ]
  ] [
     fhir:fullUrl [ fhir:v "urn:uuid:eaeb9228-4420-5e9c-b217-4c1a98ff9fe0"^^xsd:anyURI ] ;
     fhir:resource ( <urn:uuid:eaeb9228-4420-5e9c-b217-4c1a98ff9fe0> ) ;
     fhir:request [
       fhir:method [ fhir:v "POST" ] ;
       fhir:url [ fhir:v "Encounter"^^xsd:anyURI ]
     ]
  ] [
     fhir:fullUrl [ fhir:v "urn:uuid:f5030c53-c71d-9dd6-a85f-6647c09c34b4"^^xsd:anyURI ] ;
     fhir:resource ( <urn:uuid:f5030c53-c71d-9dd6-a85f-6647c09c34b4> ) ;
     fhir:request [
       fhir:method [ fhir:v "POST" ] ;
       fhir:url [ fhir:v "Observation"^^xsd:anyURI ]
     ]
  ] ) . # 

<urn:uuid:a008e191-0dfa-3ab3-b035-49d7d2e69cb4> a fhir:Practitioner ;
  fhir:id [ fhir:v "a008e191-0dfa-3ab3-b035-49d7d2e69cb4"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Practitioner a008e191-0dfa-3ab3-b035-49d7d2e69cb4</b></p><a name=\"a008e191-0dfa-3ab3-b035-49d7d2e69cb4\"> </a><a name=\"hca008e191-0dfa-3ab3-b035-49d7d2e69cb4\"> </a><a name=\"a008e191-0dfa-3ab3-b035-49d7d2e69cb4-en-US\"> </a><p><b>identifier</b>: <a href=\"http://terminology.hl7.org/6.2.0/NamingSystem-npi.html\" title=\"National Provider Identifier\">United States National Provider Identifier</a>/9999947796</p><p><b>active</b>: true</p><p><b>name</b>: Francisco472 Gusikowski974 </p><p><b>telecom</b>: <a href=\"mailto:Francisco472.Gusikowski974@example.com\">Francisco472.Gusikowski974@example.com</a></p><p><b>gender</b>: female</p><p><b>address</b>: 8 SHIPWAY PL # C-8 CHARLESTOWN MA 021294301 US </p></div>"^^rdf:XMLLiteral
  ] ; # 
  fhir:identifier ( [
     fhir:system [ fhir:v "http://hl7.org/fhir/sid/us-npi"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "9999947796" ]
  ] ) ; # 
  fhir:active [ fhir:v true] ; # 
  fhir:name ( [
     fhir:family [ fhir:v "Gusikowski974" ] ;
     fhir:given ( [ fhir:v "Francisco472" ] ) ;
     fhir:prefix ( [ fhir:v "Dr." ] )
  ] ) ; # 
  fhir:telecom ( [
     fhir:system [ fhir:v "email" ] ;
     fhir:value [ fhir:v "Francisco472.Gusikowski974@example.com" ] ;
     fhir:use [ fhir:v "work" ]
  ] ) ; # 
  fhir:gender [ fhir:v "female"] ; # 
  fhir:address ( [
     fhir:line ( [ fhir:v "8 SHIPWAY PL # C-8" ] ) ;
     fhir:city [ fhir:v "CHARLESTOWN" ] ;
     fhir:state [ fhir:v "MA" ] ;
     fhir:postalCode [ fhir:v "021294301" ] ;
     fhir:country [ fhir:v "US" ]
  ] ) . # 

<urn:uuid:dbc4a3f7-9c69-4435-3ce3-4e1988ab6b91> a fhir:Patient ;
  fhir:id [ fhir:v "dbc4a3f7-9c69-4435-3ce3-4e1988ab6b91"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">Generated by\n                       <a href=\"https://github.com/synthetichealth/synthea\">Synthea</a>.Version identifier: 2cc0a62\n .   Person seed: 3380232822616628959  Population seed: 1730906375349\n          \n                   </div>"^^rdf:XMLLiteral
  ] ; # 
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"^^xsd:anyURI ] ;
     fhir:value [
       a fhir:string ;
       fhir:v "Lolita963 Batz141"
     ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/patient-birthPlace"^^xsd:anyURI ] ;
     fhir:value [
       a fhir:Address ;
       fhir:city [ fhir:v "Orleans" ] ;
       fhir:state [ fhir:v "Massachusetts" ] ;
       fhir:country [ fhir:v "US" ]
     ]
  ] ) ; # 
  fhir:identifier ( [
     fhir:system [ fhir:v "https://github.com/synthetichealth/synthea"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "dbc4a3f7-9c69-4435-3ce3-4e1988ab6b91" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "MR" ] ;
         fhir:display [ fhir:v "Medical Record Number" ]
       ] ) ;
       fhir:text [ fhir:v "Medical Record Number" ]
     ] ;
     fhir:system [ fhir:v "http://hospital.smarthealthit.org"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "dbc4a3f7-9c69-4435-3ce3-4e1988ab6b91" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "DL" ] ;
         fhir:display [ fhir:v "Driver's license number" ]
       ] ) ;
       fhir:text [ fhir:v "Driver's license number" ]
     ] ;
     fhir:system [ fhir:v "urn:oid:2.16.840.1.113883.4.3.25"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "S99943196" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "PPN" ] ;
         fhir:display [ fhir:v "Passport Number" ]
       ] ) ;
       fhir:text [ fhir:v "Passport Number" ]
     ] ;
     fhir:system [ fhir:v "http://hl7.org/fhir/sid/passport-USA"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "X74265284X" ]
  ] ) ; # 
  fhir:name ( [
     fhir:use [ fhir:v "official" ] ;
     fhir:family [ fhir:v "Balistreri607" ] ;
     fhir:given ( [ fhir:v "Ada662" ] [ fhir:v "Sari509" ] ) ;
     fhir:prefix ( [ fhir:v "Mrs." ] )
  ] [
     fhir:use [ fhir:v "maiden" ] ;
     fhir:family [ fhir:v "D'Amore443" ] ;
     fhir:given ( [ fhir:v "Ada662" ] [ fhir:v "Sari509" ] ) ;
     fhir:prefix ( [ fhir:v "Mrs." ] )
  ] ) ; # 
  fhir:telecom ( [
     fhir:system [ fhir:v "phone" ] ;
     fhir:value [ fhir:v "555-428-1241" ] ;
     fhir:use [ fhir:v "home" ]
  ] ) ; # 
  fhir:gender [ fhir:v "female"] ; # 
  fhir:birthDate [ fhir:v "1959-08-01"^^xsd:date] ; # 
  fhir:address ( [
     fhir:extension ( [
       fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/geolocation"^^xsd:anyURI ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "latitude"^^xsd:anyURI ] ;
         fhir:value [
           a fhir:decimal ;
           fhir:v 42.38579955468066
         ]
       ] [
         fhir:url [ fhir:v "longitude"^^xsd:anyURI ] ;
         fhir:value [
           a fhir:decimal ;
           fhir:v -71.05781519988905
         ]
       ] )
     ] ) ;
     fhir:line ( [ fhir:v "315 Simonis Parade" ] ) ;
     fhir:city [ fhir:v "Somerville" ] ;
     fhir:state [ fhir:v "MA" ] ;
     fhir:postalCode [ fhir:v "02138" ] ;
     fhir:country [ fhir:v "US" ]
  ] ) ; # 
  fhir:maritalStatus [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "M" ] ;
       fhir:display [ fhir:v "Married" ]
     ] ) ;
     fhir:text [ fhir:v "Married" ]
  ] ; # 
  fhir:multipleBirth [
     a fhir:boolean ;
     fhir:v false
  ] ; # 
  fhir:communication ( [
     fhir:language [
       fhir:coding ( [
         fhir:system [ fhir:v "urn:ietf:bcp:47"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "en-US" ] ;
         fhir:display [ fhir:v "English (United States)" ]
       ] ) ;
       fhir:text [ fhir:v "English (United States)" ]
     ]
  ] ) . # 

<urn:uuid:eaeb9228-4420-5e9c-b217-4c1a98ff9fe0> a fhir:Encounter ;
  fhir:id [ fhir:v "eaeb9228-4420-5e9c-b217-4c1a98ff9fe0"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Encounter eaeb9228-4420-5e9c-b217-4c1a98ff9fe0</b></p><a name=\"eaeb9228-4420-5e9c-b217-4c1a98ff9fe0\"> </a><a name=\"hceaeb9228-4420-5e9c-b217-4c1a98ff9fe0\"> </a><a name=\"eaeb9228-4420-5e9c-b217-4c1a98ff9fe0-en-US\"> </a><p><b>identifier</b>: <code>https://github.com/synthetichealth/synthea</code>/eaeb9228-4420-5e9c-b217-4c1a98ff9fe0 (use: official, )</p><p><b>status</b>: completed</p><p><b>class</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/v3-ActCode AMB}\">ambulatory</span></p><p><b>type</b>: <span title=\"Codes:{http://snomed.info/sct 162673000}\">General examination of patient (procedure)</span></p><p><b>subject</b>: <a href=\"broken-link.html\">Mrs. Ada662 Sari509 Balistreri607</a></p><p><b>serviceProvider</b>: <a href=\"broken-link.html\">Good Health Clinic</a></p><h3>Participants</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Period</b></td><td><b>Actor</b></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/v3-ParticipationType PPRF}\">primary performer</span></td><td>2015-09-05T21:57:47Z --&gt; 2015-09-05T22:48:16Z</td><td><a href=\"broken-link.html\">Dr. Francisco472 Gusikowski974</a></td></tr></table></div>"^^rdf:XMLLiteral
  ] ; # 
  fhir:identifier ( [
     fhir:use [ fhir:v "official" ] ;
     fhir:system [ fhir:v "https://github.com/synthetichealth/synthea"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "eaeb9228-4420-5e9c-b217-4c1a98ff9fe0" ]
  ] ) ; # 
  fhir:status [ fhir:v "completed"] ; # 
  fhir:class ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v3-ActCode"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "AMB" ] ;
       fhir:display [ fhir:v "ambulatory" ]
     ] )
  ] ) ; # 
  fhir:type ( [
     fhir:coding ( [
       a sct:162673000 ;
       fhir:system [ fhir:v "http://snomed.info/sct"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "162673000" ] ;
       fhir:display [ fhir:v "General examination of patient (procedure)" ]
     ] ) ;
     fhir:text [ fhir:v "General examination of patient (procedure)" ]
  ] ) ; # 
  fhir:subject [
     fhir:reference [ fhir:v "urn:uuid:dbc4a3f7-9c69-4435-3ce3-4e1988ab6b91" ] ;
     fhir:display [ fhir:v "Mrs. Ada662 Sari509 Balistreri607" ]
  ] ; # 
  fhir:serviceProvider [
     fhir:reference [ fhir:v "Organization?identifier=urn:ietf:rfc:3986|urn:oid:2.16.840.1.113883.19.5" ] ;
     fhir:display [ fhir:v "Good Health Clinic" ]
  ] ; # 
  fhir:participant ( [
     fhir:type ( [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "PPRF" ] ;
         fhir:display [ fhir:v "primary performer" ]
       ] ) ;
       fhir:text [ fhir:v "primary performer" ]
     ] ) ;
     fhir:period [
       fhir:start [ fhir:v "2015-09-05T21:57:47+00:00"^^xsd:dateTime ] ;
       fhir:end [ fhir:v "2015-09-05T22:48:16+00:00"^^xsd:dateTime ]
     ] ;
     fhir:actor [
       fhir:link <http://hl7.org/fhir/Practitioner?identifier=http://hl7.org/fhir/sid/us-npi|9999947796> ;
       fhir:reference [ fhir:v "Practitioner?identifier=http://hl7.org/fhir/sid/us-npi|9999947796" ] ;
       fhir:display [ fhir:v "Dr. Francisco472 Gusikowski974" ]
     ]
  ] ) . # 

<http://hl7.org/fhir/Practitioner?identifier=http://hl7.org/fhir/sid/us-npi|9999947796> a fhir:Practitioner?identifier=http: .

<urn:uuid:f5030c53-c71d-9dd6-a85f-6647c09c34b4> a fhir:Observation ;
  fhir:id [ fhir:v "f5030c53-c71d-9dd6-a85f-6647c09c34b4"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Observation f5030c53-c71d-9dd6-a85f-6647c09c34b4</b></p><a name=\"f5030c53-c71d-9dd6-a85f-6647c09c34b4\"> </a><a name=\"hcf5030c53-c71d-9dd6-a85f-6647c09c34b4\"> </a><a name=\"f5030c53-c71d-9dd6-a85f-6647c09c34b4-en-US\"> </a><p><b>status</b>: final</p><p><b>category</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/observation-category laboratory}\">Laboratory</span></p><p><b>code</b>: <span title=\"Codes:{http://loinc.org 2093-3}\">Cholesterol [Mass/volume] in Serum or Plasma</span></p><p><b>subject</b>: <a href=\"broken-link.html\">urn:uuid:dbc4a3f7-9c69-4435-3ce3-4e1988ab6b91</a></p><p><b>encounter</b>: <a href=\"broken-link.html\">urn:uuid:eaeb9228-4420-5e9c-b217-4c1a98ff9fe0</a></p><p><b>effective</b>: 2015-09-05T21:57:47Z</p><p><b>issued</b>: 2015-09-05T21:57:47.809Z</p><p><b>value</b>: 165.49 mg/dL<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  codemg/dL = 'mg/dL')</span></p></div>"^^rdf:XMLLiteral
  ] ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:category ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/observation-category"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "laboratory" ] ;
       fhir:display [ fhir:v "Laboratory" ]
     ] )
  ] ) ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:2093-3 ;
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "2093-3" ] ;
       fhir:display [ fhir:v "Cholesterol [Mass/volume] in Serum or Plasma" ]
     ] ) ;
     fhir:text [ fhir:v "Cholesterol [Mass/volume] in Serum or Plasma" ]
  ] ; # 
  fhir:subject [
     fhir:reference [ fhir:v "urn:uuid:dbc4a3f7-9c69-4435-3ce3-4e1988ab6b91" ]
  ] ; # 
  fhir:encounter [
     fhir:reference [ fhir:v "urn:uuid:eaeb9228-4420-5e9c-b217-4c1a98ff9fe0" ]
  ] ; # 
  fhir:effective [
     a fhir:dateTime ;
     fhir:v "2015-09-05T21:57:47+00:00"^^xsd:dateTime
  ] ; # 
  fhir:issued [ fhir:v "2015-09-05T21:57:47.809+00:00"^^xsd:dateTime] ; # 
  fhir:value [
     a fhir:Quantity ;
     fhir:value [ fhir:v 165.49 ] ;
     fhir:unit [ fhir:v "mg/dL" ] ;
     fhir:system [ fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ] ;
     fhir:code [ fhir:v "mg/dL" ]
  ] . # 

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


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.