{'fraction_non_alphanumeric': 0.0313287869394503, 'fraction_numerical': 0.017028311634635255, 'mean_word_length': 5.307612095933264, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Risk factors and trajectories of opioid use following total knee replacement

Background Opioids are commonly used to manage orthopedic pain in those undergoing total knee arthroplasty (TKA). There are limited studies assessing patterns of perioperative opioid use and risk factors for chronic use in patients undergoing TKA. Methods This is a retrospective longitudinal cohort study of Medicaid enrollees undergoing TKA between 2014 and 2017 using de-identified medical and pharmacy claims. The primary outcome was chronic opioid use (opioid prescription filled 90–270 days following TKA). Trajectory group membership was determined by identifying distinct groups of patients with similar patterns of daily morphine milligram equivalent (MME) values during the postsurgery follow-up period. Results In total, 1666 TKA surgeries performed in 1507 patients were included; 69% of patients were classified as chronic opioid users. Multivariable analyses identified prior opioid use, high opioid doses during the month after TKA, concomitant mood therapies and benzodiazepines, and comorbid conditions as important risk factors. Group-based trajectory analysis identified five distinct post-TKA surgery opioid use phenotypes with several key characteristics predicting group membership. Conclusions This large-scale analysis demonstrated that chronic opioid use was common after TKA surgery and established several important risk factors for chronic use following TKA. Novel analysis revealed five distinct opioid use trajectories and identified key characteristics to help guide clinicians when determining perioperative opioid use. Results demonstrate that interventional studies attempting to reduce opioids after TKA are needed if reductions in long-term use are to be realized in this high-risk patient population. Supplementary Information The online version contains supplementary material available at 10.1186/s43019-022-00148-0.

driver of chronic opioid prescription [9], and orthopedic surgeons rank third among opioid-prescribing specialties [2]. Alarmingly, in recent years, prescribing of opioids to manage OA has increased by 40% [2].
Total knee arthroplasty (TKA) is recognized as one of the most painful orthopedic procedures; 60% of patients who undergo TKA experience severe postoperative pain [3,4]. Postoperative pain inhibits early ambulation, delays initiation of physical therapy, and prolongs the rehabilitation process [5,6]. Although conventional pain management strategies rely heavily upon oral or intravenous opioid therapy, this approach is associated with risks. Undesirable side effects, including nausea, constipation, and somnolence, may delay ambulation [5]. Importantly, opioid use carries the risk of developing tolerance and dependence [6]. Following TKA, it is expected that patients experience a decline in pain and a decrease in analgesic requirements; unfortunately, chronic opioid use is reported in more than one-third of those undergoing TKA [7].
In response to the current opioid crisis, there is an urgent need to focus on perioperative interventions to reduce overall opioid use in TKA. [3,8,9]. Studies have suggested that cyclooxygenase-2 (COX-2) inhibitors, other non-opioid analgesics, and peripheral nerve blockade are effective at reducing postoperative opioid use [3,6,[8][9][10], but more research is needed in this area. Given the commonality of chronic opioid use in patients undergoing TKA, it is important to have more information on trends in perioperative opioid use and risk factors for prolonged use, and to identify safe and effective approaches to perioperative pain management. For the analysis presented here, we hypothesized that chronic opioid use was common in a high-risk adult Medicaid population undergoing TKA and that there were significant risk factors associated with chronic opioid use and trajectories of use following this surgery, both of which can provide useful guidance to clinicians caring for these patients.

Study design and population
This was a retrospective longitudinal cohort study aimed at assessing utilization patterns and risk factors for chronic opioid use following TKA based on methods we described previously in assessing opioid use following pediatric tonsillectomy [11]. The institutional review board provided exempt review for this investigation. We obtained de-identified medical and pharmacy claims data for surgeries performed on Medicaid enrollees in South Carolina between January 2014 and December 2017 from the state's Revenue and Fiscal Affairs Office (RFA). We also obtained Medicare part-D data from RFA for those patients with dual coverage. Surgeries were identified through appropriate ICD-9-CM and ICD-10-CM procedure codes, and are provided in Additional file 1: Table S1. Figure 1 displays the number of surgeries and patients in the SC Medicaid dataset meeting criteria, as well as the final cohort of patients. The unit of analysis was individual surgeries (see exclusions following). Patients were excluded if any presurgery ICD code was found related to cancer, where we combined definitions described by Quan [12] and Feudtner [13]. Patients were also excluded if the diagnosis codes associated with the surgery indicated it was performed following an accident involving bone fractures (i.e., traumatic injury). Patients were followed from 6 months prior to the surgery date until 9 months post-discharge for the index TKA surgery. Patients without continuous Medicaid coverage throughout the 15-month period were excluded. To associate opioid use patterns with a single surgery, patients were excluded if they had a second knee surgery or another significant surgery during the 9-month post-discharge period that likely involved the use of opioids. Therefore, a patient could appear twice in the analyses and contribute to different outcome groups if their surgeries were > 9 months from discharge of the other TKA. This determination was based on a review of associated procedure codes. Patients were also excluded if their pharmacy data were missing during the pre-or postsurgery follow periods. Opioid use was determined through prescribing records. Opioid dose was calculated by converting opioid medications into morphine milligram equivalent (MME) daily dose using conversion factors provided by the US Centers for Disease Control and Prevention [14]. Dispensed opioids that were in liquid or patch form were excluded in 58 of 1666 surgeries owing to anomalies in the Medicare Part D data. In all but one surgery, the patient received other opioids in pill form. However, sensitivity analyses were performed in which models were compared that included or excluded liquids and patches, and no significant differences between models were found. We identified baseline comorbidities from ICD codes recorded during the 6-month presurgery period using Elixhauser definitions validated by Quan, supplemented by osteoporosis and sleep apnea, as these have been associated with opioid consumption [12]. Figure 2 displays the study timeline, where day 0 is the surgery discharge date, the presurgery period was 90 days prior to surgery, and the exposure period was the 30 days following discharge. Days 31-270 comprised the outcome follow-up period. The unit of analysis was individual surgeries.

Outcomes
The primary outcome was chronic opioid use, defined as any opioid prescription filled ≥ 90 days to 270 days following discharge. A secondary outcome was trajectory group membership based on patient clusters with similar trajectories of opioid use during the follow-up period, where opioid use was assessed as monthly averages of daily morphine milligram equivalent (MME) values.

Exposure and covariate definitions
We accounted for the following demographic variables in our statistical models: age (on date of surgery), sex, race-ethnicity group (non-Hispanic white, non-Hispanic Black, Hispanic, and other/unknown group). Opioid use was determined for the presurgery, exposure, and followup periods using mean days per month with dispensed opioids, mean MME over 30 days (MME per day), and the proportion of patients with dispensed opioids. We also accounted for the following baseline opioid variables during the 90-day presurgery period: opioid naïve was defined as 0 opioid days; daily opioid use was categorized as 0-49, 50-89, and ≥ 90 MME per day, on the basis of CDC-defined cut points. Exposure period variables included the number of opioid prescriptions during the 30-day period, the opioid type(s) (single versus combination, long-acting versus short-acting medications), the providers' practice specialties, other medications co-prescribed with opioids (antipsychotics, antidepressants, gabapentin and pregabalin, selected anxiolytics, muscle relaxants, benzodiazepines, non-benzodiazepine sedative/hypnotics, duloxetine). Variables related to the surgery and process of care included length of stay, treatment at a skilled nursing or rehabilitation facility, rehospitalization within 30 days, number of days from discharge until the first visit with a surgeon or primary care provider, total number of visits to each provider type, and overall total visits.

Statistical analyses
As described in detail in a previous publication [11] bivariate analyses were performed using t-tests, ANOVA, chi-squared tests, or Fisher's exact tests, as appropriate. We estimated risk ratio (RR) and 95% confidence interval (CI) for all measured risk factors using generalized linear mixed models (GLMM) with a Poisson distribution, and a log link [15]. We estimated relative risk instead of odds ratios because the chronic outcome was relatively common in this population [16]. We used two models to assess the effects of opioid exposure (days of opioid exposure or mean MME per day during the 30-day exposure period). We also used group-based trajectory models (GBTM) to identify clusters of surgical procedures where  patients had similar patterns of MME per day during the 8-month follow-up period. These models are based on finite mixture model methods, with an assumed zeroinflated Poisson distribution for the MME responses [17][18][19]. We used SAS PROC TRAJ and considered models with up to fourth-order polynomials and up to six trajectory groups. The best model in terms of numbers of groups was selected on the basis of the Bayesian information criterion (BIC). Parameter estimates for the highestorder polynomial with p < 0.05 were used to determine the best-fitting curve for each group. Finally, we used a multinomial logistic model to predict which variables were most influential in predicting group assignment. A subanalysis was conducted assessing the etiologies of ED visits and hospitalizations during the follow-up period, assessed using ICD 9/10 codes and AHRQ Clinical Classification Software (CCS) [20]. All analyses were performed using SAS 9.4 (SAS Institute, Inc., Cary, NC).

Results
From 2014 to 2017, there were 1666 TKA surgeries performed in 1507 patients (   Table 3). Each additional opioid prescription filled during the 1-month postsurgery period was associated with 3% increased risk of chronic use (RR 1.03, 95% CI 1.01-1.05). Patients with longer hospital stays had 7% increased risk, compared with those with one night or less (RR 1.07, 95% CI 1.00-1.14). During the 1-month postsurgery period, prescribing of antipsychotics increased the risk of chronic opioid use by 14% (RR 1.14, 95% CI 1.03-1.26). Patients with several chronic comorbid conditions also  Table 3). Of note, age was not a significant predictor in the adjusted models but was in the univariate associations. Group-based trajectory analysis determined that postexposure MME trajectory patterns were best explained by five distinct phenotypes ( Fig. 3 and Additional file 1: Table S2). These included "little or no opioid use" (group 1, 27.3%), "increasing opioid use" (group 2, 11.3%), "rapid opioid wean" (group 3, 24.4%), "slow opioid wean" (group 4, 12.1%), and "sustained high opioid use" (group 5, 24.9%). Univariate analysis (Additional file 1: Table S2) demonstrated several characteristics that differed by group. Patients in groups 4 and 5 ("slow wean" and "sustained high opioid use"), versus group 1, had higher rates of chronic use, were younger, had high mean MME per day during pre-and postsurgery periods, had higher opioid prescription counts, were more likely to have concomitant medications prescribed with opioids, and had the highest number of unique opioid prescribers during the exposure period. Groups 2 and 3 ("increased opioid use" and "rapid wean") were characterized by intermediate values in each risk predictor, including opioid naïve status, the fraction with pre-and postsurgery opioid consumption, number of Table 3 Regression analyses (GLMM) predicting chronic opioid use (opioids ≥ 90 to 270 days after total knee replacement) a APAP acetaminophen, GLMM generalized linear mixed modeling, MME morphine milligram equivalent, NSAIDS nonsteroidal antiinflammatory drugs, 95% CI 95% confidence interval a Chronic opioid use defined as any opioid prescription filled ≥ 90 to 270 days following discharge for the index TKA surgery b Opioid naïve for analyses defined as 0 opioid days during the presurgery period c The exposure period was defined as the 30 days immediately after discharge from procedure d This category includes non-benzodiazepine sedative/hypnotics and selected anxiolytics exposure period prescription counts and opioid exposure days, the proportion with concurrent medication use, and number of unique opioid prescribers. In multinomial models predicting group membership (Additional file 1: Table S3), group 5 membership ("sustained high use") was associated with greater numbers of opioid prescriptions and substantially higher mean MME per day during the exposure period, concomitant use of benzodiazepines, antidepressants and muscle relaxants, and a longer hospital length of stay after surgery. This group was also more likely to have diagnoses for substance use disorder, diabetes with complications, and rheumatoid arthritis. Comparison of groups 3 and 4 ("rapid opioid wean" and "slow wean") indicated that a rapid wean was associated with older age and with patients who were more likely to be opioid naïve and to have lower opioid exposure after the surgery. Comparison between groups 1 and 2 ("little or no opioids" versus "increasing opioid use") indicated that increased use was associated with multiple opioid prescriptions, being nonopioid naïve, and having a history of substance use disorder, perivascular disease, and chronic blood loss anemia.
A subanalysis was conducted for the two groups with the most concerning trajectories (group 2, increasing opioid use, and group 5, sustained high opioid use) to further examine the role of postsurgery medical events in increasing or sustaining high opioid use during the outcome period. Specifically, etiologies of emergency department (ED) visits and hospitalizations (using primary ICD 9/10 codes and AHRQ CCR software) were analyzed and are displayed in Additional file 1: Table S4, S5 (group 2), S6, and S7 (group 5). The results demonstrate that the most common reasons for ED visits in the post-exposure period were cardiovascular, infections, acute injuries, and treatment of comorbidities for groups 2 and 5; however, opioid utilization did not appreciably change before, during, or after these visits. Common reasons for hospitalizations for groups 2 and 5 included infections, treatment of comorbid conditions, and TKA-related surgical complications. Opioid utilization did not appreciably change during or after hospitalization, regardless of etiology. Finally, in multivariate modeling, ED visits were predictive for group 5 membership (OR 2.13, 95% CI 1.56-2.90) but not group 2 (OR 1.41, 95% CI 0.974-2.04), as compared with group 1 membership. There were no significant associations between hospitalizations and group membership during the outcome period.

Discussion
The results of this large-scale statewide longitudinal analysis demonstrate that chronic opioid use after TKA surgery is very common in this high-risk adult population of adult Medicaid enrollees; 69% of patients who underwent TKA filled a prescription for opioids 90-270 days after surgery. Multivariable analyses demonstrated several important risk factors, including prior opioid use, high prescribing during the 1 month after surgery, concomitant prescribing of mood medications and benzodiazepines, and several comorbidities. Novel trajectory analysis of longitudinal opioid use following TKA surgery categorized post-exposure period opioid use into five distinct phenotypes: low to no use, high sustained use, rapid wean, slow wean, and increasing use. Group membership was predicted by several key risk variables. At 69%, the rate of chronic opioid use following TKA found in this study is significantly higher than in previous studies, commonly citing rates of 30-50% [7]. There are several likely reasons for this. First, this study focused on an adult Medicaid population, and it is well established that public health insurance is a proxy for low socioeconomic status (SES). Previous research demonstrates that low SES and Medicaid, in and of itself, are risk factors for high rates of opioid use and substance use disorders [21][22][23][24]. Further, the analysis presented here represents a "real-world" population, as previous opioid use and abuse were not criteria for exclusion. Thus, the high rate of chronic opioid use seen in this analysis is likely a reflection of focusing on a high-risk population and limiting exclusion criteria. We have consistently found, when analyzing this Medicaid population, higher than previously cited opioid use when we evaluated other surgeries, including appendicitis, cholecystectomy and colon resections (unpublished), and tonsillectomy [11].
Consistent with our findings, previous research has identified preoperative opioid use as one of the most important risk factors for prolonged opioid use following TKA [7,25,26]. One analysis including 243 patients who underwent TKA found that patients who reported current opioid use the day of surgery were 53% more likely to report persistent opioid use at 6 months versus opioidnaïve patients [22]. Our work supports these findings; those with presurgical opioid use were at 60% greater risk for chronic use. We also assessed opioid use trajectories during the postoperative period and found that patients with an increasing trajectory in the 8 months following surgery were substantially less likely to be opioid naïve at the time of surgery. These patients were more likely to have a history of substance use disorder, additional comorbidities, and multiple opioid prescriptions during the 30 days following discharge for the surgery. Thus, previous opioid use and abuse are clear and significant risk factors for presenting with a chronic opioid use phenotype after TKA surgery. Clearly, interventional efforts should be focused on these high-risk patients in an effort to mitigate long-term opioid use following TKA surgery.
Additional characteristics beyond preoperative opioid status impacted postoperative opioid use and weaning. Those with low opioid exposure (based on mean daily MMEs) during the 1 month following surgery were more likely to be in the rapid wean group. Thus, reducing postoperative opioid prescribing is key to minimizing the risk of developing chronic opioid use following TKA. To this end, there is a growing and promising body of literature to suggest periarticular multimodal drug injections (PMDI) and femoral nerve blocks may be effective at controlling pain and reducing opioid consumption following TKA surgery. In a meta-analysis of ten randomized controlled trials, which included 744 TKAs, Wang et al. demonstrated that single femoral nerve block injection may be more effective for early postoperative pain relief while continuous PMDI was more efficacious for overall postoperative pain control. However, the authors state there is high variability in outcomes using these pain control modalities, and future studies are warranted before hard conclusions can be drawn [27,28]. This offers a promising area of future research.
The two most concerning groups were group 2 (increasing opioid use) and group 5 (sustained high opioid use). Given the limitations of claims data, it is unclear why patients were increasing or taking large amounts of opioids during the follow-up time. An assessment of causes of ED visits and hospitalizations that occurred during the follow-up period (Additional file 1: Table S4 through S7) provided limited information, as opioid use remained consistent during and after these encounters, regardless of visit etiology [20]. Future studies are warranted in these troubling groups, using granular chart review to assess the true-likely multifactorial-etiologies of high opioid use in these groups.
Strengths of this study include the longitudinal design and large sample size of a traditionally at-risk population. Previous studies in the TKA population were predominantly limited to single-center analyses including limited numbers of patients [29,30]. This analysis also benefited from a comprehensive analysis of opioid prescribing using medical and pharmacy claims data from both Medicaid and Medicare Part D repositories. There are several limitations to this study. First, baseline comorbidities were identified through ICD codes [12,13]. This method may have missed certain comorbidities and misclassified others. Another limitation is that we did not identify indications for preoperative opioid use and could not identify patients who may have been prescribed opioids to treat pain unrelated to osteoarthritis or TKA. Relative to secondary surgeries, we were unable to distinguish between primary and secondary TKA surgeries, which may impact opioid use patterns and trajectories. The use of SC Medicaid data limits the generalizability of these results to populations in other states or outside Medicaid enrollment [21,22]. We were unable to distinguish between drugs taken on an "as needed" versus scheduled basis; thus, the most likely MME exposure per day was used to estimate MME calculations. We also could not capture hospital-administered opioids, so we cannot assess the relationship between inpatient opioid exposure and outcomes following discharge. Our access to only administrative data prevented us from assessing true causes of opioid prescribing, and it is important to note that this is an association study. We were also not able to assess joint functional status following the TKA surgery [20]. Finally, though standard in this literature, the term "use" is applied throughout; our data speak directly to filled opioid prescriptions and not to the directly observed consumption by patients.

Conclusions
In this high-risk population, chronic opioid use after TKA surgery occurred in more than two-thirds of patients. Preoperative opioids, high opioid dosing during the month following TKA surgery, concomitant benzodiazepines and mood therapies, and comorbid conditions were significant risk factors for chronic use. Longitudinal analysis revealed five distinct opioid use phenotypes, with more than one-third of patients being in the increasing or sustained high opioid use groups. These results demonstrate that sustained and high opioid use following TKA surgery is common; interventional efforts are urgently needed to reduce perioperative opioids with the hopes of mitigating long-term use and abuse.
Additional file 1: Table S1. Diagnostic codes used to develop total knee replacement phenotype. Table S2. Demographic and clinical characteristics for total knee replacement trajectory groups, SC Medicaid 2014-2017. Table S3. Multinomial model predicting group membership. Table S4.
Causes of ED visits for group 2 during the outcome period. Table S5.
Causes of hospitalizations for group 2 during the outcome period. Table S6. Causes of ED visits for group 5 during the outcome period. Table S7. Causes of hospitalizations for group 5 during the outcome period.