Release 4


FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Not linked to any defined compartments

Raw XML (canonical form + also see XML Format Specification)

An example of a search response (id = "bundle-example")

<?xml version="1.0" encoding="UTF-8"?>

<Bundle xmlns="">
  <id value="bundle-example"/> 
  <!--    this example bundle is a search set    -->
    <lastUpdated value="2014-08-18T01:43:30Z"/> 
    <!--    when the search was executed    --> 
  <type value="searchset"/>   

  <!--    the total number of matches. This is a stupid example - there's a grand total of 3
   matches, and 
    we're only going to return the first 1, with a next link, in order to demonstrate
   what a page link
    looks like    -->
  <total value="3"/> 
  <!--    all search sets include the self link - the server's statement of what it thought it
    searching on. The client can use this to cross-check whether the server executed what
    asked the server to, if it cares    -->
    <relation value="self"/> 
    <url value=";_include=MedicationRequest.medication&amp
  <!--    now, the link to the next set of results. The actual URL is entirely at the 
  discretion of the server, and is opaque to the client. Many servers will insert 
  some kind of search instance identifier 
  Note that a big set of results will include prev, first, last links as well as next
    <relation value="next"/> 
    <url value=";searchId=ff15fd40-ff71-4b48-b366-09c706be
  <!--    now, the actual entries    -->
    <fullUrl value=""/> 
    <!--    the matching resource    -->
        <id value="3123"/> 
        <!--    snip    -->
        <text> <status value="generated"/> <div xmlns=""><p> <b> Generated Narrative with Details</b> </p> <p> <b> id</b> : 3123</p> <p> <b> status</b> : unknown</p> <p> <b> intent</b> : order</p> <p> <b> medication</b> : <a> Medication/example</a> </p> <p> <b> subject</b> : <a> Patient/347</a> </p> </div> </text> <status value="unknown"/> 
        <intent value="order"/> 
          <reference value="Medication/example"/> 
          <reference value="Patient/347"/> 
        <!--    snip    -->
    <!--    and now optional search information    -->
      <!--    this resource included as a match to the search criteria.
         Servers are not required to populate this, but should, because
         there are a few cases where it might be ambiguous whether a 
         resource is added because it's a match or an include            -->   
      <mode value="match"/>  
      <!--    score. For matches where the criteria are not determinate,
        e.g. text search on narrative, the server can include a score to indicate
        how well the resource matches the conditions. Since this search is by patient
        identifier, there's nothing fuzzy about it, but for example purposes:    -->
      <score value="1"/> 
    <fullUrl value=""/> 
        <id value="example"/> 
        <!--    snip    -->
      <text> <status value="generated"/> <div xmlns=""><p> <b> Generated Narrative with Details</b> </p> <p> <b> id</b> : example</p> </div> </text> </Medication> 
      <!--    added because the client asked to include the medications    -->   
      <mode value="include"/>  

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.