NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DEPLOYR: A technical framework for deploying custom real-time machine learning models into the electronic medical record

Conor K. Corbin, Rob Maclay, Aakash Acharya, Sreedevi Mony, Soumya Punnathanam, Rahul Thapa, Nikesh Kotecha, Nigam H. Shah, Jonathan H. Chen · DOI

Introduction

In the current landscape of healthcare AI, there is a stark contrast between the proliferation of research and its clinical application. Despite the publication of over 250,000 articles on clinical risk-stratification models, the vast majority of these algorithms never reach the bedside—a phenomenon often referred to as the "model graveyard." This implementation gap is primarily driven by the technical complexity of moving models from "clean" retrospective research environments into the messy, transactional reality of production Electronic Medical Records (EMRs).

DEPLOYR is an end-to-end technical framework designed to bridge this gap. It provides a standardized architecture for the real-time deployment, integration, and monitoring of custom machine learning models within the Epic EMR system. By offering a blueprint for data mapping, triggering, and prospective performance tracking, DEPLOYR enables researchers to transition models from the lab to live clinical environments while ensuring they remain accurate, fair, and safe.

The DEPLOYR Architecture

The framework is built as a modular system consisting of three primary software components, designed to handle the lifecycle of a clinical model from development to maintenance:

  1. DEPLOYR-dev: A Python-based package dedicated to model development and retrospective validation. It ensures that the initial training phase is structured in a way that anticipates the requirements of a live environment.
  2. DEPLOYR-serve: This component utilizes Azure Function applications to expose trained models as REST APIs. Its most critical function is "data mapping"—the process of ensuring that raw, real-time data streaming from the EMR at the moment of inference is transformed to match the exact feature set the model encountered during training.
  3. DEPLOYR-dash: A real-time monitoring dashboard built with Streamlit. It tracks model performance, feature distributions, and group fairness metrics. This allows clinical teams to detect "data drift" or performance decay immediately, rather than months after a model has been deployed.

Integration and Triggers

DEPLOYR supports two primary methods for model activation within the clinical workflow:

  • Event-based triggers: The model is invoked by specific clinician actions, such as clicking a button to sign an order.
  • Time-based triggers: The model runs at scheduled intervals, such as evaluating all patients in an Intensive Care Unit (ICU) every 15 minutes.

Crucially, the framework supports "silent deployment." In this mode, the model generates predictions in the background without displaying results to clinicians. This allows for rigorous prospective evaluation and safety testing before the model is allowed to influence patient care.

Experimental Evaluation

To test the framework, the authors utilized the Stanford Medicine Research data Repository (STARR), which contains de-identified EMR data from over 2.4 million patients. The framework was evaluated using 12 binary classifiers designed to predict abnormal laboratory results (e.g., Hematocrit, Creatinine, Potassium) to identify potentially redundant or wasteful diagnostic testing.

Following retrospective training, the models underwent a "silent trial" at Stanford Health Care between January and February 2023. During this phase, real-time data was sourced directly from Epic Chronicles, the EMR's transactional database, to test the models in a live production environment.

Key Insights: The Retrospective-Prospective Gap

A primary finding of the DEPLOYR study is the significant discrepancy between retrospective and prospective performance. In nearly every case, model performance—measured by the Area Under the Receiver Operating Characteristic (AUROC)—was lower during the live trial than in retrospective testing. For example, the White Blood Cell (WBC) model dropped from an AUROC of 0.76 in retrospective validation to 0.69 in the prospective trial.

This "performance decay" highlights why silent trials are mandatory. Discrepancies often arise from data drift, subtle changes in how clinicians record data in real-time versus how it is archived in research warehouses, or faulty cohort designs that only become apparent in a live setting.

Results and Feasibility

The study successfully demonstrated that DEPLOYR could facilitate the deployment of multiple ML models with significantly reduced IT overhead. By leveraging cloud-based serverless functions (Azure) and standard APIs (FHIR), the framework bypasses many of the traditional infrastructure barriers associated with EMR integration. Furthermore, by making fairness a "first-class citizen" through the DEPLOYR-dash, the system ensures that models do not develop demographic biases post-deployment.

Limitations and Future Directions

While DEPLOYR represents a significant step forward, it currently faces some limitations:

  • Vendor Specificity: The framework is currently optimized for the Epic EMR. While it uses FHIR standards, adapting it to other vendors like Cerner would require additional API mapping.
  • Data Modalities: The current iteration focuses on structured data (labs and vitals). Future versions will need to incorporate unstructured clinical notes and medical imaging.
  • Clinical Impact: This research focused on the technical success of deployment. The next phase of the project involves evaluating the actual clinical impact—proving that these models improve patient outcomes or reduce healthcare costs through randomized controlled trials.

By providing a transparent, reproducible pathway for deployment, DEPLOYR aims to turn the "model graveyard" into a launchpad for validated, high-impact clinical AI.

Summary updated

BibTeX
@article{corbin2023deployr,
  author = {Conor K. Corbin and Rob Maclay and Aakash Acharya and Sreedevi Mony and Soumya Punnathanam and Rahul Thapa and Nikesh Kotecha and Nigam H. Shah and Jonathan H. Chen},
  title = {{DEPLOYR: A technical framework for deploying custom real-time machine learning models into the electronic medical record}},
  journal = {J. Am. Medical Informatics Assoc.},
  year = {2023},
  doi = {10.1093/jamia/ocad114},
}
Figure