EHR Integrations
Connect Hablr with Electronic Health Record systems for seamless healthcare data exchange. We support FHIR R4, HL7 v2, and CCDA standards for maximum interoperability with major EHR platforms.
Prerequisites
Before setting up an EHR integration, ensure you have the following:
- ✓A Hablr account with admin role and HIPAA compliance enabled
- ✓Business Associate Agreement (BAA) signed with Hablr
- ✓EHR vendor approval and API credentials (SMART on FHIR client)
- ✓Network connectivity to EHR FHIR endpoints (may require VPN)
- ✓SSL/TLS certificates for secure communication
Supported EHR Systems
Epic
Integration with Epic EHR using FHIR R4 APIs for patient data exchange and care coordination.
Cerner
Connect with Cerner Millennium using FHIR APIs for seamless healthcare data interoperability.
Custom EHR
Support for any EHR system using standard FHIR or HL7 protocols.
FHIR/HL7 Compatibility
Hablr supports the following FHIR R4 resources for healthcare data exchange:
| FHIR Resource | Description |
|---|---|
Patient | Demographics, identifiers, and contact information |
Encounter | Healthcare interactions and visits |
Observation | Clinical observations and measurements |
Condition | Diagnoses and health conditions |
CarePlan | Care plans and treatment goals |
ServiceRequest | Referrals and service orders |
{
"resourceType": "Patient",
"id": "example-patient",
"identifier": [
{
"system": "http://hospital.example.org/mrn",
"value": "12345"
}
],
"name": [
{
"family": "Smith",
"given": ["John", "Michael"]
}
],
"telecom": [
{
"system": "phone",
"value": "+1-555-555-5555",
"use": "mobile"
}
],
"birthDate": "1980-01-15",
"address": [
{
"line": ["123 Main St"],
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}
]
}Configuration Steps
Follow these steps to configure your EHR integration:
- Register your SMART on FHIR application
Work with your EHR vendor to register Hablr as an authorized application.
- Configure FHIR endpoint
Enter your EHR's FHIR base URL in Hablr settings.
- Set up OAuth credentials
Provide the Client ID and Client Secret from your EHR registration.
- Define resource scopes
Select which FHIR resources Hablr should access (Patient, Encounter, etc.).
- Configure data mapping
Map FHIR fields to Hablr contact and interaction fields.
- Test the connection
Use the test feature to verify connectivity and data retrieval.
// SMART on FHIR OAuth 2.0 flow
const FHIR_BASE_URL = "https://ehr.example.com/fhir/r4";
const CLIENT_ID = process.env.EHR_CLIENT_ID;
const REDIRECT_URI = "https://hablr.co/api/integrations/ehr/callback";
// Step 1: Discover authorization endpoints
const metadata = await fetch(`${FHIR_BASE_URL}/metadata`);
const { rest } = await metadata.json();
const security = rest[0].security;
// Step 2: Build authorization URL
const authUrl = new URL(security.extension.find(
e => e.url === "http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris"
).extension.find(e => e.url === "authorize").valueUri);
authUrl.searchParams.set("response_type", "code");
authUrl.searchParams.set("client_id", CLIENT_ID);
authUrl.searchParams.set("redirect_uri", REDIRECT_URI);
authUrl.searchParams.set("scope", "patient/*.read launch/patient");
authUrl.searchParams.set("state", generateSecureState());
authUrl.searchParams.set("aud", FHIR_BASE_URL);Troubleshooting
Common issues and their solutions:
FHIR authentication failing
Verify your SMART on FHIR credentials and ensure the client is registered with the EHR. Check that scopes match the requested resources.
Patient data not found
Confirm the patient identifier format matches the EHR system. Some systems require MRN, others use FHIR IDs.
HL7 message parsing errors
Validate your HL7 message structure using an HL7 validator. Ensure segment terminators and field separators are correct.
HIPAA compliance concerns
Review your BAA agreement with Hablr. Ensure minimum necessary data is being exchanged and audit logs are enabled.