The Journal of Arthroplasty , Volume 34 , Issue 4 , 632 - 637

Development and Validation of a Machine Learning Algorithm After Primary Total Hip Arthroplasty: Applications to Length of Stay and Payment Models

Ramkumar, Prem N. et al.


Value-based payment programs in orthopedics, specifically primary total hip arthroplasty (THA), present opportunities to apply forecasting machine learning techniques to adjust payment models to a specific patient or population. The objective of this study is to (1) develop and validate a machine learning algorithm using preoperative big data to predict length of stay (LOS) and patient-specific inpatient payments after primary THA and (2) propose a risk-adjusted patient-specific payment model (PSPM) that considers patient comorbidity.


Using an administrative database, we applied 122,334 patients undergoing primary THA for osteoarthritis between 2012 and 16 to a naïve Bayesian model trained to forecast LOS and payments. Performance was determined using area under the receiver operating characteristic curve and percent accuracy. Inpatient payments were grouped as <$12,000, $12,000-$24,000, and >$24,000. LOS was grouped as 1-2, 3-5, and 6+ days. Payment model uncertainty was applied to a proposed risk-based PSPM.


The machine learning algorithm required age, race, gender, and comorbidity scores (“risk of illness” and “risk of morbidity”) to demonstrate excellent validity, reliability, and responsiveness with an area under the receiver operating characteristic curve of 0.87 and 0.71 for LOS and payment. As patient complexity increased, error for predicting payment increased in tiers of 3%, 12%, and 32% for moderate, major, and extreme comorbidities, respectively.


Our preliminary machine learning algorithm demonstrated excellent construct validity, reliability, and responsiveness predicting LOS and payment prior to primary THA. This has the potential to allow for a risk-based PSPM prior to elective THA that offers tiered reimbursement commensurate with case complexity.

Level of Evidence


Download article