STU 3 Candidate

This page is part of the FHIR Specification (v1.4.0: STU 3 Ballot 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 R3

Bundle-transaction.ttl

Raw Turtle, JSON-LD

An example transaction

@prefix fhir: <http://hl7.org/fhir/> .
@prefix loinc: <http://loinc.org/owl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xs: <http://www.w3.org/2001/XMLSchema#> .

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

<http://hl7.org/fhir//Bundle/bundle-transaction> a fhir:Bundle;
  fhir:nodeRole fhir:treeRoot;
  fhir:Resource.id [ fhir:value "bundle-transaction"];
  fhir:Resource.meta [
     fhir:Meta.lastUpdated [ fhir:value "2014-08-18T01:43:30Z"^^xs:dateTime ]
  ];
  fhir:Bundle.type [ fhir:value "transaction"];
  fhir:Bundle.entry [
     fhir:index 0;
     fhir:Bundle.entry.fullUrl [ fhir:value "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0a" ];
     fhir:Bundle.entry.resource [
       fhir:Patient [
         fhir:index 0;
         fhir:DomainResource.text [
           fhir:Narrative.status [ fhir:value "generated" ]         ];
         fhir:Patient.active [ fhir:value "true"^^xs:boolean ];
         fhir:Patient.name [
           fhir:index 0;
           fhir:HumanName.use [ fhir:value "official" ];
           fhir:HumanName.family [
             fhir:value "Chalmers";
             fhir:index 0           ];
           fhir:HumanName.given [
             fhir:value "Peter";
             fhir:index 0           ];
           fhir:HumanName.given [
             fhir:value "James";
             fhir:index 1           ]         ];
         fhir:Patient.gender [ fhir:value "male" ];
         fhir:Patient.birthDate [ fhir:value "1974-12-25"^^xs:date ]       ]     ];
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "POST" ];
       fhir:Bundle.entry.request.url [ fhir:value "Patient" ]     ]
  ];
  fhir:Bundle.entry [
     fhir:index 1;
     fhir:Bundle.entry.fullUrl [ fhir:value "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059" ];
     fhir:Bundle.entry.resource [
       fhir:Patient [
         fhir:index 0;
         fhir:DomainResource.text [
           fhir:Narrative.status [ fhir:value "generated" ]         ];
         fhir:Patient.active [ fhir:value "true"^^xs:boolean ];
         fhir:Patient.name [
           fhir:index 0;
           fhir:HumanName.use [ fhir:value "official" ];
           fhir:HumanName.family [
             fhir:value "Chalmers";
             fhir:index 0           ];
           fhir:HumanName.given [
             fhir:value "Peter";
             fhir:index 0           ];
           fhir:HumanName.given [
             fhir:value "James";
             fhir:index 1           ]         ];
         fhir:Patient.gender [ fhir:value "male" ];
         fhir:Patient.birthDate [ fhir:value "1974-12-25"^^xs:date ]       ]     ];
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "POST" ];
       fhir:Bundle.entry.request.url [ fhir:value "Patient" ];
       fhir:Bundle.entry.request.ifNoneExist [ fhir:value "identifier=234234" ]     ]
  ];
  fhir:Bundle.entry [
     fhir:index 2;
     fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Patient/123" ];
     fhir:Bundle.entry.resource [
       fhir:Patient [
         fhir:index 0;
         fhir:Resource.id [ fhir:value "123" ];
         fhir:DomainResource.text [
           fhir:Narrative.status [ fhir:value "generated" ]         ];
         fhir:Patient.active [ fhir:value "true"^^xs:boolean ];
         fhir:Patient.name [
           fhir:index 0;
           fhir:HumanName.use [ fhir:value "official" ];
           fhir:HumanName.family [
             fhir:value "Chalmers";
             fhir:index 0           ];
           fhir:HumanName.given [
             fhir:value "Peter";
             fhir:index 0           ];
           fhir:HumanName.given [
             fhir:value "James";
             fhir:index 1           ]         ];
         fhir:Patient.gender [ fhir:value "male" ];
         fhir:Patient.birthDate [ fhir:value "1974-12-25"^^xs:date ]       ]     ];
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "PUT" ];
       fhir:Bundle.entry.request.url [ fhir:value "Patient/123" ]     ]
  ];
  fhir:Bundle.entry [
     fhir:index 3;
     fhir:Bundle.entry.fullUrl [ fhir:value "urn:uuid:74891afc-ed52-42a2-bcd7-f13d9b60f096" ];
     fhir:Bundle.entry.resource [
       fhir:Patient [
         fhir:index 0;
         fhir:DomainResource.text [
           fhir:Narrative.status [ fhir:value "generated" ]         ];
         fhir:Patient.active [ fhir:value "true"^^xs:boolean ];
         fhir:Patient.name [
           fhir:index 0;
           fhir:HumanName.use [ fhir:value "official" ];
           fhir:HumanName.family [
             fhir:value "Chalmers";
             fhir:index 0           ];
           fhir:HumanName.given [
             fhir:value "Peter";
             fhir:index 0           ];
           fhir:HumanName.given [
             fhir:value "James";
             fhir:index 1           ]         ];
         fhir:Patient.gender [ fhir:value "male" ];
         fhir:Patient.birthDate [ fhir:value "1974-12-25"^^xs:date ]       ]     ];
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "PUT" ];
       fhir:Bundle.entry.request.url [ fhir:value "Patient?identifier=234234" ]     ]
  ];
  fhir:Bundle.entry [
     fhir:index 4;
     fhir:Bundle.entry.fullUrl [ fhir:value "http://example.org/fhir/Patient/123a" ];
     fhir:Bundle.entry.resource [
       fhir:Patient [
         fhir:index 0;
         fhir:Resource.id [ fhir:value "123a" ];
         fhir:DomainResource.text [
           fhir:Narrative.status [ fhir:value "generated" ]         ];
         fhir:Patient.active [ fhir:value "true"^^xs:boolean ];
         fhir:Patient.name [
           fhir:index 0;
           fhir:HumanName.use [ fhir:value "official" ];
           fhir:HumanName.family [
             fhir:value "Chalmers";
             fhir:index 0           ];
           fhir:HumanName.given [
             fhir:value "Peter";
             fhir:index 0           ];
           fhir:HumanName.given [
             fhir:value "James";
             fhir:index 1           ]         ];
         fhir:Patient.gender [ fhir:value "male" ];
         fhir:Patient.birthDate [ fhir:value "1974-12-25"^^xs:date ]       ]     ];
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "PUT" ];
       fhir:Bundle.entry.request.url [ fhir:value "Patient/123a" ];
       fhir:Bundle.entry.request.ifMatch [ fhir:value "W/\"2\"" ]     ]
  ];
  fhir:Bundle.entry [
     fhir:index 5;
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "DELETE" ];
       fhir:Bundle.entry.request.url [ fhir:value "Patient/234" ]     ]
  ];
  fhir:Bundle.entry [
     fhir:index 6;
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "DELETE" ];
       fhir:Bundle.entry.request.url [ fhir:value "Patient?identifier=123456" ]     ]
  ];
  fhir:Bundle.entry [
     fhir:index 7;
     fhir:Bundle.entry.fullUrl [ fhir:value "urn:uuid:79378cb8-8f58-48e8-a5e8-60ac2755b674" ];
     fhir:Bundle.entry.resource [
       fhir:Parameters [
         fhir:index 0;
         fhir:Parameters.parameter [
           fhir:index 0;
           fhir:Parameters.parameter.name [ fhir:value "coding" ];
           fhir:Parameters.parameter.valueCoding [
             a loinc:1963-8;
             fhir:Coding.system [ fhir:value "http://loinc.org" ];
             fhir:Coding.code [ fhir:value "1963-8" ]           ]         ]       ]     ];
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "POST" ];
       fhir:Bundle.entry.request.url [ fhir:value "ValueSet/$lookup" ]     ]
  ];
  fhir:Bundle.entry [
     fhir:index 8;
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "GET" ];
       fhir:Bundle.entry.request.url [ fhir:value "Patient?name=peter" ]     ]
  ];
  fhir:Bundle.entry [
     fhir:index 9;
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "GET" ];
       fhir:Bundle.entry.request.url [ fhir:value "Patient/12334" ];
       fhir:Bundle.entry.request.ifNoneMatch [ fhir:value "W/\"4\"" ];
       fhir:Bundle.entry.request.ifModifiedSince [ fhir:value "2015-08-31T08:14:33+10:00"^^xs:dateTime ]     ]
  ].

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


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.