Development and validation of machine learning models to identify high-risk surgical patients using automatically curated electronic health record data (Pythia): A retrospective, single-site study

Background Pythia is an automated, clinically curated surgical data pipeline and repository housing all surgical patient electronic health record (EHR) data from a large, quaternary, multisite health institute for data science initiatives. In an effort to better identify high-risk surgical patients from complex data, a machine learning project trained on Pythia was built to predict postoperative complication risk. Methods and findings A curated data repository of surgical outcomes was created using automated SQL and R code that extracted and processed patient clinical and surgical data across 37 million clinical encounters from the EHRs. A total of 194 clinical features including patient demographics (e.g., age, sex, race), smoking status, medications, comorbidities, procedure information, and proxies for surgical complexity were constructed and aggregated. A cohort of 66,370 patients that had undergone 99,755 invasive procedural encounters between January 1, 2014, and January 31, 2017, was studied further for the purpose of predicting postoperative complications. The average complication and 30-day postoperative mortality rates of this cohort were 16.0% and 0.51%, respectively. Least absolute shrinkage and selection operator (lasso) penalized logistic regression, random forest models, and extreme gradient boosted decision trees were trained on this surgical cohort with cross-validation on 14 specific postoperative outcome groupings. Resulting models had area under the receiver operator characteristic curve (AUC) values ranging between 0.747 and 0.924, calculated on an out-of-sample test set from the last 5 months of data. Lasso penalized regression was identified as a high-performing model, providing clinically interpretable actionable insights. Highest and lowest performing lasso models predicted postoperative shock and genitourinary outcomes with AUCs of 0.924 (95% CI: 0.901, 0.946) and 0.780 (95% CI: 0.752, 0.810), respectively. A calculator requiring input of 9 data fields was created to produce a risk assessment for the 14 groupings of postoperative outcomes. A high-risk threshold (15% risk of any complication) was determined to identify high-risk surgical patients. The model sensitivity was 76%, with a specificity of 76%. Compared to heuristics that identify high-risk patients developed by clinical experts and the ACS NSQIP calculator, this tool performed superiorly, providing an improved approach for clinicians to estimate postoperative risk for patients. Limitations of this study include the missingness of data that were removed for analysis. Conclusions Extracting and curating a large, local institution’s EHR data for machine learning purposes resulted in models with strong predictive performance. These models can be used in clinical settings as decision support tools for identification of high-risk patients as well as patient evaluation and care management. Further work is necessary to evaluate the impact of the Pythia risk calculator within the clinical workflow on postoperative outcomes and to optimize this data flow for future machine learning efforts.

[1]  M. Howell,et al.  Resolving the Productivity Paradox of Health Information Technology: A Time for Optimism. , 2018, JAMA.

[2]  D. Teoh,et al.  Evaluation of the performance of the ACS NSQIP surgical risk calculator in gynecologic oncology patients undergoing laparotomy. , 2016, Gynecologic oncology.

[3]  Jeffrey Dean,et al.  Scalable and accurate deep learning with electronic health records , 2018, npj Digital Medicine.

[4]  Travis P. Webb,et al.  Postoperative Complications of Laparoscopic Cholecystectomy for Acute Cholecystitis: A Comparison to the ACS-NSQIP Risk Calculator and the Tokyo Guidelines , 2017, World Journal of Surgery.

[5]  S. Hohmann,et al.  Association of hospital participation in a surgical outcomes monitoring program with inpatient complications and mortality. , 2015, JAMA.

[6]  Tianqi Chen,et al.  XGBoost: A Scalable Tree Boosting System , 2016, KDD.

[7]  D. Bates,et al.  Big data in health care: using analytics to identify and manage high-risk and high-cost patients. , 2014, Health affairs.

[8]  Michael J Pencina,et al.  Risk Prediction With Electronic Health Records: The Importance of Model Validation and Clinical Context. , 2016, JAMA cardiology.

[9]  K. Hammermeister,et al.  Surgical Risk Preoperative Assessment System (SURPAS): III. Accurate Preoperative Prediction of 8 Adverse Outcomes Using 8 Predictor Variables , 2016, Annals of surgery.

[10]  Leo Breiman,et al.  Random Forests , 2001, Machine Learning.

[11]  T. Osler,et al.  Complications in surgical patients. , 2002, Archives of surgery.

[12]  Jamie E. Anderson,et al.  Using electronic health records for surgical quality improvement in the era of big data. , 2015, JAMA surgery.

[13]  George Hripcsak,et al.  Caveats for the use of operational electronic health record data in comparative effectiveness research. , 2013, Medical care.

[14]  Andrew M Ryan,et al.  Association of hospital participation in a quality reporting program with surgical outcomes and expenditures for Medicare beneficiaries. , 2015, JAMA.

[15]  R. Tibshirani Regression Shrinkage and Selection via the Lasso , 1996 .

[16]  W. Henderson,et al.  Hospital costs associated with surgical complications: a report from the private-sector National Surgical Quality Improvement Program. , 2004, Journal of the American College of Surgeons.

[17]  S. Broderick,et al.  The National Surgical Quality Improvement Program risk calculator does not adequately stratify risk for patients with clinical stage I non-small cell lung cancer. , 2016, The Journal of thoracic and cardiovascular surgery.

[18]  J. Friedman Stochastic gradient boosting , 2002 .

[19]  Marianne Huebner,et al.  Leveraging electronic health records for predictive modeling of post-surgical complications , 2018, Statistical methods in medical research.

[20]  M. Cannesson,et al.  The perioperative surgical home: An innovative, patient-centred and cost-effective perioperative care model. , 2016, Anaesthesia, critical care & pain medicine.

[21]  Andy Liaw,et al.  Classification and Regression by randomForest , 2007 .

[22]  Trevor Hastie,et al.  Regularization Paths for Generalized Linear Models via Coordinate Descent. , 2010, Journal of statistical software.

[23]  A. Senagore,et al.  Use of the American College of Surgeons NSQIP Surgical Risk Calculator for Laparoscopic Colectomy: how good is it and how can we improve it? , 2015, Journal of the American College of Surgeons.

[24]  C. Ko,et al.  Development and evaluation of the universal ACS NSQIP surgical risk calculator: a decision aid and informed consent tool for patients and surgeons. , 2013, Journal of the American College of Surgeons.

[25]  I. Kohane,et al.  Escaping the EHR trap--the future of health IT. , 2012, The New England journal of medicine.

[26]  M. Sendak,et al.  Barriers to Achieving Economies of Scale in Analysis of EHR Data. A Cautionary Tale. , 2017, Applied clinical informatics.

[27]  C. Steiner,et al.  Comorbidity measures for use with administrative data. , 1998, Medical care.

[28]  M. Neuman,et al.  Can routine preoperative data predict adverse outcomes in the elderly? Development and validation of a simple risk model incorporating a chart-derived frailty score. , 2014, Journal of the American College of Surgeons.

[29]  Phillip L. Liu,et al.  Association of Integrated Care Coordination With Postsurgical Outcomes in High-Risk Older Adults: The Perioperative Optimization of Senior Health (POSH) Initiative , 2018, JAMA surgery.

[30]  José Luis Rojo-Álvarez,et al.  Predicting colorectal surgical complications using heterogeneous clinical data and kernel methods , 2016, J. Biomed. Informatics.

[31]  S. R. Moonesinghe,et al.  Development and validation of the Surgical Outcome Risk Tool (SORT) , 2014, The British journal of surgery.

[32]  Giovanni Filardo,et al.  Consequences for healthcare quality and research of the exclusion of records from the Death Master File. , 2013, Circulation. Cardiovascular quality and outcomes.