Abstract 4371591: Automated End-to-End Framework for Extracting Raw ECG Waveforms and ST Segment Values from ECG Reports and Predicting ST Elevation by Machine Learning
Abstract
Background: Manual analysis of ECG reports can be time-consuming and difficult to perform. Machine learning (ML) models have shown higher success when trained on raw time-series rather than images. There is need for an end-to-end approach that starts from extraction of raw data from ECG reports and also predicts ECG features using ML. Hypothesis: A novel automated method that extracts and parses raw time-series ECG data and associated text/numeric data of ST-segment values from PDF ECG reports, may enable prediction of ST elevation by ML. Methods: We collected stress test ECG reports from N=7,622 patients. We split the dataset into 60% for training, 10% for validation and 30% for testing the ML model (fig A). We developed an automated extraction algorithm to extract ECG waveforms and ST elevation values for each stage (baseline, worst case exercise, etc.) of stress test from the PDF ECG reports (fig B). The algorithm uses metadata detection and spatial colocalization techniques to export the ECGs and ST values as JSON files. We then used the ECGs from JSON files to train a Convolutional Neural Network model to predict the max ST value. Performance of extraction algorithm was assessed by visual review of thirty cases comparing the extracted output in fig C to the original PDF. ML model’s performance was assessed using RMSE score and AUROC for predicting max ST value. Results: Review of thirty reports showed a complete accurate match between the original PDF and the extracted results. Figure C shows an example result, where the arrows pointing from a text object to the ECG time-series indicate the respective associations. Fig D shows a truncated output JSON file which was used for ML modeling. The maximum ST value was mostly seen in leads II and V3. ML showed an RMSE of 1.66 on the hold-out test set, and an AUROC of 0.897 (fig E). Conclusion: An automated end-to-end tool that converts PDF vector objects to voltage time series allows preprocessing of raw electrocardiograms for physiological studies and machine learning.
Article Details
Authors (14)
Prasanth Ganesan
Department of Medicine (R.A.A., S.B., K.A.B., X.L., P.G., A.C.P., E.A.A., P.J.W., M.V.P., S.M.N., A.J.R.), Stanford University, CA.
Xichong Liu
Department of Medicine (R.A.A., S.B., K.A.B., X.L., P.G., A.C.P., E.A.A., P.J.W., M.V.P., S.M.N., A.J.R.), Stanford University, CA.
Sabyasachi Bandyopadhyay
Rayan Ansari
Stanford University, Chatsworth, California, United States
Sulaiman Somani
Stanford Health Care, Stanford, California, United States
Kelly Brennan
Stanford University, San Francisco, California, United States
Alexander Karius
Johns Hopkins School of Medicine, Baltimore, Maryland, United States
Tina Baykaner
Stanford University, Stanford, California, United States
Alexander Perino
Stanford University, Stanford, California, United States
Paul Wang
Stanford University, Stanford, California, United States
Euan Ashley
Marco Perez
Stanford University, Stanford, CA, USA.
Sanjiv Narayan
STANFORD MEDICINE, Stanford, California, United States
Albert Rogers
Stanford University, Redwood City, California, United States