Release 4B R5 Final QA

This page is part of the FHIR Specification (v4.3.0: R4B (v5.0.0-draft-final: Final QA Preview for R5 - STU see ballot notes ). 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

Xds-example.ttl

Example DocumentReference/xds (Turtle)

Structured Documents Orders and Observations Work Group Maturity Level : N/A Standards Status : Informative Compartments : Device , Encounter , Patient , Practitioner , RelatedPerson

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

XDS example

@prefix fhir: <http://hl7.org/fhir/> .
@prefix loinc: <http://loinc.org/rdf#> .

@prefix loinc: <https://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 -------------------------------------------------------------------

<http://hl7.org/fhir/Bundle/xds> a fhir:Bundle;
  fhir:nodeRole fhir:treeRoot;
  fhir:Resource.id [ fhir:value "xds"];
  fhir:Resource.meta [
     fhir:Meta.lastUpdated [ fhir:value "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ];
  fhir:Bundle.type [ fhir:value "transaction"];
  fhir:Bundle.entry [
     fhir:index 0;
     fhir:Bundle.entry.fullUrl [ fhir:value "urn:uuid:3fdc72f4-a11d-4a9d-9260-a9f745779e1d" ];
     fhir:Bundle.entry.resource <urn:uuid:3fdc72f4-a11d-4a9d-9260-a9f745779e1d>;
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "POST" ];
       fhir:Bundle.entry.request.url [ fhir:value "DocumentReference" ]

[a fhir:Bundle ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "xds"] ; # 
  fhir:meta [
     fhir:lastUpdated [ fhir:v "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ] ; # 
  fhir:type [ fhir:v "transaction"] ; # 
  fhir:entry ( [
     fhir:fullUrl [ fhir:v "urn:uuid:3fdc72f4-a11d-4a9d-9260-a9f745779e1d"^^xsd:anyURI ] ;
     fhir:resource ( <urn:uuid:3fdc72f4-a11d-4a9d-9260-a9f745779e1d> ) ;
     fhir:request [
       fhir:method [ fhir:v "POST" ] ;
       fhir:url [ fhir:v "DocumentReference"^^xsd:anyURI ]

     ]
  ], [
     fhir:index 1;
     fhir:Bundle.entry.fullUrl [ fhir:value "http://localhost:9556/svc/fhir/Patient/a2" ];
     fhir:Bundle.entry.resource <http://localhost:9556/svc/fhir/Patient/a2>;
     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 "Patient?identifier=http://acme.org/xds/patients!89765a87b" ]

  ] [
     fhir:fullUrl [ fhir:v "http://localhost:9556/svc/fhir/Patient/a2"^^xsd:anyURI ] ;
     fhir:resource ( <http://localhost:9556/svc/fhir/Patient/a2> ) ; #    if the server can find a matching resource, use that, else create a new \n      resource with these details   
     fhir:request [
       fhir:method [ fhir:v "POST" ] ;
       fhir:url [ fhir:v "Patient"^^xsd:anyURI ] ;
       fhir:ifNoneExist [ fhir:v "Patient?identifier=http://acme.org/xds/patients!89765a87b" ]

     ]
  ], [
     fhir:index 2;
     fhir:Bundle.entry.fullUrl [ fhir:value "http://localhost:9556/svc/fhir/Practitioner/a3" ];
     fhir:Bundle.entry.resource <http://localhost:9556/svc/fhir/Practitioner/a3>;
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "POST" ];
       fhir:Bundle.entry.request.url [ fhir:value "Practitioner" ]

  ] [
     fhir:fullUrl [ fhir:v "http://localhost:9556/svc/fhir/Practitioner/a3"^^xsd:anyURI ] ;
     fhir:resource ( <http://localhost:9556/svc/fhir/Practitioner/a3> ) ;
     fhir:request [
       fhir:method [ fhir:v "POST" ] ;
       fhir:url [ fhir:v "Practitioner"^^xsd:anyURI ]

     ]
  ], [
     fhir:index 3;
     fhir:Bundle.entry.fullUrl [ fhir:value "http://localhost:9556/svc/fhir/Practitioner/a4" ];
     fhir:Bundle.entry.resource <http://localhost:9556/svc/fhir/Practitioner/a4>;
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "POST" ];
       fhir:Bundle.entry.request.url [ fhir:value "Practitioner" ]

  ] [
     fhir:fullUrl [ fhir:v "http://localhost:9556/svc/fhir/Practitioner/a4"^^xsd:anyURI ] ;
     fhir:resource ( <http://localhost:9556/svc/fhir/Practitioner/a4> ) ;
     fhir:request [
       fhir:method [ fhir:v "POST" ] ;
       fhir:url [ fhir:v "Practitioner"^^xsd:anyURI ]

     ]
  ], [
     fhir:index 4;
     fhir:Bundle.entry.fullUrl [ fhir:value "http://localhost:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32" ];
     fhir:Bundle.entry.resource <http://localhost:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32>;
     fhir:Bundle.entry.request [
       fhir:Bundle.entry.request.method [ fhir:value "POST" ];
       fhir:Bundle.entry.request.url [ fhir:value "Binary" ]

  ] [
     fhir:fullUrl [ fhir:v "http://localhost:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32"^^xsd:anyURI ] ;
     fhir:resource ( <http://localhost:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32> ) ;
     fhir:request [
       fhir:method [ fhir:v "POST" ] ;
       fhir:url [ fhir:v "Binary"^^xsd:anyURI ]

     ]
  ] .

  ] )] . # 


<urn:uuid:3fdc72f4-a11d-4a9d-9260-a9f745779e1d> a fhir:DocumentReference;
  fhir:Resource.meta [
     fhir:Meta.lastUpdated [ fhir:value "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\n						<a href=\"http://localhost:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32\">Document: urn:oid:129.6.58.92.88336</a>undefined, created 24/12/2005\n					</div>"
  ];
  fhir:DocumentReference.masterIdentifier [
     fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ];
     fhir:Identifier.value [ fhir:value "urn:oid:129.6.58.92.88336" ]
  ];
  fhir:DocumentReference.status [ fhir:value "current"];
  fhir:DocumentReference.type [
     fhir:CodeableConcept.coding [
       fhir:index 0;
       fhir:Coding.system [ fhir:value "http://ihe.net/connectathon/classCodes" ];
       fhir:Coding.code [ fhir:value "History and Physical" ];
       fhir:Coding.display [ fhir:value "History and Physical" ]
     ]
  ];
  fhir:DocumentReference.category [
     fhir:index 0;
     fhir:CodeableConcept.coding [
       fhir:index 0;
       a loinc:47039-3;
       fhir:Coding.system [ fhir:value "http://loinc.org" ];
       fhir:Coding.code [ fhir:value "47039-3" ];
       fhir:Coding.display [ fhir:value "Inpatient Admission history and physical note" ]
     ]
  ];
  fhir:DocumentReference.subject [
     fhir:link <http://hl7.org/fhir/Patient/a2>;
     fhir:Reference.reference [ fhir:value "Patient/a2" ]
  ];
  fhir:DocumentReference.date [ fhir:value "2013-07-01T23:11:33+10:00"^^xsd:dateTime];
  fhir:DocumentReference.author [
     fhir:index 0;
     fhir:link <http://hl7.org/fhir/Practitioner/a3>;
     fhir:Reference.reference [ fhir:value "Practitioner/a3" ]
  ], [
     fhir:index 1;
     fhir:link <http://hl7.org/fhir/Practitioner/a4>;
     fhir:Reference.reference [ fhir:value "Practitioner/a4" ]
  ];
  fhir:DocumentReference.description [ fhir:value "Physical"];
  fhir:DocumentReference.securityLabel [
     fhir:index 0;
     fhir:CodeableConcept.coding [
       fhir:index 0;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-Confidentiality" ];
       fhir:Coding.code [ fhir:value "N" ];
       fhir:Coding.display [ fhir:value "normal" ]
     ]
  ];
  fhir:DocumentReference.content [
     fhir:index 0;
     fhir:DocumentReference.content.attachment [
       fhir:Attachment.contentType [ fhir:value "text/plain" ];
       fhir:Attachment.language [ fhir:value "en-US" ];
       fhir:Attachment.url [ fhir:value "http://localhost:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32" ];
       fhir:Attachment.title [ fhir:value "Physical" ];
       fhir:Attachment.creation [ fhir:value "2005-12-24"^^xsd:date ]
     ];
     fhir:DocumentReference.content.format [
       fhir:Coding.system [ fhir:value "urn:oid:1.3.6.1.4.1.19376.1.2.3" ];
       fhir:Coding.code [ fhir:value "urn:ihe:pcc:handp:2008" ]
     ]
  ];
  fhir:DocumentReference.context [
     fhir:DocumentReference.context.period [
       fhir:Period.start [ fhir:value "2004-12-23T08:00:00+10:00"^^xsd:dateTime ];
       fhir:Period.end [ fhir:value "2004-12-23T08:01:00+10:00"^^xsd:dateTime ]
     ];
     fhir:DocumentReference.context.practiceSetting [
       fhir:CodeableConcept.coding [
         fhir:index 0;
         fhir:Coding.system [ fhir:value "http://ihe.net/connectathon/practiceSettingCodes" ];
         fhir:Coding.code [ fhir:value "General Medicine" ];
         fhir:Coding.display [ fhir:value "General Medicine" ]

<urn:uuid:3fdc72f4-a11d-4a9d-9260-a9f745779e1d> a fhir:DocumentReference ;
  fhir:meta [
     fhir:lastUpdated [ fhir:v "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\n						<a href=\"http://localhost:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32\">Document: urn:oid:129.6.58.92.88336</a>undefined, created 24/12/2005\n					</div>"
  ] ; # 
  fhir:identifier ( [
     fhir:type [
       fhir:text [ fhir:v "uniqueId" ]
     ] ;
     fhir:system [ fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "urn:oid:129.6.58.92.88336" ]
  ] ) ; # 
  fhir:status [ fhir:v "current"] ; # 
  fhir:type [
     fhir:coding ( [
       fhir:system [ fhir:v "http://ihe.net/connectathon/classCodes"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "History and Physical" ] ;
       fhir:display [ fhir:v "History and Physical" ]
     ] )
  ] ; # 
  fhir:category ( [
     fhir:coding ( [
       a loinc:47039-3 ;
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "47039-3" ] ;
       fhir:display [ fhir:v "Inpatient Admission history and physical note" ]
     ] )
  ] ) ; # 
  fhir:subject [
     fhir:reference [ fhir:v "Patient/a2" ]
  ] ; # 
  fhir:practiceSetting [
     fhir:coding ( [
       fhir:system [ fhir:v "http://ihe.net/connectathon/practiceSettingCodes"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "General Medicine" ] ;
       fhir:display [ fhir:v "General Medicine" ]
     ] )
  ] ; # 
  fhir:period [
     fhir:start [ fhir:v "2004-12-23T08:00:00+10:00"^^xsd:dateTime ] ;
     fhir:end [ fhir:v "2004-12-23T08:01:00+10:00"^^xsd:dateTime ]
  ] ; # 
  fhir:date [ fhir:v "2013-07-01T23:11:33+10:00"^^xsd:dateTime] ; # 
  fhir:author ( [
     fhir:reference [ fhir:v "Practitioner/a3" ]
  ] [
     fhir:reference [ fhir:v "Practitioner/a4" ]
  ] ) ; # 
  fhir:description [ fhir:v "Physical"] ; # 
  fhir:securityLabel ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v3-Confidentiality"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "N" ] ;
       fhir:display [ fhir:v "normal" ]
     ] )
  ] ) ; # 
  fhir:content ( [
     fhir:attachment [
       fhir:contentType [ fhir:v "text/plain" ] ;
       fhir:language [ fhir:v "en-US" ] ;
       fhir:url [ fhir:v "http://localhost:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32"^^xsd:anyURI ] ;
       fhir:title [ fhir:v "Physical" ] ;
       fhir:creation [ fhir:v "2005-12-24"^^xsd:date ]
     ] ;
     fhir:profile ( [
       fhir:value [
         a fhir:Coding ;
         fhir:system [ fhir:v "urn:oid:1.3.6.1.4.1.19376.1.2.3"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "urn:ihe:pcc:handp:2008" ]

       ]
     ]
  ] .

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

<http://hl7.org/fhir/Practitioner/a3> a fhir:Practitioner .

<http://hl7.org/fhir/Practitioner/a4> a fhir:Practitioner .

<http://localhost:9556/svc/fhir/Patient/a2> a fhir:Patient;
  fhir:Resource.id [ fhir:value "a2"];
  fhir:Resource.meta [
     fhir:Meta.lastUpdated [ fhir:value "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">Person DOE, John, M, dob: 27/05/1956</div>"
  ];
  fhir:Patient.identifier [
     fhir:index 0;
     fhir:Identifier.use [ fhir:value "usual" ];
     fhir:Identifier.value [ fhir:value "MRN" ]
  ];
  fhir:Patient.name [
     fhir:index 0;
     fhir:HumanName.use [ fhir:value "usual" ];
     fhir:HumanName.text [ fhir:value "DOE, John" ];
     fhir:HumanName.family [ fhir:value "Doe" ];
     fhir:HumanName.given [
       fhir:value "John";
       fhir:index 0
     ]
  ];
  fhir:Patient.birthDate [ fhir:value "1956-05-27"^^xsd:date] .

<http://localhost:9556/svc/fhir/Practitioner/a3> a fhir:Practitioner;
  fhir:Resource.id [ fhir:value "a3"];
  fhir:Resource.meta [
     fhir:Meta.lastUpdated [ fhir:value "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">Author Gerald Smitty @ Cleveland Clinic</div>"
  ];
  fhir:Practitioner.name [
     fhir:index 0;
     fhir:HumanName.use [ fhir:value "usual" ];
     fhir:HumanName.family [ fhir:value "Smitty" ];
     fhir:HumanName.given [
       fhir:value "Gerald";
       fhir:index 0
     ]
  ] .

     ] )
  ] ) . # 


<http://localhost:9556/svc/fhir/Practitioner/a4> a fhir:Practitioner;
  fhir:Resource.id [ fhir:value "a4"];
  fhir:Resource.meta [
     fhir:Meta.lastUpdated [ fhir:value "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">Author Person @ Cleveland Clinic</div>"
  ];
  fhir:Practitioner.name [
     fhir:index 0;
     fhir:HumanName.use [ fhir:value "usual" ];
     fhir:HumanName.family [ fhir:value "Dopplemeyer" ];
     fhir:HumanName.given [
       fhir:value "Sherry";
       fhir:index 0
     ]
  ] .

<http://localhost:9556/svc/fhir/Patient/a2> a fhir:Patient ;
  fhir:id [ fhir:v "a2"] ; # 
  fhir:meta [
     fhir:lastUpdated [ fhir:v "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">Person DOE, John, M, dob: 27/05/1956</div>"
  ] ; # 
  fhir:identifier ( [
     fhir:use [ fhir:v "usual" ] ;
     fhir:value [ fhir:v "MRN" ]
  ] ) ; # 
  fhir:name ( [
     fhir:use [ fhir:v "usual" ] ;
     fhir:text [ fhir:v "DOE, John" ] ;
     fhir:family [ fhir:v "Doe" ] ;
     fhir:given ( [ fhir:v "John" ] )
  ] ) ; # 
  fhir:birthDate [ fhir:v "1956-05-27"^^xsd:date] . # 


<http://localhost:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32> a fhir:Binary;
  fhir:Resource.id [ fhir:value "1e404af3-077f-4bee-b7a6-a9be97e1ce32"];
  fhir:Resource.meta [
     fhir:Meta.lastUpdated [ fhir:value "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ];
  fhir:Binary.contentType [ fhir:value "text/plain"];
  fhir:Binary.data [ fhir:value "YXNkYXNkYXNkYXNkYXNk"^^xsd:base64Binary] .

<http://localhost:9556/svc/fhir/Practitioner/a3> a fhir:Practitioner ;
  fhir:id [ fhir:v "a3"] ; # 
  fhir:meta [
     fhir:lastUpdated [ fhir:v "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">Author Gerald Smitty @ Cleveland Clinic</div>"
  ] ; # 
  fhir:name ( [
     fhir:use [ fhir:v "usual" ] ;
     fhir:family [ fhir:v "Smitty" ] ;
     fhir:given ( [ fhir:v "Gerald" ] )
  ] ) . # 


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

<http://localhost:9556/svc/fhir/Practitioner/a4> a fhir:Practitioner ;
  fhir:id [ fhir:v "a4"] ; # 
  fhir:meta [
     fhir:lastUpdated [ fhir:v "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ] ; #    cid:51b578b4-3ccb-4e67-b0dc-ef519d82ef2d@healthintersections.com.au   
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">Author Person @ Cleveland Clinic</div>"
  ] ; # 
  fhir:name ( [
     fhir:use [ fhir:v "usual" ] ;
     fhir:family [ fhir:v "Dopplemeyer" ] ;
     fhir:given ( [ fhir:v "Sherry" ] )
  ] ) . # 


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

<http://localhost:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32> a fhir:Binary ;
  fhir:id [ fhir:v "1e404af3-077f-4bee-b7a6-a9be97e1ce32"] ; # 
  fhir:meta [
     fhir:lastUpdated [ fhir:v "2013-07-01T13:11:33Z"^^xsd:dateTime ]
  ] ; # 
  fhir:contentType [ fhir:v "text/plain"] ; # 
  fhir:data [ fhir:v "YXNkYXNkYXNkYXNkYXNk"^^xsd:base64Binary] . # 


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


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.