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

Query-example-request.xml

Request Message Example (id = "req")

Raw XML

<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Query Message</title>
  <id>urn:uuid:13daadee-26e1-4d6a-9e6a-7f4af9b58877</id>
  <updated>2013-05-18T08:14:00+10:00</updated>
  <author>
    <name>HL7 FHIR project</name>
  </author>
  <category scheme="http://hl7.org/fhir/tag" term="http://hl7.org/fhir/tag/message"/>
  <entry>
    <title>Message Header Resource</title>
    <id>urn:uuid:35b9cc1b-bf67-4cfd-9177-5b6422f7d84e</id>
    <updated>2013-05-18T08:14:00+10:00</updated>
    <content type="text/xml">
      <MessageHeader xmlns="http://hl7.org/fhir">
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">
            <p>
              <b>Generated Narrative</b>
            </p>
            <p>
              <b>identifier</b>: bd5a062a-9d5c-4cb2-bcc8-1836618c5226
            </p>
            <p>
              <b>timestamp</b>: 18-May 2013 8:14
            </p>
            <p>
              <b>event</b>: 
              <span title="{http://hl7.org/fhir/message-type query}">query</span>
            </p>
            <h3>Sources</h3>
            <table class="grid">
              <tr>
                <td>
                  <b>Name</b>
                </td>
                <td>
                  <b>Software</b>
                </td>
                <td>
                  <b>Version</b>
                </td>
                <td>
                  <b>Contact</b>
                </td>
                <td>
                  <b>Endpoint</b>
                </td>
              </tr>
              <tr>
                <td> </td>
                <td>notepad</td>
                <td> </td>
                <td> </td>
                <td>
                  <a href="http://localhost">http://localhost</a>
                </td>
              </tr>
            </table>
            <h3>Destinations</h3>
            <table class="grid">
              <tr>
                <td>
                  <b>Name</b>
                </td>
                <td>
                  <b>Target</b>
                </td>
                <td>
                  <b>Endpoint</b>
                </td>
              </tr>
              <tr>
                <td>Health Intersections Server</td>
                <td> </td>
                <td>
                  <a href="http://hl7connect.healthintersections.com.au/svc/fhir/Mailbox">http://hl7connect.healthintersections.com.au/svc/fhir/Mailbox</a>
                </td>
              </tr>
            </table>
            <p>
              <b>data</b>: 
              <a href="urn:uuid:7cb73a48-090d-469a-a2b2-04f1e6b11ea2">urn:uuid:7cb73a48-090d-469a-a2b2-04f1e6b11ea2</a>
            </p>
          </div>
        </text><!--    this is the message id - see the Messaging page for a discussion of its use    -->
        <identifier value="bd5a062a-9d5c-4cb2-bcc8-1836618c5226"/>
        <timestamp value="2013-05-18T08:14:00+10:00"/>
        <event>
          <system value="http://hl7.org/fhir/message-type"/>
          <code value="query"/>
        </event><!--    this is query message    --><!--    message routing details    -->
        <source>
          <software value="notepad"/><!--    well, you'd use a real system in practice    -->
          <endpoint value="http://localhost"/>
        </source><!--    this is where the message would be returned to    -->
        <destination>
          <name value="Health Intersections Server"/><!--    the response was actually generated (originally) by that server    -->
          <endpoint value="http://hl7connect.healthintersections.com.au/svc/fhir/Mailbox"/>
        </destination><!--    refer to the query resource that comes next    -->
        <data>
          <reference value="urn:uuid:7cb73a48-090d-469a-a2b2-04f1e6b11ea2"/>
        </data>
      </MessageHeader>
    </content>
  </entry>
  <entry>
    <title>Query Resource</title>
    <id>urn:uuid:7cb73a48-090d-469a-a2b2-04f1e6b11ea2</id>
    <updated>2013-05-18T08:14:00+10:00</updated>
    <content type="text/xml">
      <Query xmlns="http://hl7.org/fhir">
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">
            <p>
              <b>Generated Narrative</b>
            </p>
            <p>
              <b>identifier</b>: 
              <a href="urn:uuid:7cb73a48-090d-469a-a2b2-04f1e6b11ea2">urn:uuid:7cb73a48-090d-469a-a2b2-04f1e6b11ea2</a>
            </p>
            <p>
              <b>parameter</b>: Extensions: Todo, Extensions: Todo
            </p>
          </div>
        </text><!--    In the message we choose, for convenience, to make the query.id 
            the same as the query resource id. In other contexts that wouldn't be appropriate
            -->
        <identifier value="urn:uuid:7cb73a48-090d-469a-a2b2-04f1e6b11ea2"/><!--    now, the actual search criteria    --><!--    this is a simple search, search on patients for the gender &quot;m&quot; using the
         default query method    -->
        <parameter url="http://hl7.org/fhir/query#_type">
          <valueString value="patient"/>
        </parameter>
        <parameter url="http://hl7.org/fhir/query#gender">
          <valueString value="m"/>
        </parameter>
      </Query>
    </content>
  </entry>
</feed>