Opal: an implementation science tool for machine learning clinical decision support in anesthesia

Andrew Bishara, Andrew Wong, Linshanshan Wang, Manu Chopra, Wudi Fan, Alan J. Lin, Nicholas Fong, Aditya Palacharla, Jon Spinner, Rachelle Armstrong, Mark J. Pletcher, Dmytro Lituiev, Dexter Hadley, Atul J. ButteJournal of Clinical Monitoring and Computing 2021

Abstract

Opal is the first published example of a full-stack platform infrastructure for an implementation science designed for ML in anesthesia that solves the problem of leveraging ML for clinical decision support. Users interact with a secure online Opal web application to select a desired operating room (OR) case cohort for data extraction, visualize datasets with built-in graphing techniques, and run in-client ML or extract data for external use. Opal was used to obtain data from 29,004 unique OR cases from a single academic institution for pre-operative prediction of post-operative acute kidney injury (AKI) based on creatinine KDIGO criteria using predictors which included pre-operative demographic, past medical history, medications, and flowsheet information. To demonstrate utility with unsupervised learning, Opal was also used to extract intra-operative flowsheet data from 2995 unique OR cases and patients were clustered using PCA analysis and k-means clustering. A gradient boosting machine model was developed using an 80/20 train to test ratio and yielded an area under the receiver operating curve (ROC-AUC) of 0.85 with 95% CI [0.80-0.90]. At the default probability decision threshold of 0.5, the model sensitivity was 0.9 and the specificity was 0.8. K-means clustering was performed to partition the cases into two clusters and for hypothesis generation of potential groups of outcomes related to intraoperative vitals. Opal's design has created streamlined ML functionality for researchers and clinicians in the perioperative setting and opens the door for many future clinical applications, including data mining, clinical simulation, high-frequency prediction, and quality improvement.

Introduction

While the medical literature is replete with machine learning (ML) models capable of predicting patient outcomes with high accuracy, very few of these models successfully transition into the operating room. This "implementation gap" stems from technical and structural challenges: Electronic Health Record (EHR) data is often siloed and messy, clinicians frequently lack the specialized coding skills required for complex data pipelines, and real-time integration into clinical workflows is computationally difficult. Opal was developed to bridge this gap by providing a user-friendly, full-stack infrastructure that handles data extraction, processing, and model deployment.

Methods and System Architecture

Opal is a full-stack web application consisting of a JavaScript web client and a PostgreSQL database backend. The system architecture follows a three-phase workflow designed to streamline the research-to-clinical pipeline.

Opal System Architecture: The three-phase workflow including cohort selection, data extraction, and clinical prediction.

Phase 1: Cohort Selection

Users interact with a dashboard to filter cases by demographics, procedures, or lab values. Opal generates dynamic SQL queries in the background, allowing users to estimate sample sizes in real-time without writing code.

Opal Demographics Selection Interface: A user-friendly dashboard for filtering patient cohorts by age, weight, BMI, and gender.

Phase 2: Data Extraction and Visualization

Once a cohort is selected, Opal performs automated data cleaning, including regression imputation for missing values, merging duplicate medication names, and validating lab ranges. It provides "case review" visualizations, such as vitals and fluid timelines, to help clinicians validate the data.

Phase 3: Clinical Prediction

Opal supports both supervised and unsupervised learning. It integrates algorithms such as Logistic Regression, Random Forest, and Gradient Boosting Machines (GBM). Predictions are performed within the client-side JavaScript web browser, ensuring high accessibility across devices within a secure hospital network.

Results

The utility of Opal was demonstrated through two primary use cases using data from the University of California, San Francisco (UCSF) health system (29,004 unique OR cases between 2016 and 2019).

  1. Supervised Learning (AKI Prediction): Using a Gradient Boosting Machine (XGBoost) trained on 155 clinical variables from 8,858 cases, the model achieved an ROC-AUC of 0.85 (95% CI [0.80–0.90]). At a decision threshold of 0.5, the model showed a sensitivity of 0.9 and a specificity of 0.8, significantly outperforming a standard logistic regression model (AUC 0.73).
  2. Unsupervised Learning (Clustering): Using PCA and K-means clustering on 2,995 cases, Opal successfully partitioned patients into two distinct groups based on intraoperative vitals, demonstrating its potential for hypothesis generation regarding physiological responses during surgery.

Discussion and Future Work

Opal addresses the "black box" problem of clinical ML by providing immediate visual feedback, fostering trust through transparency. By automating pre-processing and providing an in-client prediction environment, it lowers the barrier to entry for clinical researchers.

However, limitations remain. Opal is currently tailored to the UCSF EHR system, and its performance is inherently tied to the quality of the original EHR data. Future development aims to integrate high-frequency waveform data and expand the library of supported architectures to include deep neural networks. Opal represents a significant step toward making machine learning a practical, everyday tool in the perioperative setting.

Summary updated

BibTeX
@article{bishara2021opal,
  author = {Andrew Bishara and Andrew Wong and Linshanshan Wang and Manu Chopra and Wudi Fan and Alan J. Lin and Nicholas Fong and Aditya Palacharla and Jon Spinner and Rachelle Armstrong and Mark J. Pletcher and Dmytro Lituiev and Dexter Hadley and Atul J. Butte},
  title = {{Opal: an implementation science tool for machine learning clinical decision support in anesthesia}},
  journal = {Journal of Clinical Monitoring and Computing},
  year = {2021},
  doi = {10.1007/s10877-021-00774-1},
}
Figure