MuleSoft Accelerator for Healthcare icon

MuleSoft Accelerator for Healthcare

(1 review)

Use case 1 - Patient 360

Gain a comprehensive patient view through FHIR and HL7 v2-based integrations with EHRs and other clinical applications


Healthcare organizations ability to gain a 360-degree view of their patients is crucial for providing the service that patients expect today and implementing a value-based care model. A deep understanding of patients' medical history, lifestyle, preferences, and social determinants of health can enable providers to deliver personalized care that is more effective and efficient.

To accomplish this objective of capturing a Patient 360, healthcare organizations must unify data across a variety of sources - none more critical than their electronic health records (EHR). With this Patient 360 solution, organizations can accelerate the integration required to accomplish this objective and power innovative initiatives, including Digital Front Door and CRM, and deliver powerful patient insights through AI and data science.

Use case description

This use case accelerates Patient 360 efforts by providing pre-built APIs and implementation templates to integrate critical data from EHRs with other emerging technologies and applications. This solution provides both HL7 v2 and FHIR-based capabilities to allow organizations to support a variety of use cases and realize value regardless of the industry standard that is present in their organization’s ecosystem.

Included as part of the use case are System APIs for two of the most common EHR platforms used globally, Epic and Cerner, and a group of System APIs for Salesforce Health Cloud. These System APIs can be leveraged as the foundation for a myriad of different use cases, such as allowing a Health Cloud user to sync patient demographics and clinical resources from their EHR directly from the Salesforce UI. In addition, the solution provides a group of applications allowing healthcare organizations the ability to parse and map HL7 v2 messages into Salesforce Health Cloud to further enrich the view of the patients they serve. The assets support consumption of key HL7 v2 events including ADT, ORU and SIU offering visibility into patient demographics, clinical encounters, scheduling, observations and other valuable information.

Functional view

Patient 360 functional view


HL7 v2HL7 v2 is an HL7 specification for healthcare interoperability. It remains the most widely used messaging standard in the healthcare industry, but has its limitations and often requires significant customization to function.
FHIR R4Fast Healthcare Interoperability Resources is an HL7 specification for healthcare interoperability. It is a JSON-based standard describing data formats, elements and an application programming interface for exchanging electronic health records. FHIR R4 is the first normative version of the standard.
EHRElectronic Healthcare Record is an all-encompassing system that manages a patient's healthcare information.
CRMCustomer relationship management is a technology for managing all your company’s relationships and interactions with customers and potential customers.
ADTAdmit, Discharge and Transfer messages are a type of HL7 v2 event that are used to communicate patient demographics, visit information and patient state at a healthcare facility.
ORUObservation Result messages are a type of HL7 v2 event that contain information about a patient’s clinical observations and is used in response to an order generated in a clinical system.
SIUScheduled Information Unsolicited messages are a type of HL7 v2 event that are used to exchange patient appointment schedule information between clinical and administrative systems.

High-level architecture

The following diagram represents the FHIR-based patient data synchronization solution of the overall patient 360 use case.

Patient 360 Patient Sync Architecture

The following diagram represents the HL7 v2 events management solution of the overall patient 360 use case.

Patient 360 Events Management Architecture


Synchronize patient demographics and clinical data with Salesforce Health Cloud

  • Use Patient EHR Search form, which is available from Salesforce Patient Sync LWC component, to search for a patient in an EHR system, such as Epic or Cerner, using name and date of birth.
  • Select the presented patient card and then click ‘Sync Patient and Selected Records’ to sync the patient demographics and other clinical resources using MuleSoft Health Cloud Patient Data Synchronization Process API.
  • The Health Cloud Patient Data Synchronization Process API orchestrates the following:
    • Retrieves the patient resource from an EHR system
    • Identifies and retrieves any FHIR references within the patient resource from an EHR system
    • Syncs the patient resource FHIR references, and then syncs a patient resource into Health Cloud
    • Retrieves the patient clinical resources from an EHR System
    • Identifies and retrieves any FHIR references specified in a clinical resource from an EHR System
    • Syncs the clinical resource FHIR references, and then syncs a clinical resource into Health Cloud

Note: The workflow above highlights one process that leverages the EHR and Health Cloud System APIs to power a patient synchronization process in Salesforce Health Cloud. MuleSoft customers can (and have) use these assets to support similar use cases, such as powering a digital front door mobile application, ingesting EHR data into other software applications and supporting other CRM-related processes. One of the primary benefits of the MuleSoft Accelerators are their extensibility.

Ingest HL7 v2 events into Salesforce Health Cloud

  • An EHR system or an Interface Engine sends HL7 v2 ADT, ORU and SIU events over HTTP or MLLP.
  • The HL7 v2 Events Management Listener orchestrates the following:
    • Consumes and validates the events, and then stores into intermediate datastore and sends an ACK
    • A scheduled process is triggered to initiate the flow
    • Polls the data store for new data
    • Events that need to be processed sequentially will be processed in sequential manner and others are processed in parallel by invoking the ADT, ORU and SIU event listener applications, which ingests the data into Health Cloud

Sequence diagram

This diagram illustrates the steps in the orchestration of data via the Health Cloud Patient Data Synchronization Process API, Epic System APIs and Cerner System APIs across Administration, Clinical, Diagnostics and Medications modules.

Patient sync sequence diagram

Assumptions and constraints

HL7 v2

  • The content of the current message is used to replace the content of the prior message for the same information object. This process is called message snapshots processing. To implement the message snapshot update properly, key identifiers must be shared across the messages and must uniquely identify the specific information object that is to be updated, for example "PV1.19 - Visit Number" is considered a unique identifier to determine an encounter in Health Cloud.
  • While processing scheduling events, a clinical encounter is created only when the service appointment is completed and the notification is received via SIU^S14
  • Sending system for scheduling events will:
    • Create an event for each patient with a single resource group and single service in AIS segment
    • Send the appointment start and end times either in TQ1 or AIS segment


  • API specifications and implementations are done based on the FHIR R4 version
  • Integrated with Epic through their Open Epic FHIR APIs available here
  • Integrated with Cerner through their Millennium APIs available here
  • Implemented JWT authentication to connect with either Epic or Cerner systems

Before you begin

bulb.png The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications.

Downloadable assets

Note: The following assets are compatible with the Spring 2021 and later versions of Health Cloud. For assets compatible with the Fall 2020 version of Health Cloud, see Previous versions.

Patient 360 using HL7 v2

Patient 360 using FHIR

Process APIs
System APIs
Custom components
  • Patient Sync Lightning Web Component | Source

Previous versions

Note: The following assets are compatible with the Fall 2020 and earlier versions of Health Cloud.

Patient 360 using HL7 v2

Patient 360 using FHIR R4

MuleSoft Direct assets

For Salesforce Health Cloud customers interested to deploy MuleSoft applications via MuleSoft Direct, access the assets and documentation below:


Here are some links to related and supporting documentation.


Interested in seeing these assets in action? Check out this demo recording highlighting this use case!

back to top


Published by
MuleSoft Solutions
Published onJan 17, 2024
Asset overview

Asset versions for 2.22.x

Asset versions