Why EHR Integration Matters
A RAF Score API is a programmatic interface that calculates a patient's Risk Adjustment Factor score in real time by processing ICD-10 diagnoses against the CMS-HCC payment model. Integrating a RAF Score API into EHR workflows enables providers to see current risk scores, HCC gaps, and suspect conditions at the point of care, shifting risk adjustment from a retrospective back-office function to a real-time clinical process.
Risk adjustment has traditionally operated as a back-office function — coders review charts after the visit, identify HCCs, and submit diagnoses weeks or months after the clinical encounter. This retrospective model creates inherent gaps: conditions not documented during the visit cannot be coded after the fact without clinical support, and providers have no real-time visibility into which conditions need attention.
Integrating a RAF Score API directly into the EHR changes this dynamic. When providers can see a patient's current RAF score, identified HCC gaps, and suspect conditions as they open the chart, documentation accuracy improves at the point of care rather than through retrospective correction. This aligns with the broader shift toward RAF score automation in healthcare operations.
The business case is straightforward. Organizations that deploy real-time RAF scoring within EHR workflows report 15-25% improvements in HCC recapture rates, 30-40% reductions in retrospective chart review volume, and measurably faster time-to-submission for risk adjustment data. The ROI comes from capturing legitimate risk value at the moment when clinical documentation is being created.
Real-Time Scoring
RAF Score APIs return calculated risk scores in under 500 milliseconds, enabling real-time display within provider workflows without disrupting clinical pace or EHR performance.
Standards-Based
Modern RAF Score APIs support FHIR R4, SMART on FHIR, OAuth 2.0, and RESTful architectures — aligning with the ONC interoperability standards that Epic, Cerner, and other EHR platforms natively support.
EHR Integration Architecture
Before selecting an integration pattern, engineering teams must understand the architectural options available for connecting a healthcare API to an EHR system. The right approach depends on the EHR platform, organizational infrastructure, and clinical workflow requirements.
- SMART on FHIR Launch: The most standardized approach. The RAF Score application is registered as a SMART app within the EHR. When a provider opens a patient chart, the EHR launches the app in context, passing patient identifiers via the FHIR authorization flow. The app retrieves patient data, calls the RAF Score API, and renders results within the EHR interface. This pattern works across any EHR that supports SMART on FHIR — including Epic, Cerner, and Allscripts.
- Embedded Web Component: The RAF Score interface is embedded as an iframe or web component within the EHR's activity or sidebar. This approach provides tighter visual integration than a launched SMART app and can be configured to load automatically when specific chart sections are accessed. It requires EHR-specific configuration but offers a more seamless user experience.
- Background Service Integration: The RAF Score API runs as a background service that calculates scores whenever clinical data changes — problem list updates, new encounters, diagnosis additions. Results are written back to the EHR as structured data (custom fields, health maintenance alerts, or BPA triggers) rather than displayed in a separate interface. This pattern is invisible to the provider but drives automated workflows.
- Middleware/Integration Engine: For organizations with existing integration engines (MuleSoft, Rhapsody, InterSystems HealthShare), the RAF Score API can be called as a step in existing HL7v2 or FHIR message processing pipelines. This is particularly useful when RAF scoring needs to integrate with multiple downstream systems — population health platforms, care management tools, and analytics warehouses.
Each pattern has trade-offs in implementation complexity, maintenance burden, and user experience. The developer guide provides detailed technical specifications for each approach.
Epic Integration Patterns
Epic holds approximately 35% of the US hospital EHR market and a significant share of ambulatory installations. Integration with Epic follows well-defined pathways that Epic has established through its App Orchard (now App Market) program and open API framework.
- App Market Listing: The preferred path for broad deployment. RAF Score applications listed in Epic's App Market undergo Epic's review process and can be activated by any Epic customer organization. The listing provides visibility, trust, and simplified procurement for health systems.
- SMART on FHIR via Epic: Epic supports SMART on FHIR launch from multiple clinical contexts — the Storyboard (patient summary), chart review, encounters, and the health maintenance module. The RAF Score app receives a launch context containing the patient's FHIR ID, then retrieves Condition, Patient, and Coverage resources to assemble the API request.
- Best Practice Advisory (BPA): Epic's BPA framework can trigger alerts based on RAF Score API results. For example, a BPA can fire when a patient's current-year RAF score is significantly lower than the prior year, indicating potential HCC recapture gaps. BPAs require Epic build configuration but integrate directly into the provider's clinical decision support workflow.
- Epic MyChart Integration: For patient-facing use cases, RAF Score insights can inform MyChart health summaries and care gap notifications. While patients do not see raw RAF scores, the underlying gap analysis can drive condition-specific educational content and appointment reminders.
- Bulk FHIR for Population Analysis: Epic's Bulk FHIR export capability enables organizations to extract patient data for population-level RAF scoring. This supports use cases like pre-visit planning, panel-level risk stratification, and care gap prioritization where real-time, per-patient scoring is not required.
Three downloads risk adjustment teams actually use
Checklists, playbooks, and frameworks — built for analysts, auditors, and VPs working RAF, RADV, and HCC.
2026 RADV Audit Readiness Checklist
12-point compliance checklist for documentation, diagnosis code validation, extrapolation defense, and pre-audit scrub workflows.
RAF Score Optimization Playbook
Tactical guide for analysts: HCC recapture workflows, V28 transition impacts, prospective gap-closure plays, and KPIs that move RAF lift.
Risk Adjustment Analytics Playbook
How payer leaders sequence prospective and retrospective risk adjustment for compounding RAF lift. Deployment patterns, KPIs, and a VP-level operating rhythm.
Cerner and Oracle Health Integration
Following Oracle's acquisition of Cerner, the platform — now branded as Oracle Health — maintains robust API capabilities while undergoing infrastructure modernization. Integration patterns for RAF Score APIs leverage both legacy Cerner interfaces and Oracle's cloud-native capabilities.
- SMART on FHIR Support: Oracle Health supports SMART on FHIR app launch with R4 resource compatibility. The integration flow mirrors Epic's pattern — app registration, authorization via OAuth 2.0, context-aware launch, and FHIR resource retrieval. The RAF Score API receives standardized Patient and Condition data regardless of the underlying EHR.
- MPages Framework: Cerner's MPages (now Oracle Health Pages) provides a custom component framework for embedding web applications within the clinical workflow. RAF Score interfaces can be built as MPages components that render within the patient chart, orders workflow, or documentation screens.
- Oracle Health Data Intelligence: Oracle's cloud analytics layer provides another integration pathway. RAF Score API results can be stored in Oracle Health Data Intelligence for population-level analysis, trending, and reporting. This is particularly useful for risk adjustment operations teams who need aggregate views rather than real-time clinical alerts.
- CDS Hooks: Oracle Health supports CDS Hooks — a standard for clinical decision support that triggers external services at defined workflow points. A CDS Hook can invoke the RAF Score API when a provider opens a patient chart (patient-view hook) or enters an order (order-select hook), returning actionable cards that display within the EHR.
The healthcare API developer playbook covers authentication, rate limiting, and error handling patterns specific to Oracle Health environments.
Custom EHR Integration
Not all organizations run Epic or Oracle Health. Community health centers, specialty practices, and smaller health systems often use platforms like athenahealth, eClinicalWorks, NextGen, or proprietary systems. RAF Score API integration for these environments requires a more flexible approach.
- REST API Direct Integration: Any system capable of making HTTPS requests can integrate with a RESTful RAF Score API. The integration sends a JSON payload containing patient demographics and diagnosis codes, and receives a JSON response with the calculated RAF score, contributing HCCs, and identified care gaps. No FHIR capability required.
- HL7v2 Interface: For EHR systems that primarily communicate via HL7v2 messages, an integration engine can intercept ADT (admit/discharge/transfer) or ORU (observation result) messages, extract relevant diagnosis data, call the RAF Score API, and write results back as OBX segments or custom Z-segments.
- Webhook-Based Architecture: Configure the EHR to send webhook notifications when clinical events occur — new encounters, problem list updates, or chart closures. A middleware service receives the webhook, retrieves the necessary patient data, calls the RAF Score API, and stores results for clinical or operational consumption.
- Batch Processing Pipeline: For organizations where real-time scoring is not feasible due to technical constraints, a nightly batch process can extract patient data, calculate RAF scores for the entire panel, and push results back to the EHR as structured data. This supports pre-visit planning and population health workflows without requiring real-time API calls.
Testing and Validation
EHR integration testing for RAF Score APIs must cover functional accuracy, performance, security, and clinical workflow impact. A structured testing approach prevents deployment failures that erode provider trust.
- Calculation Accuracy Validation: Test the API with known input-output pairs across all CMS-HCC model segments — community non-dual, community dual, institutional, and ESRD. Verify that calculated RAF scores match CMS-published coefficients. Even small rounding differences can compound across large populations.
- Performance Testing: Measure API response times under realistic concurrency. A clinic with 20 providers opening charts simultaneously generates 20 concurrent API calls. Response times must remain under 500 milliseconds at peak load to avoid provider workflow disruption.
- FHIR Resource Handling: Validate that the integration correctly handles variations in FHIR resource formatting — different code systems for diagnoses (ICD-10-CM vs. SNOMED), varying date formats, missing optional fields, and resources with extension elements. EHR implementations of FHIR are not perfectly uniform.
- Error Handling and Graceful Degradation: Test behavior when the API is unavailable, returns errors, or times out. The EHR integration should display cached results or a clear "unavailable" message rather than crashing, displaying error codes to providers, or blocking chart access.
- Security and Compliance: Verify OAuth 2.0 token handling, TLS encryption, PHI data handling, and audit logging. The integration must comply with HIPAA security requirements and the EHR platform's security policies. Penetration testing should confirm that the integration does not introduce vulnerabilities into the EHR environment.
- Clinical Workflow Validation: Have providers use the integration in a staging environment during realistic clinical scenarios. Gather feedback on display placement, information density, alert frequency, and workflow disruption. Provider acceptance is the ultimate test — technically perfect integration that providers ignore delivers zero value.