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?
The Direct Health Content Container looks like this prior to wrapping, signing, and encryption:
MIME-Version: 1.0 From: firstname.lastname@example.org Date: Thu, 14 Jun 2017 23:10:50 +1000 Message-ID: <email@example.com> Subject: Clinical data communication To: <firstname.lastname@example.org> Content-Type: multipart/mixed; boundary=0d451cc9f09f44268d37b820ae1276a9 --0d451cc9f09f44268d37b820ae1276a9 Content-Type: application/fhir+xml; charset=UTF-8 Content-Disposition: attachment; filename="bundle.xml"
<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>