HealthShare Personal Community Messaging: Patient Initiated Messages Setup Guide
1. Patient Initiated Messages Overview
Personal Community provides patients the ability to create and send messages to a set list of providers and care teams. Organizations have the ability to control which providers and clinical groups are available to recieve messages, as well as where those providers and clinical groups will manage and respond to messages. As part of the patient initiated setup, sites need to configure:
- Providers and clinical group available for patient initiated messages
- Message deliver workflow for each clinical group
- Types of messages that patients may send
2. Configuring Personal Community for Patient Initiated Messages
2.1. Configure Available Providers and Clinical Groups
Prior to enabling patient initiated messages, providers and clinical groups need to be configured. Consult the HealthShare Personal Community Messaging: Provider and Clinical Group Setup Guide for more information about initital configuration and management of these groups.
2.1.1. Customize the Results of Member's Searches for Providers (Optional)
One of the first steps for members who want to send their provider a message is to search for those providers. You may want to implement a filter to limit the providers returned in this search.
2.1.1.1. Create the Search Filter Class
To implement a search filter that will exclude certain providers from being available to members for messaging:
-
Create a new class that extends HSPortal.Messaging.Settings.FilterInterface .
-
Implement the ShouldExcludeRecipientFromResults() method. This method loops through all available providers and must return 1 for each recipient you want to exclude and 0 for each recipient you want to include.
The filtering criteria include:
-
AcceptsAttachments - Boolean flag.
-
ClinicalGroupAddress - Address object of type HSPortal.API.Datagram.Providers.Address .
-
ClinicalGroupRecipientID - ID of the Recipient object for the clinical group.
-
ClinicalGroupID - ID of the ClinicalGroup object.
-
ClinicalGroupName - Name of the clinical group.
-
RecipientID - ID of the Recipient object for the provider at the clinical group.
-
ProviderID - ID of the Provider object.
-
ProviderTitle - Title of the provider.
-
ProviderSuffix - Suffix for the provider.
-
FirstName - First name of the provider.
-
LastName - Last name of the provider.
-
Specialties - List of specialty names.
-
Favorite - Boolean flag to indicate if the provider is a favorite of the member doing the search.
For example, if you wanted to exclude from a messaging search all providers from the “Physicians Group, Inc.” clinical group, the filtering code in your implementation of the method might look like this:
Set pStatus = $$$OK Set tExclude = 0 If (pRecipient.ClinicalGroupName = "Physicians Group, Inc.") { Set tExclude = 1 } Quit tExclude
IMPORTANT
If you need to perform an expensive call to retrieve member-specific information, such as retrieving the providers in the member’s care team, you can use the InitializeRecipientFilter() method once in the initialization method. Then, you can add the relevant set of recipients to a local property so that each call to ShouldExcludeRecipientFromResults() can simply look up the provider locally. If you use the method, your code must call ##super() ; see the class documentation for InitializeRecipientFilter() .
-
- Compile your class.
2.1.1.2. Enable the Search Filter in the Workbench
After creating your search filter, you must change a configuration setting in the Workbench to enable it.
To enable provider search filtering:
-
Log in to the Workbench as a user with the Configuration Manager role.
-
Go to the Site Configuration Settings page ( Setup > Site Configuration ).
-
Change the value of the Provider search filter class setting to the name of your custom class.
-
Select Apply .
2.2. Configure the Message Delivery Workflow
Personal Community supports two types of message delivery:
- Messages are delivered to the Personal Community Workbench as a task.
- Messages are delivered to a trusted external system for processing.
Each clinical group supporting patient initiated messaging must have a message delivery flow defined.
2.2.1. Workbench Delivery
In this workflow, messages are delivered to the Personal Community Workbench as a task for a particular workflow group to process. For more information on workflows, agents, and tasks, refer to the HealthShare Personal Community Workflows, Agents, and Tasks Function Guide. You must complete the steps for Managing Workflow Groups and Managing Agents to proceed.
2.2.2. External System Delivery
2.2.2.1. Required Information to Deliver Messages to an External System
The list below may not be exhaustive, depending on the technical constraints of your specific external system.
For each external system, answer the following questions:
-
Regarding messages sent from Personal Community to the external system:
-
What APIs (if any) already exist?
-
Is a new interface needed on the external system to support this?
-
What message structures does the external system support as part of its existing workflows?
-
Are those structures extensible?
-
Are the message contents limited to plain text?
-
What structures does the system’s message format support?
-
-
Regarding messages sent from the external systems to Personal Community:
-
Can the system make calls to the Personal Community Secure Message API?
-
What are the Workbench object IDs and assigning authority codes of the clinical group and provider? This information is required for meaningful use reporting within the Workbench.
-
Is there a need to send messages with pre-written content?
-
Are there events that should automatically trigger messages?
-
-
Regarding message flow:
-
Can providers initiate communication with members?
-
Can members respond to messages from providers?
-
-
Regarding recipient identification:
-
How does the external system identify members (that is, members of Personal Community)?
-
How does the external system identify its recipients such as providers or other staff?
-
If the external system requires identifying recipients individually, how do messages differentiate one individual from another? (Personal Community has a group-oriented model, and processes all messages to each provider group uniformly; this requires each message to include content that identifies the particular member of that group, if necessary.)
-
What is required so that the correct identifiers are available to ensure delivery to the correct recipient? (Note that Personal Community allows for site-specific properties to be defined for message flows, so identifiers may be stored this way.)
-
-
Regarding message tracking:
-
Is it possible to allow for responses from members to be tied to the original message? (This generally requires a field to store the original message ID that was sent to the external system.)
-
-
Regarding varied implementations:
-
If a particular system is in use for multiple activities, does it have different constraints for each activity?
-
Does a particular system support different configurations, such as for different provider groups, which may require different behaviors for each group?
-
2.2.2.2. Overview of Message Routing
When a member sends a message, Personal Community determines how to route the message based on the message type (medical question, billing question, etc.) and the recipient (clinical group). Specifically, the following sequence of events occur:
-
Personal Community creates a message wrapper object that includes the underlying message as well as some information about the intended recipient (the care provider at a particular location).
-
Personal Community looks up the appropriate delivery interface based on the message type and clinical group (which comprise the message flow). This delivery interface allows Personal Community to communicate with the external system.
-
If the delivery interface class is a subclass of HSPortal.Delivery.ExternalSystem , then Personal Community sends the message wrapper object to the HSPortal_MessageHandler_ExternalSystem business process.
-
The HSPortal_MessageHandler_ExternalSystem business process then calls the delivery interface’s SendMessage method (which is a user-overridden method) to control transmission of the message to the external system. SendMessage takes two arguments: the message wrapper object and the business process object.
-
The delivery interface’s SendMessage method should not contain code that communicates with the external system. Instead, it should send a message to a business operation that is responsible for delivering messages to the external system. The message should be sent using code such as:
set status = pContext.SendRequestAsync("YourBusinessOperationName", pMessageWrapper)
Note
The code may also use the SendRequestSync method, but this method is not recommended, as it may delay feedback to the member.
-
The business operation that handles communication with the external system then performs most, if not all, of the following steps (also using user-implemented code):
-
Examines the following pieces of information:
-
Member information associated with the incoming message.
-
Additional information about the member, such as the member’s identifiers for the external system.
-
Additional information about the recipient, which may be stored in the options for the delivery interface or may be tied to the provider involved.
-
-
Formats the outgoing message according to the capabilities and requirements of the external system. (This also depends on the specific type of message being handled.)
-
Sends the message to the external system using a protocol and transmission channel that the external system supports.
-
2.2.2.3. Create the Delivery Interface for the External System
The delivery interface gathers any interface-specific configuration information and directs the message to the correct business operation. The delivery interface’s name also appears in the drop-down list when Workbench administrators configure a message flow.
To create a delivery interface for your external interface, and make it available in the Workbench, the steps are:
-
Extend the HSPortal.Delivery.ExternalSystem class.
-
Override the following methods in order to implement the required workflow behavior for your site:
-
%GetInterfaceName – Displays the name of the messaging interface in the Delivery Interface list on the page for creating or modifying the message flow associated with a clinical group. (This is the Create Flow or Modify Flow page, available through Setup > Clinical Groups > the group name > Create Message Flow or the Modify link for an existing message flow for the clinical group.)
-
%MapOptionKeyToInternalValue – If your interface has selectable options, allows an option key to be mapped to a value internal to Personal Community. See HSPortal.Delivery.Workflow for an example implementation.
-
SendMessage – Uses the information in the message wrapper to assemble a message for the external system; uses either SendRequestAsync or SendRequestSync to send that message to the business operation that delivers messages to the external system.
IMPORTANT
Your subclass(es) of HSPortal.Delivery.ExternalSystem need to handle every message type supported by your external system. You must override the SendMessage method in each subclass, and must provide all the available information about the sender, recipient, and message to the external system.
-
-
Override the Active parameter and set its value to 1. This parameter controls whether or not the interface is available to be selected in the Workbench.
-
Compile the class.
Additional Configuration of the Delivery Interface
Each delivery interface can specify that some options should be specified on a per-flow basis using the
%GetConfigurationLayout
method, and then using the
%OnCreateRecipientMap
and
%OnUpdateRecipientMap
callbacks. The key feature here is that you can include information that identifies which inbox or pool messages for the flow should be sent to in the external system. In general, this information is specific to each message flow (that is, to each clinical group and message type), so that the information is stored and configured along with each flow. The value that you pass to
%GetConfigurationLayout
should ensure that any values entered by the user are stored under
Options.[SettingName]
. For an example, see the
%GetConfigurationData
and
%GetConfigurationLayout
methods in the
HSPortal.Delivery.Workflow
class.
2.2.2.4. Configure the Personal Community Production for the External System
To be able to select a delivery interface when configuring a workflow group, you must first associate the delivery interface with the Personal Community production. To do this:
-
Logon to the Management Portal for the production as a user with the %EnsRole_Administrator role or one with greater privileges.
-
Set up the business operation associated with the delivery interface:
-
In the Personal Community namespace, go to the Production Configuration page (from the Management Portal Home page, Interoperability > Configure > Production ).
-
On the Production Configuration page, under Operations , select the + icon, to add a new business operation. This displays information the Business Operation Wizard .
-
Complete the fields on the wizard, specifying the required information about the code that communicates with the external system.
-
Select OK to save the business operation.
-
-
Set up the business process associated with the delivery interface:
-
Also on the Production Configuration page, under Processes , select the + icon, to add a new business process. This displays information the Business Process Wizard .
-
Complete the fields on the wizard, specifying the required information about the delivery interface.
-
Select OK to save the business process.
-
The delivery interface is now available for selection when setting up a message flow for a clinical group.
2.3. Associate the Message Delivery Workflow with Clinical Groups
For each available clinical group, follow the following steps to associate the message delivery workflow.
To associate a message delivery workflow with a clinical group, you must:
-
Log into the Workbench as a user with the Provider Manager role.
-
Go to the Setup tab.
-
In the activity pane, choose Clinical Groups .
-
On the Clinical Groups page, select the group that is using the flow. This displays the Clinical Group Details page for the group.
-
On the Group Details page, near the bottom of the page, select the Create message flow button.
-
Enter the following values for the fields:
-
Message Type - Select the type of message that the flow uses (or
All
for all of them). -
Delivery Interface - S elect your external system delivery interface to use the external workflow or Workbench Task to use the Workbench workflow.
- Workflow Group - This will appear if Workbench Task has been selected. Select the workflow group that will be processing the message tasks.
- Other Settings - If your external system delivery interface defined additional settings, they will be displayed on this page.
- Active - Select the check box.
-
- Select Save.
2.4. Enable Messages in the Workbench
-
Lo g into the Workbench as a user with the
Configuration Manager
role. -
Go to the Configuration Application page ( Setup > Configuration Application ) and select the Feature Control tab. In the activity pane, select Configure Messaging .
-
Select Edit Mode to make edits to the fields described in the following steps.
-
To the right of the Messaging box, ensure that the Enable checkbox is selected.
-
Once the Configure Messaging section is expanded, select from the current settings:
-
-
Allow patient to send messages
- allows messaging functionality for members. Once selected, you must choose at least one of the following message types:
- Medical Question - allows members to send a message specifically labeled as a "medical question".
- General Question - allows members to send a message specifically labeled as a "general question".
- Billing Question - allows members to send a message specifically labeled as a "billing question".
- Allow patient to send replies - allows members to reply back to a message sent by a provider.
-
Allow patient to send messages
- allows messaging functionality for members. Once selected, you must choose at least one of the following message types:
- After you have finished, select Submit at the bottom of the page to save your changes.
3. Available Content Files
The following content files relate to messaging, which you may wish to update:
Content Files for the Public Application
Application Page | Content File |
---|---|
Disclaimer | content-messages-disclaimer |
Inbox | content-messages-inbox |
Sent | content-messages-sent |
Archive | content-messages-archive |
New Message | content-messages-types |
Help Files for the Workbench
Tasks
Application Page | Content File |
---|---|
Manage Workflow Groups | help-area-tasks-groups-manage |
Manage Tasks for a Group | help-area-tasks-groups-tasks |
Tasks → Details | help-area-tasks-groups-task-details |
Tasks → Details → Transfer | help-area-tasks-groups-agentlist |
Agents | help-area-tasks-group-agents |
Agents→ Details | help-area-tasks-group-agent-details |
Add Agents | help-area-tasks-all-agentList |
|
help-area-tasks-agents-manage |
Agent Details | help-area-tasks-agents-manage-details |
Agent Details → Add Group | help-area-tasks-all-groupList |
Details → Selected Group → Agent Membership Details | help-area-tasks-agent-membership-details |
Messages
Application Page | Content File |
---|---|
Inbox | help-area-messages-messages-inbox |
Inbox Message Details | help-area-messages-messages-inbox-detail |
Inbox Message Details → Compose Reply | help-area-messages-messages-reply |
Outbox | help-area-messages-messages-outbox |
Outbox Message Details | help-area-messages-messages-outbox-detail |
Compose New Message | help-area-messages-messages-compose |
Compose New Message → Member Search | help-area-messages-memberSearch |
Compose New Message → Load Form | help-area-messages-select-form |
3.1. Updating Page Content Related to Messaging
To modify page content:
-
In the Workbench, enable the setting that displays the source file for each page’s content in the public application:
-
Log into the Workbench as a user with the
Configuration Manager
role. -
Go to the Site Configuration Settings page ( Setup > Site Configuration ).
-
In the Content Settings section, select Highlight Personal Community content .
-
Select Apply .
This is also known as enabling content highlighting or enabling the debug flag .
-
-
If there is not already a custom copy of the content file, copy the existing file from
<hspc-home>/base/content/en/
to
<hspc-home>/custom/content/en/
Note
If such a file already exists, do not create a new copy, as this may overwrite any customizations your organization has already made in it.
-
Edit the custom copy of the file as required for your organization.
Note
-
If this is a right to left language, the files should contain:
<html dir= "rtl" ></html> The customer would then put their content within the tags.
-
-
Refresh the content for your organization's site.
3.1.1. Refreshing Page Content
To refresh content:
-
Log into the Workbench as a user who has the
Configuration Manager
role. -
Go to the Content tab.
-
On the activity pane, select Content Updates . This displays the Content Updates page.
-
On the Content Updates page, choose Refresh Content .
This updates every aspect of each application to display the custom content, including text, images, and so on.
If changes are not visible after you refresh content, you may need to clear your browser cache.