FHIR Release 3 (STU)

This page is part of the FHIR Specification (v3.0.2: STU 3). 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 R2

Infrastructure And Messaging Work GroupMaturity Level: 3 Trial UseCompartments: Device, Practitioner

This resource has 1 operation associated with it:

$process-messageProcess Message

For more information about operations, including how they are invoked, see Operations.

This operation accepts a message, processes it according to the definition of the event in the message header, and returns a one or more response messages. This operation is described in detail on the messaging page

The official URL for this operation definition is

 http://hl7.org/fhir/OperationDefinition/MessageHeader-process-message

Formal Definition (as a OperationDefinition).

URL: [base]/$process-message

This is not an idempotent operation

In Parameters:
NameCardinalityTypeBindingProfileDocumentation
content1..1Bundle

The message to process (or, if using asynchronous messaging, it may be a response message to accept)

async0..1boolean

If 'true' the message is processed using the asynchronous messaging pattern

response-url0..1uri

A URL to submit response messages to, if asynchronous messaging is being used, and if the MessageHeader.source.endpoint is not the appropriate place to submit responses

Out Parameters:
NameCardinalityTypeBindingProfileDocumentation
return0..1Bundle

A response message, if synchronous messaging is being used (mandatory in this case). For asynchronous messaging, there is no return value

Note: as this the only out parameter, it is a resource, and it has the name 'return', the result of this operation is returned directly as a resource

This operation does not use the parameters resource; the parameters "async" and "response-url" always go in the URL, if they are used, and the message parameter is always the body of the HTTP message

Request to link 2 patients, and respond asynchronously (Request):

POST /ehr/fhir/$process-message?aync=true&response-url=http://example.org/clients/ehr-lite
[other headers]

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

<Bundle xmlns="http://hl7.org/fhir">
  <id value="10bb101f-a121-4264-a920-67be9cb82c74"/>
  <type value="message"/>
  <entry>
    <fullUrl value="urn:uuid:267b18ce-3d37-4581-9baa-6fada338038b"/>
    <resource>
      <MessageHeader>
        <id value="efdd254b-0e09-4164-883e-35cf3871715f"/>
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">
             
            <p>This message is a request to link Patient records 654321 (Patient Donald DUCK @ Acme Healthcare, Inc) and 123456 (Patient Donald D DUCK @ Acme Healthcare, Inc)</p>
           
          </div>
        </text>
        <event>
          <system value="http://hl7.org/fhir/message-events"/>
          <code value="patient-link"/>
        </event>    
        <timestamp value="2015-07-14T11:15:33+10:00"/>
        <source>
          <endpoint value="http://example.org/clients/ehr-lite"/>
        </source>
        <responsible>
          <reference value="http://acme.com/ehr/fhir/Practitioner/2323-33-4"/>
        </responsible>
      <!--  this message is posted to http://acme.com/ehr/fhir, 
             with an event 'link' to link 2 patient records, and nominates
             2 patients on the server  -->
        <focus>
          <reference value="http://acme.com/ehr/fhir/Patient/pat1"/>
        </focus>
        <focus>
          <reference value="http://acme.com/ehr/fhir/Patient/pat12"/>
        </focus>
      </MessageHeader>
    </resource>
  </entry>
  <entry>
    <fullUrl value="http://acme.com/ehr/fhir/Patient/pat1"/>
    <resource>
      <Patient>
        <id value="pat1"/>
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">
            
            <p>Patient Donald DUCK @ Acme Healthcare, Inc. MR = 654321</p>
          
          </div>
        </text>
        <identifier>
          <use value="usual"/>
          <type>
            <coding>
              <system value="http://hl7.org/fhir/v2/0203"/>
              <code value="MR"/>
            </coding>
          </type>
          <system value="urn:oid:0.1.2.3.4.5.6.7"/>
          <value value="654321"/>
        </identifier>
        <active value="true"/>
        <name>
          <use value="official"/>
          <family value="Donald"/>
          <given value="Duck"/>
        </name>
        <gender value="male"/>
        <contact>
          <relationship>
            <coding>
              <system value="http://hl7.org/fhir/patient-contact-relationship"/>
              <code value="E"/>
            </coding>
          </relationship>
          <organization>
            <reference value="Organization/1"/>
            <display value="Walt Disney Corporation"/>
          </organization>
        </contact>
        <managingOrganization>
          <reference value="Organization/1"/>
          <display value="ACME Healthcare, Inc"/>
        </managingOrganization>
      </Patient>
    </resource>
  </entry>
  <entry>
    <fullUrl value="http://acme.com/ehr/fhir/Patient/pat12"/>
    <resource>
      <Patient>
        <id value="pat2"/>
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">
            
            <p>Patient Donald D DUCK @ Acme Healthcare, Inc. MR = 123456</p>
          
          </div>
        </text>
        <identifier>
          <use value="usual"/>
          <type>
            <coding>
              <system value="http://hl7.org/fhir/v2/0203"/>
              <code value="MR"/>
            </coding>
          </type>
          <system value="urn:oid:0.1.2.3.4.5.6.7"/>
          <value value="123456"/>
        </identifier>
        <active value="true"/>
        <name>
          <use value="official"/>
          <family value="Donald"/>
          <given value="Duck"/>
          <given value="D"/>
        </name>
        <gender value="other">
          <extension url="http://example.org/Profile/administrative-status">
            <valueCodeableConcept>
              <coding>
                <system value="http://hl7.org/fhir/v2/0001"/>
                <code value="A"/>
                <display value="Ambiguous"/>
              </coding>
            </valueCodeableConcept>
          </extension>
        </gender>
        <managingOrganization>
          <reference value="Organization/1"/>
          <display value="ACME Healthcare, Inc"/>
        </managingOrganization>
      </Patient>
    </resource>
  </entry>
</Bundle>

Response - since this is asynchronous, the response is empty (Response):


200 OK
[other headers]

Response - if the message couldn't be accepted (e.g. there'll be no asynchronous response (Response):


500 OK Internal Server Error
[other headers]

<?xml version="1.0" encoding="UTF-8"?>
<OperationOutcome xmlns="http://hl7.org/fhir">
  <id value="exception"/>
  <text>
    <status value="additional"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>SQL Link Communication Error (dbx = 34234)</p>
    </div>
  </text>
  <issue>
    <severity value="error"/>
    <code value="exception"/>
    <details>
      <text value="SQL Link Communication Error (dbx = 34234)"/>
    </details>
  </issue>
</OperationOutcome>