This fixes bug #368. Forced the OUT event to act like a regular
[openemr.git] / Documentation / Direct_Messaging_README.txt
blob3e9e696200d59360ba147fba6ef97c84bfcfbd78
1 Direct Messaging with OpenEMR and EMR Direct phiMail(TM)
2 Version 1.2, 29 Jul 2013
4 Purpose:
5 To provide a secure method from within OpenEMR for sending/receiving protected health 
6 information to/from another Direct address using the Direct Project messaging 
7 standard, as a step toward the goal of satisfying the three MU2 criteria 
8 requiring the use of Direct messaging.  (For general information about Direct messaging, 
9 see http://www.emrdirect.com/about-directed-exchange-and-secure-direct-messaging.html)
11 IMPORTANT:
12 Please be aware of the following limitations when using the OpenEMR Direct Messaging 
13 features with PHI in a production environment:
14 a. the current code only supports a single shared "group" Direct Address for each OpenEMR 
15 installation. Note that this trust model is fully compliant with the Direct Project 
16 requirements for Direct messaging, but we may add additional trust models in the future 
17 should we determine that doing so would provide a higher degree of interoperability for 
18 OpenEMR users.
19 b. the current code only sends the CCR or CCD XML data that is already available in OpenEMR; 
20 these files as currently generated by existing OpenEMR code do not meet the requirements 
21 of the MU2 criteria, and the current CCD files do not pass strict CDA validation tests.
23 Problems Solved:
24 1. Patient-initiated transmission of CCDA data from the Report section of the Patient Portal 
25 interface.
26 2. Provider-initiated transmission of CCDA data from the Report section of the Patient pane
27 in the main OpenEMR interface.
28 3. Log all CCDA data transmissions including date/time, patient, and whether transmission 
29 was initiated by the patient through the Patient Portal or by an OpenEMR user through the 
30 main interface.
31 4. Receive Direct messages from other sources.
33 How it Works:
34 Once configured, OpenEMR will interface with a phiMail Direct messaging server to complete the
35 required message transactions. The phiMail platform is described on the EMR Direct website, 
36 http://www.emrdirect.com and http://www.emrdirect.com/phimail-faq.html.
38 What you need before enabling Direct Messaging in OpenEMR:
39 1. Test Mode: Developers may contact EMR Direct to request complimentary test address and 
40 digital certificate provisioning, as well as API documentation, at support@emrdirect.com.  
41 Access to a sandbox server is available for preliminary testing.
42 2. Production Mode: Healthcare provider users should begin by signing up for a Direct message 
43 account with EMR Direct. 
44 Subscribers will receive the username, password, and server address information with which to 
45 configure OpenEMR. Applicants may visit https://www.emrdirect.com/subscribe.html to begin the
46 process. 
48 How to enable the Direct Messaging Features in OpenEMR:
49 Setup of phimail Direct messaging Service is done in the Administration::Globals::Connectors 
50 tab
51 1. Check the "Enable phiMail Direct Messaging Service" checkbox.
52 2. Enter the Server Address, Username, and Password provided to you.
53 3. Specify the interval for automatic message checking; we suggest 5 or 10 minutes as a
54 starting point, but installations processing a large number of Direct messages may want a 
55 shorter interval. By setting the interval to 0 (zero), automatic message checking through 
56 OpenEMR's background service manager will be suppressed. (This would be appropriate if message 
57 checking is managed through another mechanism, such as a system cron job.)
58 4. Specify the OpenEMR user who will receive notification of new incoming Direct messages. 
59 Enter the username in the field.
60 5. Optionally check "phiMail Allow CCD Send" and/or "phiMail Allow CCR Send" to enable
61 the Transmit feature for these data types. If you do not select at least one of these,
62 OpenEMR will operate in a receive only mode.
63 6. Click the "Save" button.
64 7. Confirm that a valid Notification Email Address is set in the Administration::
65 Globals::Notifications tab to receive error notifications from the Direct Messaging service.
67 Checking the status and history of the Direct Messaging Service in OpenEMR:
68 Administrators may view the status of the service by Selecting Reports::Services::Background 
69 Services from the main OpenEMR left navigation bar. The "View Log" link on this page or 
70 Reports::Services::Direct Message Log will open the messaging history log showing each message 
71 sent or received and the current status of that message (Received, Sent, Delivery Confirmed, 
72 or Failed). 
74 Note of message status messages: Receiving message status updates requires that Direct message
75 checking be enabled. When receiving messages, the phiMail back-end is fully compliant with the 
76 Direct messaging protocols to notify the sender and provide final delivery confirmation, but 
77 please note that  many other Direct providers do not yet support these features. If a message 
78 is sent to a recipient using one of these other systems, OpenEMR probably won't ever receive a 
79 final delivery confirmation for that message.
81 How to use the Direct Messaging Features in OpenEMR:
82 Sending:
83 When the phiMail Direct Messaging service is enabled, an additional "Transmit" button will
84 appear in the Continuity of Care Record (CCR) and/or Continuity of Care Document (CCD) block 
85 of the Reports section in both the Patient Portal and the Patient pane of the main provider 
86 interface. 
88 To transmit a CCR or CCD, first click the "Transmit" button. This will open a small dialog 
89 immediately below the button with a form field to enter the intended recipient's Direct Address. 
90 Clicking "Transmit" again will hide the dialog.
92 A Direct Address should have the same form as a regular email address, e.g. 
93 jonesclinic@direct.example.com. Enter the address in the field and click the "Send" button 
94 immediately to the right of the field. Only a single recipient may be specified in the field.
95 The Send button will be temporarily disabled while OpenEMR is communicating with the phiMail 
96 server. This will only work for properly-configured Direct addresses. Attempts to send to a 
97 regular email address or Direct address outside of our test mode "trust sandbox" will fail
98 during testing. Production accounts have wide interoperability with other Direct service
99 providers. Should you encounter a trust community with which OpenEMR does not interoperate,
100 please let us know at support@emrdirect.com.
102 OpenEMR will then display a status message immediately below the Address field, the 
103 success or failure of the message transmission, or an error message. If the message is
104 successfully submitted to the server, the Address field will be cleared to prevent accidental
105 re-transmission. If multiple recipients are required, the next recipient can now be entered.
107 Receiving:
108 When the phiMail Direct Messaging service is enabled, and message checking is enabled either 
109 through the background services manager of another mechanism, OpenEMR will automatically process 
110 message status updates and new messages. Status updates will be reflected immediately in the 
111 Direct Messaging log. Additionally, if a "Failed" notification is received for a previously sent 
112 message, a regular email message will be generated to the Notification Email Address specified 
113 in the Notifications tab of the Global Settings panel (accessed by selecting Administration::
114 Globals from the main left navigation menu).
116 New Direct messages will be processed as follows. A new "Patient Note" will be generated and 
117 sent to the phiMail notification user specified in the Connectors tab of the Global settings. 
118 The patient note will contain information about the message, including any text at the beginning 
119 of the message from the sender. Any attachments (and any non-text content) will be automatically 
120 converted to separate OpenEMR Documents, which will be referenced in the new Patient Note.  
121 The Documents and the Patient Note are initially created without an assigned patient. 
123 At this time, the envisioned workflow is that the notification user will review the message text
124 and any included Documents to determine which patient the content belongs to and will then set the 
125 patient using the existing Patient Note interface for choosing a patient. Once the patient is sent, 
126 the Patient Note can be forwarded to another provider or staff member as appropriate using the 
127 existing forwarding mechanism for Patient Notes. The unassigned Documents can be viewed by Selecting 
128 Miscellaneous::New Documents from the main left navigation menu, which opens a Documents list. Once 
129 the specified document is opened, the user can optionally categorize the document and, when 
130 appropriate, assign the document to a specific patient using the "Move to Patient #" feature in the 
131 Documents interface.
134 Trademark Notice: phiMail is a trademark of EMR Direct.
136 Copyright (c) 2013 EMR Direct.