Development and validation of prediction models to estimate risk of primary total hip and knee replacements using data from the UK: two prospective open cohorts using the UK Clinical Practice Research Datalink

Objectives The ability to efficiently and accurately predict future risk of primary total hip and knee replacement (THR/TKR) in earlier stages of osteoarthritis (OA) has potentially important applications. We aimed to develop and validate two models to estimate an individual’s risk of primary THR and TKR in patients newly presenting to primary care. Methods We identified two cohorts of patients aged ≥40 years newly consulting hip pain/OA and knee pain/OA in the Clinical Practice Research Datalink. Candidate predictors were identified by systematic review, novel hypothesis-free ‘Record-Wide Association Study’ with replication, and panel consensus. Cox proportional hazards models accounting for competing risk of death were applied to derive risk algorithms for THR and TKR. Internal–external cross-validation (IECV) was then applied over geographical regions to validate two models. Results 45 predictors for THR and 53 for TKR were identified, reviewed and selected by the panel. 301 052 and 416 030 patients newly consulting between 1992 and 2015 were identified in the hip and knee cohorts, respectively (median follow-up 6 years). The resultant model C-statistics is 0.73 (0.72, 0.73) and 0.79 (0.78, 0.79) for THR (with 20 predictors) and TKR model (with 24 predictors), respectively. The IECV C-statistics ranged between 0.70–0.74 (THR model) and 0.76–0.82 (TKR model); the IECV calibration slope ranged between 0.93–1.07 (THR model) and 0.92–1.12 (TKR model). Conclusions Two prediction models with good discrimination and calibration that estimate individuals’ risk of THR and TKR have been developed and validated in large-scale, nationally representative data, and are readily automated in electronic patient records.


AbsTrACT
Objectives The ability to efficiently and accurately predict future risk of primary total hip and knee replacement (THR/TKR) in earlier stages of osteoarthritis (Oa) has potentially important applications. We aimed to develop and validate two models to estimate an individual's risk of primary THR and TKR in patients newly presenting to primary care. Methods We identified two cohorts of patients aged ≥40 years newly consulting hip pain/Oa and knee pain/ Oa in the Clinical Practice Research Datalink. Candidate predictors were identified by systematic review, novel hypothesis-free 'Record-Wide association study' with replication, and panel consensus. Cox proportional hazards models accounting for competing risk of death were applied to derive risk algorithms for THR and TKR. internal-external cross-validation (ieCV) was then applied over geographical regions to validate two models. results 45 predictors for THR and 53 for TKR were identified, reviewed and selected by the panel. 301 052 and 416 030 patients newly consulting between 1992 and 2015 were identified in the hip and knee cohorts, respectively (median follow-up 6 years). The resultant model C-statistics is 0.73 (0.72, 0.73) and 0.79 (0.78, 0.79) for THR (with 20 predictors) and TKR model (with 24 predictors), respectively. The ieCV C-statistics ranged between 0.70-0.74 (THR model) and 0.76-0.82 (TKR model); the ieCV calibration slope ranged between 0.93-1.07 (THR model) and 0.92-1.12 (TKR model).
Conclusions Two prediction models with good discrimination and calibration that estimate individuals' risk of THR and TKR have been developed and validated in large-scale, nationally representative data, and are readily automated in electronic patient records.

InTrOduCTIOn
Osteoarthritis (OA) is the most common form of arthritis and a leading cause of disability in populations worldwide. 1 Although characterised as a slowly progressive condition, recent studies have highlighted substantial heterogeneity between groups of patients in the course of symptoms, 2-4 function 5 and structural disease. 6 Healthcare costs attributed to OA, driven largely by primary and revision arthroplasty, 7 appear concentrated in a minority of patients. 8 The development and application of prognostic models capable of identifying patients with OA at high risk of future progression is now recognised as a priority internationally and by patients, carers and health and social care professionals. 9 Such models could have important clinical and research applications: better targeting of intensive non-surgical care; selection of patients for active monitoring;

Key messages
What is already known about this subject? ► The majority of primary total hip replacement (THR) and primary total knee replacement (TKR) were performed for patients with endstage osteoarthritis in the UK, but clinical risk predictions of THR and TKR in patients who newly presenting hip pain/osteoarthritis and knee pain/osteoarthritis at the primary care settings have not been developed.
What does this study add? ► A novel approach for predictor selection has been developed. Two risk prediction models based on clinical variables that are available in the UK primary care electronic health record have been developed and validated. These algorithms can be used to inform clinical decision making, for example targeting intensive non-surgical management at patients identified at high risk of future primary THR or TKR.
How might this impact on clinical practice? ► These algorithms can be used to inform clinical decision making, for example targeting intensive non-surgical management at patients identified at high risk of future primary THR or TKR.
Osteoarthritis timely assessment and discussion of appropriateness for referral and recruitment of 'high-risk' patients as part of efficient clinical trial design evaluating new secondary prevention treatments. Models that rely on pooling data from existing clinical trials and bespoke cohorts may offer the prospect of carefully measured, highly relevant predictors and outcomes, but are limited by the availability of large, long-term studies with sufficient harmonised data. Furthermore, due to the high prevalence of OA and to time and cost constraints, models that require the collection of biomarkers, imaging or lengthy patient-reported instruments are unlikely to be implemented at scale in routine primary care, irrespective of their informativeness in research settings. An alternative approach, and the one chosen in our study, is to investigate whether data already routinely available in large, representative primary electronic healthcare databases could provide accurate predictions which are feasible for implementing in routine primary care. This approach has been used to derive and validate risk algorithms for condition-specific outcomes in other chronic non-communicable diseases and for complex events such as hospital admissions. [10][11][12][13][14][15][16][17][18] We sought to develop and validate multivariable prediction models, based exclusively on information routinely recorded within the primary care electronic health record, to estimate the risk of primary total hip replacement (THR) and total knee replacement (TKR) in patients newly presenting with hip pain/ OA and knee pain/OA in UK primary care. To achieve this, we included a novel approach to identify candidate prognostic factors recorded in the primary care patient record.

MeTHOds data source and study population
We used data from the Clinical Practice Research Datalink (CPRD) covering a representative sample of 7% of the UK general population. 19 The definition 20 and the selection of population were presented in online supplementary technical appendix, figures S1 and S2.

defining THr/TKr
Primary THR and TKR were identified within CPRD using the Read code list developed and applied in CPRD by Culliford and colleagues 21 and validated by Hawley et al. 22 23 Details of outcome definition was presented in online supplementary technical appendix.

Candidate predictors
Candidate predictors were identified from three sources: (i) a systematic review of previously published studies (further details available in online supplementary technical appendix); (ii) potentially relevant general predictors used within 12 QResearch risk algorithms and shown to be feasibly obtained from UK primary care (eg, sociodemographic, lifestyle related, comorbidities) 10-18 24-26 (iii) a hypothesis-free record-wide association study (ReWAS) of all third-level Read morbidity and process of care codes and for prescribed medicine, third-level sections within the British National Formulary which had been recorded in ≥1% of cases in the 3 years prior to date of arthroplasty. There were 6109 third-level Read morbidity and process of care codes and 325 prescribed medications assessed. The ReWAS case-control analysis was conducted in CPRD, with replication of 'hits' in a separate UK regional primary care Electronic Health Record (EHR) dataset-Consultations in Primary Care Archive (further details available in online supplementary technical appendix). Morbidities, processes of care and prescribed medications that were statistically significantly associated with THR or TKR in the screen were taken forward (online supplementary figures S3 and S5 for TKR; online supplementary figures S4 and S6 for THR). The candidate predictors were assessed for clinical relevance by a review panel including seven members (six clinicians and one lay member), and the predictors agreed as relevant by ≥4 members were included in the modelling stage (online supplementary table S1). This process identified 29 candidate predictors for THR and 34 for TKR. These were extracted from records in the 3 years prior to index consultation.

statistical analysis for model derivation
Primary THR and TKR occurring since the patients' index consultation for hip pain/OA and knee pain/OA in primary care were treated as time-to-event outcomes in the THR and TKR models, respectively. Statistical method of predictor selection was presented in online supplementary technical appendix.
We formed the risk (cumulative incidence) equations for predicting an individual's 10-year probability of primary THR and TKR since the index consultation for hip pain/OA and knee pain/OA, by using the developed model's baseline cumulative incidence function (CIF) at 10 years, along with the estimated regression coefficients (β) and the individual's predictor values (X) using the following equation 27 :

Validation of prediction models
We assessed the model discrimination using Harrell's C-statistic and the model calibration using calibration slope (details in online supplementary technical appendix) 28-30 over the 10 years of follow-up.
We assessed the apparent performance of the models; that is, the observed performance in exactly the same data used to develop the model. However, we also used an internal-external cross-validation (IECV) approach (online supplementary technical appendix) to evaluate the two derived prediction models over 13 geographical regions in the UK (presented in table 1). [31][32][33] Multiple imputation using chained equations was applied to handle missing values, and the imputation model included all candidate predictors and outcome (online supplementary technical appendix). 34 Based on the 15 509 THRs and a total of 73 predictor parameters and 18 ,289 TKRs and 79 predictor parameters, we had an effective sample size of 212 events per predictor parameter for the THR derivation cohort and 232 events per predictor parameter for the TKR derivation cohort, above the minimum requirement suggested by Peduzzi. 35 In a sensitivity analysis, we assessed the models' performances when including patients with a THR and TKR within the first 2 years after the index consultation (an exclusion criteria for the main analysis). In the other sensitivity analysis, we derived model coefficients by applying final predictors into patients with a THR and TKR within the first 2 years after the index consultation (an exclusion criteria for the main analysis).
We used Stata MP V.15.1 version for all statistical analyses. This study was conducted and reported in line with the transparent reporting of a multivariable prediction model for      (table 2). Oral NSAID and opioid analgesic prescriptions, intra-articular injections and previous arthroscopic knee surgery in the 3 years prior to index consultation were strong predictors of increased risk of future primary TKR. Age and BMI showed non-linear adjusted associations, peaking at 70 years and 40 kg/m 2 respectively (online supplementary figure S8).

Apparent predictive performance of the models
Our final THR prediction model was able to discriminate between patients with and without a primary THR with a C-statistic of 0.73 (95% CI 0.72 to 0.73); our final TKR prediction model was also able to discriminate between patients with and without TKR with a C-statistic of 0.79 (0.78 to 0.79) over the 10-year follow-up period. The calibration slope was 1.00 (0.98 to 1.02) and 1.00 (0.99 to 1.01) for THR and THR, respectively, as we would expect.

Internal-external cross-validation
The internal-external cross-validation revealed that the C-statistic was similar in each of the 13 geographical regions, ranging from 0.70 (0.68 to 0.72) to 0.74 (0.73 to 0.75) for the THR model ( figure 1 left panel) and between 0.76 (0.73 to 0.79) and 0.82 (0.80 to 0.84) for the TKR model ( figure 1 right panel)    . After meta-analysis, the summary calibration slope was 1.00 (0.97 to 1.02) for the THR model and 1.01 (0.98 to 1.04) for the TKR model. If the models were applied in a new (but similar) setting, we would expect the calibration slope to be between 0.94 and 1.05 for the THR model and between 0.98 and 1.12 for the TKR model.
The calibration plot in each validation cohort was presented for one imputed dataset, but comparable to the calibration plots in the other imputations (figure 3 for THR and in figure 4 for TKR). Good agreement between observed and predicted risks was observed in each geographical region cohort for THR. For those at highest risk of TKR (>10th decile), the observed risk was slightly higher than the predicted risk from the model in Northern Ireland, Scotland and Wales. We hypothesised that this slight miscalibration could result from systematic differences between these devolved nations and the English regions in the entry year or follow-up duration. However, on inspection, this was not the case (online supplementary figures S9 and S10).
The sensitivity analysis including patients with early outcomes (THR/TKR within 2 years of index consultation) gave similar levels of discrimination and calibration (online supplementary figure S11 and table S4). Similar model coefficients were derived by applying final predictors into patients with early outcomes (THR/TKR within 2 years of index consultation) (online supplementary table S5).

Clinical examples
Online supplementary tables S6 and S7 give clinical examples of the application of THR and TKR risk prediction models to predict 10-year risk of THR and TKR, with examples chosen to illustrate 'low' and 'high' risk.

dIsCussIOn
We have developed and validated two algorithms to predict the absolute risk of future primary THR and TKR in patients who newly present to UK general practice with hip pain/osteoarthritis and knee pain/osteoarthritis. Internal-external cross-validation showed consistently good calibration when models are applied to the different geographical regions, and the models have good  discrimination with C-statistics of greater than 0.70 for both models. To our knowledge, these are the first such risk prediction tools, for primary THR and TKR in osteoarthritis developed in large-scale cohort data.

strengths and limitations of study
Our study was based on a large, representative and contemporary UK population with data obtained from a validated research database. 19 Risk prediction tools relying on routinely collected primary care data are more readily implementable in primary care practice 10 , and this was an important motivation for our study design. Potential limitations include missing predictor data and known predictors that are not measured or recorded in the primary care EHR. Around 5% of cohort participants did not have a recorded value for BMI in the 3 years prior to index pain/ osteoarthritis consultation, but we found little difference in findings between complete dataset and multiple imputed datasets. We assumed no consultation record of a morbidity or prescription meant, there had been no such event within primary care. Although it is a fairly standard approach to use the most recent record for time-varying exposures that are likely to be generally stable, this approach might still be conservative (ie, underestimate the exposure-outcome association) to the extent that it misclassifies the exposure level relevant to the outcome (eg, lifetime cumulative exposure to smoking).
Primary THR and TKR are complex, multiply determined outcomes and can be considered as a composite measure of osteoarthritis progression, since these procedures are indicated for a combination of pain, functional disability, impact on quality of life, radiological changes and failed conservative treatment. 36 Joint replacement is an important outcome of osteoarthritis, and this is reflected in its role when judging the validity of imaging-related primary endpoints for clinical trials of structure-modifying drugs. 37 However, it is important to recognise that a proportion of individuals with progressive OA may not be offered, or accept, TKR/ THR. The receipt of TKR/THR can also reflect extraneous factors such as patient age, sex, ethnicity, willingness to undergo surgery, comorbidity, patients' needs, patients' coping skills, physician effect and prevailing supply-side factors. 38 We found adjusted rates of THR and TKR were lower given the following patient characteristics at or before index hip/knee consultation: age over 80-85 years, non-white ethnicity, 39 higher levels of comorbidity (including diagnosed mental health disorder, generalised OA and low back pain) and very high levels of obesity. Osteoarthritis progression in the context of these factors will be underestimated by risk algorithms based on the outcome of receipt of primary joint replacement.  A strength of our study was the comprehensive identification of candidate predictors from a variety of sources including a novel hypothesis-free 'ReWAS' study with replication in an independent primary care EHR dataset. This latter technique yielded a small number of candidate predictors not previously reported (eg, arthroscopy). ReWAS also confirmed known prognostic factors or suggested prognostic factors that were most likely proxy markers for known predictors not obtainable from the EHR (eg, analgesic prescriptions as a proxy for pain severity). All such 'hits' had to be judged clinically relevant by review panel of clinicians and lay member in order to be included in the modelling stage. Unsurprisingly, many candidate predictors of future primary THR or TKR previously identified in the literature were not routinely available within the primary care record. These included multi-item patient-reported measures of pain severity, 40 41 structural disease markers from plain X-rays or MRI 40 42 and measures of occupational and leisure time physical activity. [43][44][45][46] It is not known if their inclusion would significantly improve model performance.

Comparison with other studies
The majority of relevant previous studies have focused on one or more potential causal exposures for future joint replacement. We identified only three small studies that had previously derived and reported a multivariable prediction model for total hip or knee replacement based mainly on patient-reported and imaging variables. 40 41 47 Although the overall performance of the prognostic model is of primary importance, the direction and magnitude of association between some of the included predictors and outcome deserves comment. It must be recognised though that these associations are not intended to be, and cannot be interpreted as, valid estimates of causal effect (total, direct or indirect) on primary hip/knee replacement: they are chosen for their informativeness in predicting primary THR/TKR. They may or may not be causal or reversible; all associations were conditioned on having an index consultation for hip or knee osteoarthritis/pain; each coefficient was adjusted for all covariates in the model, but the minimally sufficient set of covariates needed to adjust for confounding would likely differ for each (the 'table 2 fallacy' 48 ). With these concerns in mind, we note that adjusted rates of THR and TKR were lower among moderate/ heavy current smokers 49 and higher among those with a previous injury. 50 Prior arthroscopic knee surgery was strongly associated with future TKR, an association which may include a very small direct causal effect 51 but which otherwise we interpret as reflecting a mixture of disease severity, risk of future progression and willingness to undergo a surgical procedure for the knee.

Implications
Our newly developed risk algorithms could have important applications in clinical practice by helping direct annual monitoring, intensive non-surgical care and timely assessment and discussion of the need for surgical referral to those most at risk of progression. The algorithms can specifically identify the individuals who, in the context of current healthcare policies and resources, are at higher risk of future joint replacement, and therefore can be targeted for individual care ranging from earlier surgery to non-invasive care that might postpone the need for surgery. The hypothetical higher risk individual illustrated in online supplementary table S6 and S7 might, for instance, be targeted for a programme of more intensive multimodal therapy including graded supervised exercise and supported weight loss. The algorithm also uses future joint replacement as a proxy for future progression of osteoarthritis, and therefore potentially attempting to identify individuals more broadly who can be targeted for more intensive monitoring and interventions that might prevent such future progressions and severity regardless of whether Osteoarthritis they would actually have had a joint replacement. For each of these clinical activities, a more targeted approach based on risk of progression may help. Monitoring of patients with osteoarthritis for progression of symptoms and impact is regarded as an important aspect of quality of care, 52 but current The National Institute for Health and Care Excellence guidance would result in this being applied to a very large number of patients. 53 Consideration for joint replacement should only be made after proper conservative care. 3 While consistent evidence supports the effectiveness for knee OA of supervised, individually tailored exercise programmes progressed over several visits, 6 many patients do not receive this 52 partly due to limited physiotherapy resource 8 and lack of referral. 7 For many patients, joint replacement will still be the most cost-effective intervention and an earlier recognition of patients' risk of future joint replacement may facilitate more timely assessment and discussion of appropriateness for referral. However, we caution against over-reliance on these risk algorithms, particularly for individuals whose characteristics mean that they will not be candidates for surgery despite experiencing progressive disease, and against their crude application to ration what are highly cost-effective procedures of primary THR and TKR for osteoarthritis.

Conclusions
We have developed and validated two new risk prediction equations to quantify the absolute risks of primary THR and TKR in patients' newly presenting with hip pain/OA or knee pain/OA in the primary care setting. The models have the advantage of being based on information routinely available in UK primary care EHR, making them potentially implementable for automatic risk calculation in electronic medical record software. They can be used to identify patients at high risk of end-stage OA for further assessments and intensive non-surgical intervention. The algorithms are readily amenable to further external validation in many developed countries that have routine records available for research. Further research is warranted to evaluate the clinical outcomes and cost effectiveness of using these risk equations in primary care.