2nd DSTU Draft For Comment

This page is part of the FHIR Specification (v0.4.0: DSTU 2 Draft). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

1.16.1 Examples of Tags, Bundles, Compartments and Binary Resources

1.16.1.1 Tags

An example of a tag in an HTTP header:

HTTP/1.1 200 OK
Content-Type: text/xml
Access-Control-Allow-Origin: *
Last-Modified: Thu, 19 Nov 2013 07:07:32 +1100
Content-Location: http://[server]/[path]/Patient/234124/_history/24
ETag: 24
Category: http://hl7.org/fhir/v3/ActCode#CEL; scheme="http://hl7.org/fhir/tag/security"; label="Celebrity"

<Patient xmlns="http://hl7.org/fhir">
...  [snip] ...
</Patient>

Rather than repeating the Category header (this has unpredictable results on different servers), tags are repeated like this:

HTTP/1.1 200 OK
Content-Type: text/xml
Access-Control-Allow-Origin: *
Last-Modified: Thu, 19 Nov 2013 07:07:32 +1100
Content-Location: http://[server]/[path]/Patient/234124/_history/24
ETag: 24
Category: http://hl7.org/fhir/v3/ActCode#CEL; scheme="http://hl7
   .org/fhir/tag/security"; label="Celebrity", http://acme.
   org/fhir/tags/waiting; scheme="http://hl7
   .org/fhir/tag"; label="Waiting for processing"

<Patient xmlns="http://hl7.org/fhir">
...  [snip] ...
</Patient>

Note: this example introduces line breaks in the Category header for formatting purposes.

Several API operations take a list of tags. Here is an example:

<taglist xmlns="http://hl7.org/fhir"> 
  <category term="http://hl7.org/fhir/v3/ActCode#CEL" label="Celebrity"
     scheme="http://hl7.org/fhir/tag/security"> 
  <category term="http://acme.org/fhir/tags/waiting" label="Waiting for processing"
     scheme="http://hl7.org/fhir/tag"> 
</taglist>
{
  "resourceType" : "TagList",
  "category" : [{
      "term" : "http://hl7.org/fhir/v3/ActCode#CEL",
      "label" : "Celebrity",
      "scheme" : "http://hl7.org/fhir/tag/security"
    },
    {
      "term" : "http://acme.org/fhir/tags/waiting",
      "label" : "Waiting for processing",
      "scheme" : "http://hl7.org/fhir/tag"
    }]
}


1.16.1.2 Bundles

There are examples of bundles throughout the specification:

  • General Collections of Resources:
  • Example Documents:
  • Example Messages:
  • Example Transactions:
  • Conformance Resource Collections

1.16.1.3 Binary Resources

Examples of Binary resources can be found in several places: