Sending FHIR resources in Direct Messages
this page describes how to send FHIR resources in direct messages.
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?
This is not encrypted, but otherwise this is what it looks like:
MIME-Version: 1.0 From: email@example.com Date: Thu, 14 Jun 2017 23:10:50 +1000 Message-ID: <firstname.lastname@example.org> Subject: Clinical data communication To: <email@example.com> 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.