Response for the example transaction
@prefix fhir: <http://hl7.org/fhir/> .
@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-response"] ; #
fhir:meta [
fhir:lastUpdated [ fhir:v "2014-08-18T01:43:33Z"^^xsd:dateTime ]
] ; # this example bundle is a transaction response , when the transaction response was constructed
fhir:type [ fhir:v "transaction-response"] ; #
fhir:entry ( [
fhir:fullUrl [ fhir:v "http://example.org/fhir/Patient/12423"^^xsd:anyURI ] ;
fhir:resource ( <http://example.org/fhir/Patient/12423> ) ; # response for the simple create operation , whether to return the result resource depends on client preference
fhir:response [
fhir:status [ fhir:v "201 Created" ] ; # important responses from the server
fhir:location [ fhir:v "Patient/12423/_history/1"^^xsd:anyURI ] ;
fhir:etag [ fhir:v "W/\"1\"" ] ;
fhir:lastModified [ fhir:v "2014-08-18T01:43:33Z"^^xsd:dateTime ] ;
fhir:outcome ( [
a fhir:OperationOutcome ;
fhir:issue ( [
fhir:severity [ fhir:v "warning" ] ;
fhir:code [ fhir:v "not-found" ] ;
fhir:details [
fhir:text [ fhir:v "The Managing organization was not known and was deleted" ]
] ;
fhir:expression ( [ fhir:v "Patient.managingOrganization" ] )
] )
] )
] # now, details about the action to take with the resource
] [
fhir:response [
fhir:status [ fhir:v "200 OK" ] # no action taken
] # response to the conditional create operation , in this case, there was a match to the If-None-Exist header
] [
fhir:response [
fhir:status [ fhir:v "200 OK" ] ;
fhir:location [ fhir:v "Patient/123/_history/4"^^xsd:anyURI ] ;
fhir:etag [ fhir:v "W/\"4\"" ]
] # response to a simple update operation , no return resource for this example, though in a \n real transaction, all entries would have a resource or all would not \n
] [
fhir:response [
fhir:status [ fhir:v "201 Created" ] ; # created a new resource for this one
fhir:location [ fhir:v "Patient/12424/_history/1"^^xsd:anyURI ] ;
fhir:etag [ fhir:v "W/\"1\"" ]
] # response to the conditional update operation
] [
fhir:response [
fhir:status [ fhir:v "200 ok" ] ; # created a new resource for this one
fhir:location [ fhir:v "Patient/123a/_history/3"^^xsd:anyURI ] ;
fhir:etag [ fhir:v "W/\"3\"" ]
] # response to the 2nd conditional update operation
] [
fhir:response [
fhir:status [ fhir:v "202 Accepted" ] # successful deletion
] # response to the simple delete operation
] [
fhir:response [
fhir:status [ fhir:v "DELETE" ] # delete matching resource - but you can't find out what was deleted - an inherent limitation in a condition delete
] # response to the conditional delete operation
] [
fhir:fullUrl [ fhir:v "urn:uuid:7f9724ed-ef8d-4434-aacb-41869db83233"^^xsd:anyURI ] ;
fhir:resource ( <urn:uuid:7f9724ed-ef8d-4434-aacb-41869db83233> ) ; # operation response , etc.
fhir:response [
fhir:status [ fhir:v "200 ok" ] # POST to [base]\/ValueSet\/$lookup - invoking a lookup operation (see Terminology Service)
]
] [
fhir:fullUrl [ fhir:v "urn:uuid:e7bcef8e-5ef9-4d2b-87d5-b42b1eec9125"^^xsd:anyURI ] ;
fhir:resource ( <urn:uuid:e7bcef8e-5ef9-4d2b-87d5-b42b1eec9125> ) ; # response to search , etc.
fhir:response [
fhir:status [ fhir:v "200 OK" ]
]
] [
fhir:response [
fhir:status [ fhir:v "304 Not Modified" ]
] # response to conditional read - no changes
] )] . #
# one entry for each entry in the transaction, in order, with a
# response
#
<http://example.org/fhir/Patient/12423> a fhir:Patient ;
fhir:id [ fhir:v "12423"] ; #
fhir:meta [
fhir:versionId [ fhir:v "1" ] ;
fhir:lastUpdated [ fhir:v "2014-08-18T01:43:31Z"^^xsd:dateTime ]
] ; #
fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">Some narrative</div>"
] ; #
fhir:active [ fhir:v "true"^^xsd:boolean] ; #
fhir:name ( [
fhir:use [ fhir:v "official" ] ;
fhir:family [ fhir:v "Chalmers" ] ;
fhir:given ( [ fhir:v "Peter" ] [ fhir:v "James" ] )
] ) ; #
fhir:gender [ fhir:v "male"] ; #
fhir:birthDate [ fhir:v "1974-12-25"^^xsd:date] . #
<urn:uuid:7f9724ed-ef8d-4434-aacb-41869db83233> a fhir:Parameters ;
fhir:parameter ( [
fhir:name [ fhir:v "name" ] ;
fhir:value [ fhir:v "LOINC" ]
] ) . #
<urn:uuid:e7bcef8e-5ef9-4d2b-87d5-b42b1eec9125> a fhir:Bundle ;
fhir:id [ fhir:v "fb6ed6cb-324e-4588-87cd-0c92c68986ca"] ; #
fhir:type [ fhir:v "searchset"] . #
# -------------------------------------------------------------------------------------
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.