This study aimed to predict the risk of requiring a primary hip or knee replacement 1 and 5 years in advance, using clinical codes.
Primary care clinical codes, sourced from ResearchOne Electronic Health Records between 1999 and 2014, were used to represent patient pathways prior to hip or knee replacement. Patient records were used to train and test models for hip or knee replacement, 1 and 5 years in advance. Temporal graphs were constructed from clinical codes to predict hip and knee replacement risk, where nodes are clinical codes, and edges are the time between primary care visits. Hip and knee replacement cases were matched to controls by age, sex and Index of Multiple Deprivation. The model was validated on unseen data, with performance measured using area under the receiver operator curve (AUROC), calibration and area under the precision recall curve (AUPRC), recalibrating for class imbalance.
For knee replacement prediction, AUROC was 0.915 (95% CI 0.914, 0.916) (1 year) and 0.955 (95% CI 0.954, 0.956) (5 years) with AUPRCs of 0.353 (95% CI 0.302, 0.403) and 0.442 (95% CI 0.382, 0.503), respectively. For hip replacement prediction, AUROC was 0.919 (95% CI 0.918, 0.920) (1 year) and 0.967 (95% CI 0.966, 0.968) (5 years), with AUPRCs of 0.409 (95% CI 0.366, 0.451) and 0.879 (95% CI 0.833, 0.924), respectively.
Hip and knee replacement risk can be predicted up to 5 years in advance, with a temporal-graph based artificial intelligence model achieving the best performance. This may be used for planning preventative treatment or triaging patients.

Theme Lead