Background
Client: HCMC – Hollywood, Florida
Objective: Integrate Salesforce Health Cloud and Service Cloud with Healthie to create a cohesive and efficient CRM system that enhances data flow, automates patient management processes, and improves overall patient experience.
Challenges
- Data Synchronization: Ensuring data is seamlessly synchronized between Salesforce Health Cloud and Healthie.
- Automation: Establishing automated workflows for patient onboarding, appointment scheduling, and follow-up processes.
- User Experience: Maintaining a seamless user experience across both platforms.
Solution Implementation
Tools Used:
- Salesforce Health Cloud
- Salesforce Service Cloud
- Healthie API
- Middleware – MuleSoft & Apex for custom integrations
Step 1: Data Synchronization
To synchronize data between Salesforce Health Cloud and Healthie, we developed custom Apex classes and triggers to consume REST APIs from Healthie.
Example: Apex Class for Data Synchronization
- Apex Class to Fetch Data from Healthie and Insert into Salesforce:
private static final String HEALTHIE_API_URL = 'https://api.healthie.io/v1/';
private static final String API_KEY = 'Your_Healthie_API_Key';
// Method to fetch client list from Healthie
public static void fetchClientsFromHealthie() {
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint(HEALTHIE_API_URL + 'clients');
request.setMethod('GET');
request.setHeader('Authorization', 'Bearer ' + API_KEY);
HttpResponse response = http.send(request);
if (response.getStatusCode() == 200) {
List<HealthieClient> clientList = (List<HealthieClient>) JSON.deserialize(response.getBody(), List<HealthieClient>.class);
List<Patient> patientsToInsert = new List<Patient>();
for (HealthieClient client : clientList) {
Patient patient = new Patient();
patient.FirstName = client.first_name;
patient.LastName = client.last_name;
patient.Email = client.email;
// Add mapping for other required fields
patientsToInsert.add(patient);
}
insert patientsToInsert;
} else {
System.debug('Failed to fetch clients from Healthie: ' + response.getBody());
}
}
// Inner class to map Healthie client data
public class HealthieClient {
public String first_name;
public String last_name;
public String email;
// Add other required fields
}
}
- Trigger to Call Apex Class:
trigger SyncHealthieClients on Patient (after insert) {
if (Trigger.isAfter && Trigger.isInsert) {
HealthieIntegration.fetchClientsFromHealthie();
}
}
Step 2: Automation Workflows
We created automated workflows in Salesforce to streamline patient management processes using Process Builder and Flow.
Example: Automation for Patient Onboarding in Salesforce
- Process Builder:
- Create a new Process Builder process.
- Trigger: When a new Patient record is created.
- Action 1: Create a Task for the care coordinator to verify patient details.
- Action 2: Call an Apex method to notify Healthie about the new patient.
- Flow Example for Automating Appointment Scheduling:
- Create a new Flow using Flow Builder.
- Trigger: When the Patient status changes to ‘Ready for Appointment’.
- Action 1: Schedule an appointment in Healthie using an Apex action.
- Action 2: Send a confirmation email to the patient.
Example Apex Code for Flow to Schedule Appointment:
public class HealthieAppointmentScheduler {
@InvocableMethod(label='Schedule Appointment in Healthie' description='Schedules an appointment in Healthie')
public static void scheduleAppointment(List<Id> patientIds) {
for (Id patientId : patientIds) {
Patient patient = [SELECT Id, FirstName, LastName, Email FROM Patient WHERE Id = :patientId LIMIT 1];
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://api.healthie.io/v1/appointments');
request.setMethod('POST');
request.setHeader('Authorization', 'Bearer ' + API_KEY);
request.setHeader('Content-Type', 'application/json');
Map<String, Object> appointmentData = new Map<String, Object>();
appointmentData.put('client_id', patient.Email);
// Assuming email is unique and used as identifier
appointmentData.put('start_datetime', '2023-10-10T10:00:00Z');
// Example datetime, should be dynamically set
appointmentData.put('duration', 30);
// Duration in minutes
String requestBody = JSON.serialize(appointmentData);
request.setBody(requestBody);
HttpResponse response = http.send(request);
if (response.getStatusCode() == 201) {
System.debug('Appointment scheduled successfully in Healthie');
} else {
System.debug('Failed to schedule appointment in Healthie: ' + response.getBody());
}
}
}
private static final String API_KEY = 'Your_Healthie_API_Key';
}
Step 3: User Experience Enhancement
Ensuring the patients and healthcare providers have a seamless experience across both platforms was critical. We customized dashboards and reports in Salesforce to offer comprehensive insights.
Example: Custom Dashboard in Salesforce Health Cloud
- Metrics:
- Total number of patients onboarded.
- Number of scheduled appointments.
- Patient follow-up status.
- Custom Reports:
- Patient Registration Source.
- Appointment Outcomes.
- Usage:
- Used Salesforce’s report builder and dashboard functionalities to create and visualize data, making it easy for the healthcare staff to monitor patient engagement and satisfaction.
Example: Custom Lightning Component for Patient Summary:
// PatientSummaryController.cls
public class PatientSummaryController {
@AuraEnabled(cacheable=true)
public static Patient__c getPatientById(Id patientId) {
return [SELECT Id, FirstName, LastName, Email, Status__c, Last_Appointment__c FROM Patient__c WHERE Id = :patientId LIMIT 1];
}
}
// patientSummary.js
import { LightningElement, wire, api } from 'lwc';
import getPatientById from '@salesforce/apex/PatientSummaryController.getPatientById';
export default class PatientSummary extends LightningElement {
@api recordId;
patient;
@wire(getPatientById, { patientId: '$recordId' })
wiredPatient({ error, data }) {
if (data) {
this.patient = data;
} else if (error) {
console.error('Error fetching patient data:', error);
}
}
}
Results
- Increased Efficiency: Automated workflows reduced manual tasks by 60%+, leading to increased efficiency in patient management.
- Improved Patient Experience: Patients had a seamless journey from initial registration to appointment scheduling, improving satisfaction rates by 33%.
- Objective Data View: Synchronized data across Salesforce Health Cloud, Service Cloud, and Healthie provided important steps to improve the efficiency of patient interactions and enhanced decision-making for healthcare providers.
Conclusion
The integration between Salesforce Health Cloud, Service Cloud, and Healthie created a robust, seamless CRM system for the healthcare company. The automated workflows and seamless data synchronization ensured no data slip-through, provided better patient management, and significantly improved overall patient satisfaction.
Why Choose Dev Cabin Technologies:
This case study emphasizes the expertise and technical capability of Dev Cabin Technologies in integrating platforms like Salesforce Health Cloud, Service Cloud, and Healthie to build efficient, automated CRM systems tailored to the unique needs of healthcare clients. Our approach leverages powerful API integrations, automated workflows, and comprehensive data management to deliver exceptional outcomes.
Next Steps:
- Develop a detailed project plan outlining milestones, timelines, and expected outcomes. This will include:
- Discovery Phase: In-depth analysis of current systems, workflows, and pain points.
- Integration Planning: Customizing data synchronization strategies, defining required fields, and setting up authentication mechanisms for Healthie and Salesforce.
- Development Phase: Implementing the integrations using Apex, configuring Health Cloud and Service Cloud, and creating necessary custom components and workflows.
- Testing Phase: Rigorous testing of data synchronization, automated workflows, and user interfaces to ensure a seamless experience.
- Deployment & Training: Moving the implementation to the live environment and providing comprehensive training for staff on using the new integrated system.
- Post-deployment Support: Ongoing support and troubleshooting to address any issues and ensure the new system meets the client’s needs.
Summary
This case study demonstrates how Dev Cabin Technologies successfully integrated Salesforce Health Cloud and Service Cloud with Healthie, enhancing the CRM capabilities of a Healthier Choices Management Corporation. By leveraging powerful API integrations, automated workflows, and tailored dashboards, we enhanced data flow, improved patient management, and delivered an exceptional patient experience.
References:
- Salesforce Health Cloud Documentation
- Salesforce Service Cloud Documentation
- Healthie API Documentation
- Salesforce Apex Developer Guide
Please let us know if you have any questions or need further details regarding this case study. We look forward to helping you achieve a seamless and efficient CRM system tailored to your healthcare business needs.