This wiki has undergone a migration to Confluence found Here

Difference between revisions of "Sending FHIR resources in Direct Messages"

From HL7Wiki
Jump to navigation Jump to search
(Created page with "this page describes how to send FHIR resources in direct messages. = Overview = For direct, FHIR resources are just another kind of Health Content Package. There's nothing d...")
 
Line 12: Line 12:
 
* one of the entries in a mime package
 
* one of the entries in a mime package
 
* using one of the FHIR mime types (e.g. application/fhir+xml or application/fhir+json)
 
* using one of the FHIR mime types (e.g. application/fhir+xml or application/fhir+json)
* Always a bundle. type = Document, Collection, or Mesages
+
* Always a bundle. type = Document, Collection, or Messages
 
** Document: standard document handling implications apply
 
** Document: standard document handling implications apply
 
** Collection: expectation that the system decomposes into a RESTful API available store. Update semantics to be applied
 
** Collection: expectation that the system decomposes into a RESTful API available store. Update semantics to be applied
Line 26: Line 26:
 
This is not encrypted, but otherwise this is what it looks like:
 
This is not encrypted, but otherwise this is what it looks like:
  
[todo]
+
  MIME-Version: 1.0
 +
  From:  source@example.org
 +
  Date: Thu, 14 Jun 2017 23:10:50 +1000
 +
  Message-ID: <1a4050d8-c87a-403d-b8c8-f0ddc96a0882@example.org>
 +
  Subject: Clinical data communication
 +
  To: <target@example.org>
 +
  Content-Type: multipart/mixed; boundary=0d451cc9f09f44268d37b820ae1276a9
 +
 
 +
  --0d451cc9f09f44268d37b820ae1276a9
 +
  Content-Type: application/fhir+xml; charset=UTF-8
 +
 
 +
  <Bundle xmlns="http://hl7.org/fhir">
 +
    <id value="7e375113-f17c-4b99-87ed-0463ead9f22c"/>
 +
    <type value="collection"/>
 +
    <!-- always include the patient resource -->
 +
    <entry>
 +
      <fullUrl value="http://example.org/fhir/Patient/example"/>
 +
      <resource>
 +
        <Patient>
 +
          <id value="example"/>
 +
          &lt;!-- data for patient --&gt;
 +
        </Patient>
 +
      </resource>
 +
    </entry>
 +
    <!-- multiple entries. Senders should generally
 +
    include the same kind of resources as would go in
 +
    patient/$everything, but delta sets (changed resources).
 +
   
 +
    Senders are encouraged to include referenced administration resources
 +
    with each transmission unless they are sure receivers have all context.
 +
    Receivers must be able to handle repeated sending of the same resource
 +
    -->
 +
  </Bundle>
 +
 
 +
  --0d451cc9f09f44268d37b820ae1276a9
 +
  Content-Type: signature...
 +
 
 +
Note that this example shows a FHIR bundle as the only part, but this need not be the case. the message could include other parts (PDFs) etc. And the FHIR resources are able to reference the other parts using the cid: scheme in attachment URLs.

Revision as of 13:20, 14 June 2017

this page describes how to send FHIR resources in direct messages.

Overview

For direct, FHIR resources are just another kind of Health Content Package. There's nothing different about FHIR resources from the point of view of Direct, but this page provides some additional details:

  • How FHIR resources are represented, for complete interoperability
  • The relationship between addressing information inside the FHIR resources, and on the Direct messages

Representing FHIR resources

  • one of the entries in a mime package
  • using one of the FHIR mime types (e.g. application/fhir+xml or application/fhir+json)
  • Always a bundle. type = Document, Collection, or Messages
    • Document: standard document handling implications apply
    • Collection: expectation that the system decomposes into a RESTful API available store. Update semantics to be applied
    • Message: treat as a message, response in a new Direct messages (not in the MDN)

Relationship between addresses

  • if a bundle of type message
  • sender and recipient must match the email addresses on the direct message?

Example

This is not encrypted, but otherwise this is what it looks like:

 MIME-Version: 1.0
 From:  source@example.org
 Date: Thu, 14 Jun 2017 23:10:50 +1000
 Message-ID: <1a4050d8-c87a-403d-b8c8-f0ddc96a0882@example.org>
 Subject: Clinical data communication
 To: <target@example.org>
 Content-Type: multipart/mixed; boundary=0d451cc9f09f44268d37b820ae1276a9
  
 --0d451cc9f09f44268d37b820ae1276a9
 Content-Type: application/fhir+xml; charset=UTF-8
  
 <Bundle xmlns="http://hl7.org/fhir">
   <id value="7e375113-f17c-4b99-87ed-0463ead9f22c"/> 
   <type value="collection"/> 
   <entry>
     <fullUrl value="http://example.org/fhir/Patient/example"/>
     <resource>
       <Patient>
         <id value="example"/>
         <!-- data for patient -->
       </Patient>
     </resource>
   </entry>
 </Bundle> 
 --0d451cc9f09f44268d37b820ae1276a9
 Content-Type: signature...

Note that this example shows a FHIR bundle as the only part, but this need not be the case. the message could include other parts (PDFs) etc. And the FHIR resources are able to reference the other parts using the cid: scheme in attachment URLs.