Analysis and development of risk prediction models for chronic opioid use after surgery: a cohort study using the nationwide database

Article information

Korean J Anesthesiol. 2025;78(5):429-442
Publication date (electronic) : 2025 July 30
doi : https://doi.org/10.4097/kja.24831
1Department of Anesthesiology and Pain Medicine, Daegu Catholic University Medical Center, Daegu Catholic University School of Medicine, Daegu, Korea
2Office of Hospital Information, Seoul National University Hospital, Seoul, Korea
3Institute of Convergence Medicine with Innovative Technology, Seoul National University Hospital, Seoul, Korea
4Department of Medicine, Seoul National University College of Medicine, Seoul, Korea
5Department of Anesthesiology and Pain Medicine, Hanyang University Medical Center, Hanyang University College of Medicine, Seoul, Korea
6Department of Anesthesiology and Pain Medicine, Seoul National University Hospital, Seoul National University College of Medicine, Seoul, Korea
7Biostatistical Consulting and Research Lab, Medical Research Collaborating Center, Hanyang University, Seoul, Korea
8Department of Anesthesiology and Pain Medicine, Hanyang University Medical Center, Seoul, Korea
Corresponding authors: Eugene Kim, M.D., Ph.D. Department of Anesthesiology and Pain Medicine, Hanyang University College of Medicine, 222 Wangsimni-ro, Seongdong-gu, Seoul 04763, Korea Tel: +82-2-2290-8680 Fax: +82-2-2299-8692 Email: emil7882@hanyang.ac.kr
*Jonghae Kim and Hyun-Lim Yang have contributed equally to this work as co-first authors.
†Eugene Kim and Hyung-Chul Lee are co-corresponding authors of this work.
Received 2024 November 26; Revised 2025 July 1; Accepted 2025 July 1.

Abstract

Background

Chronic opioid use has become a socioeconomic as well as a medical problem. This study aimed to identify risk factors and develop prediction models for postoperative chronic opioid use (PCOU).

Methods

This retrospective cohort study used data from the Korean National Health Insurance Service (NHIS) between January 2008 and December 2018. Of 2 077 825 patients aged seven years or older who underwent surgery, survived at least one year, and had no additional surgeries, 1 108 119 were randomly selected. Logistic regression (LR) and machine learning models were developed to identify risk factors for PCOU. PCOU was defined as having filled 10 or more prescriptions or receiving more than 120 days’ supply between postoperative days 91 and 365. Age, sex, medical comorbidities (systemic diseases, psychological disorders, and substance use disorders), preoperative medications (antidepressants, antipsychotics, anticonvulsants, benzodiazepines, opioids, and nonopioid analgesics), and type of surgery were assessed as potential risk factors.

Results

PCOU occurred in 9308 patients (0.84%). Older age, preoperative history of opioid use, and high in-hospital opioid doses were the three most important predictors. Among the 28 most commonly performed surgical procedures in Korea, lung surgery, general spinal surgery, and total knee arthroplasty were most strongly associated with chronic opioid use.

Conclusions

According to the best-performing gradient boosting model, older age, longer hospital stay, high in-hospital opioid consumption, and preoperative opioid use were the most important risk factors for PCOU.

Introduction

The potent analgesic effects of opioids [1] make them useful for treating cancer pain [2], chronic non-cancer pain [3], and postoperative pain [4]. However, their side effects (e.g., altered consciousness and euphoria) frequently lead to abuse and addiction [1]. Accordingly, the negative consequences of opioid use and abuse have been reported globally [5]. Disorders related to chronic opioid use affect more than 26 million people worldwide, with the highest prevalence in the United States [6]. The number of annual deaths attributed to opioid use disorder exceeds 100 000 worldwide and 47 000 in the United States in 2017 [7].

Surgery and perioperative factors are known risk factors for chronic opioid dependence [810]. Acute postoperative pain that persists beyond the usual healing period can evolve into a chronic pain state [11]. To prevent the progression from inadequately managed acute postoperative pain to persistent opioid-resistant pain, early opioid use has been recommended, particularly for patients unresponsive to other analgesics [12]. However, patients unnecessarily prescribed opioids after low-risk surgeries were found to have a 44% higher probability of developing chronic opioid use within one year postoperatively compared to those not prescribed opioids [13].

Nonetheless, clear guidelines for postoperative opioid analgesia are lacking, even though regulatory changes concerning opioid use for cancer and non-cancer pain have been introduced in the United States to address the opioid crisis [9,10,14]. Furthermore, a recent meta-analysis found that most prior observational studies on risk factors for prolonged postoperative opioid use were conducted in the United States, where health care services are not uniformly provided to the entire population, and patients often switch between private and public insurance plans [15]. Therefore, no single database covers the entire population. In contrast, South Korea’s National Health Insurance Service (NHIS) is a single-payer system that requires registration from all residents. Since health care providers are reimbursed on a fee-for-service basis, the NHIS maintains demographic and claims data (including diagnoses, prescriptions, and consultation records) for the entire South Korean population [16]. Thus, this database enables large, population-based, nationwide studies.

Machine learning (ML) techniques have recently become widely used for analyzing large-scale data and developing high-performance predictive models. Compared to traditional statistical approaches, ML methods are better equipped to detect nonlinear relationships and complex interactions among predictors [1720]. In a prior study that used administrative claims data from Medicare beneficiaries to assess opioid overdose risk, ML models outperformed conventional statistical approaches such as multivariable logistic regression (LR) and least absolute shrinkage and selection operator (LASSO) regression [21]. Therefore, we expect ML techniques to outperform traditional methods in identifying risk factors and predicting outcomes using Korea’s nationwide dataset.

The primary objective of this study was to identify risk factors and develop a model for predicting postoperative chronic opioid use (PCOU) using the NHIS database. A secondary objective was to assess the current state of PCOU in Korea by examining existing patterns and prevalence. We hypothesized that ML-based analysis would effectively identify risk factors for PCOU and quantify their impact.

Materials and Methods

This study was approved by the Institutional Review Board of the Hanyang University Medical Center (HYU-2020-07-019; approval date: July 21, 2020) and the National Health Insurance Review & Assessment Service (NHIS-2021-1-234; approval date: October 2020), and the requirement for written informed consent was waived due to the retrospective nature of the study design.

Data sources

From the Korean NHIS, we obtained medical services and pharmacy claims data, including patient information such as age, sex, diagnosis information (based on the International Classification of Diseases [ICD]) and specific information on procedures and prescriptions from all medical institutes in South Korea.

Study cohorts

The study population included patients aged seven years or older who underwent surgery between January 1, 2008, and December 31, 2018 (n = 11 112 785). Procedural codes newly entered into the database during the first postoperative year were used to identify patients who underwent additional surgery. Of the 2 077 825 patients meeting these criteria, 1 108 119 were randomly selected by an NHIS big data system manager who did not participate in the analysis (Fig. 1). To investigate opioid consumption during the year after surgery, we excluded patients who died, received additional surgery within one year of the initial surgery, or whose type of surgery could not be identified (Fig. 2).

Fig. 1.

Flow chart.

Fig. 2.

The stage period of analysis. Each patient was observed for 365 days before and after the hospitalization during which surgery was performed. The blue boxes indicate the conditions that should be fulfilled during their corresponding periods. The light green boxes indicate the parameters that should be measured during the given periods. MME: morphine milligram equivalent, POD: postoperative day.

Outcome variables

Our outcome of interest was PCOU, defined as having filled ≥ 10 prescriptions or > 120 days' supply between postoperative days (PODs) 91 and 365 [9,22], thereby excluding opioid use for acute pain management during the immediate postoperative period. Patients who developed PCOU were assigned to the chronic group; all others were assigned to the control group.

We used prescription data for opioids available in South Korea during the study period: morphine, fentanyl, alfentanil, sufentanil, remifentanil, oxycodone, hydromorphone, hydrocodone, meperidine, codeine, tramadol, butorphanol, buprenorphine, and nalbuphine.

Covariates

Based on previous literature, we assessed age, sex, medical comorbidities (systemic diseases, psychological disorders, and substance abuse), preoperative medications (antidepressants, antipsychotics, anticonvulsants, benzodiazepines [BZDs], opioids, and non-opioid analgesics), and surgery type as potential risk factors. Patients were considered to have comorbidities if they had relevant ICD-10 codes within one year before surgery, as listed in Table 1 and Supplementary Table 1 in the Supplement. A full list of drugs for each class is provided in Supplementary Table 2 in the Supplement. Preoperative medication use was assessed based on prescription history during the year before surgery. Death from any cause was tracked for a minimum of one year and up to ten years after surgery.

Baseline Characteristics

The morphine milligram equivalent (MME) dose of each opioid was calculated by multiplying the absolute dose by a conversion factor based on published literature (Supplementary Table 3) [2325]. MME was measured at four time points: during the hospital stay, from discharge to POD 30, from POD 31 to 90, and from POD 91 to 365. For each period, MME per prescription day was calculated by dividing total MME by the number of prescription days.

The website of the Korean Statistical Information Service (http://kosis.kr) includes a list of common surgical procedures classified by ICD-9-CM codes from the OECD/Eurostat/WHO-Europe Joint Data Collection on Non-Monetary Health Care Statistics. Referring to this list, we extracted data on surgery types. Additional surgical codes were included based on domestic classifications as of 2019. A full list of covariates, including surgery types, is provided in Supplementary Table 4 in the Supplement.

Model development and validation

A total of 28 variables were selected from the NHIS dataset. We developed the following ML models to predict PCOU: naïve Bayes, decision tree, random forest (RF), feed-forward neural network, and gradient boosting machine (GBM). For comparison, an LR model was also built using the same dataset. Details on selecting optimal hyperparameters for the RF and GBM models and descriptions of each ML model are provided in Supplementary Material 1.

To evaluate model performance, we conducted 10-fold cross-validation. The performance of the five ML models and the LR model was assessed using the area under the receiver operating characteristic curve (AUROC) and the area under the precision-recall curve (AUPRC). Sensitivity and specificity were determined at the point of highest Youden’s index. Pairwise comparisons of AUROCs were performed using the DeLong test. After identifying the best-performing ML model, we used Shapley additive explanation (SHAP) plots to visualize the influence of each variable on PCOU prediction. In the SHAP plot, the x-axis represents a log-scaled feature space, and each point corresponds to a test sample. Feature values are reflected as SHAP values, indicating the degree of contribution [26]. Purple indicates high variable values, while yellow indicates low values. Numbers beside each variable show its cumulative impact across all data points. To further explore the influence of surgery type, we calculated and visualized the mean SHAP values for each procedure. Variable was ranked in descending order by effect size.

Statistical analysis

Quantitative variables are presented as the median (1st-to-3rd quartiles). Qualitative variables are presented as patients’ counts and percentages. For univariate analyses, the Mann–Whitney U test and Pearson’s chi-square test were used to compare quantitative and qualitative variables, respectively, between the two groups. The 95% CI of the median difference was calculated using the quantile estimate.

Exploratory analysis

To assess the impact of PCOU on patient survival while controlling for various factors, survival analysis was performed using the Kaplan–Meier method. Kaplan–Meier survival curves for the control and chronic groups were compared using a log-rank test. Cox proportional hazards regression analysis was used to estimate the hazard ratio between the two groups, adjusting for age, preoperative comorbidities, and preoperative medication use. The proportional hazards assumption was considered met if the log-minus-log survival curves of the two groups ran parallel without intersecting. A two-sided P value < 0.01 was considered statistically significant.

Results

Out of 1 108 119 patients, 9308 (0.84%) developed PCOU. Compared to the control group, the chronic group was older, included more male patients, used preoperative medications more frequently, consumed higher amounts of opioids perioperatively, had longer hospital stays, and experienced higher mortality and greater incidences of medical comorbidities (Tables 1 and 2). The incidence of PCOU by surgery type is shown in Table 2. Time to death was shorter in the chronic group than in the control group (P < 0.0001 log-rank test: Supplementary Fig. 1). Cox proportional hazards regression analysis, adjusting for age, comorbidities, preoperative medications, and opioid use, revealed that the chronic group had a hazard ratio of 1.76 (95% CI [1.67–1.84], P < 0.0001) for death from any cause compared to the control group (Supplementary Table 5).

Perioperative Data

According to the LR model (Table 3), preoperative medication use was associated with significantly increased odds of developing PCOU. Patients with a history of preoperative opioid use had 3.96 times higher odds (95% CI [3.66–4.30]) compared to those without. Preoperative use of anticonvulsants and antidepressants was associated with odds ratios of 1.68 (95% CI [1.59–1.77]) and 1.48 (95% CI [1.40–1.57]), respectively. Older age, male sex, and the presence of medical comorbidities were also identified as risk factors. The AUROC of the LR model was 0.8702 (95% CI [0.8660–0.8745]) with a sensitivity of 0.8125 and a specificity of 0.7911 (Supplementary Table 6). The surgery types most strongly associated with PCOU were lung surgery, general spinal surgery, and hepatobiliary surgery.

Risk Factors for Chronic Opioid Use after Surgery from a Multiple Binary LR Model

The optimal hyperparameters determined from our experiments were 400 trees for the RF model and a maximum depth of 3 for the GBM model. Fig. 3 shows the receiver operating characteristic and precision-recall curves for the ML and LR models. The GBM model achieved the highest AUROC score of 0.8751 (95% CI [0.8708–0.8793]), with a sensitivity of 0.8735 and a specificity of 0.7369 (Supplementary Table 6). The AUPRC and accuracy scores were 0.0740 and 0.7381, respectively. The AUROC of the GBM model was significantly higher than those of the other models (P < 0.001) (Supplementary Table 7).

Fig. 3.

Receiver operating characteristic and precision-recall curves. The x-axis and y-axis of the receiver operating characteristic curves indicate the false positive rate and true positive rate, respectively. The area under the curve (AUC) metrics are presented as mean ± standard deviation. GBM: gradient boosting machine, DT: decision tree, LR: logistic regression, FNN: feed-forward neural network, NB: naïve bayes, RF: random forest.

According to the GBM model, the three most important variables were age, number of hospital days, and opioid use during the hospital stay per prescribed day. Two plots were generated: one showing the top 15 variables ranked by SHAP values (Fig. 4) and another displaying all variables (Supplementary Fig. 2). Fig. 5 presents the mean SHAP values by surgical type. The procedures most associated with chronic opioid use were general spinal surgery, lung surgery, and total knee arthroplasty (TKA).

Fig. 4.

SHAP plot with the top 15 values. The x-axis represents a log-scaled domain of the feature space; each data point indicates a test sample. A feature value corresponds to a SHAP value that reflects the degree of contribution. Purple indicates that the value of the variable is large, while yellow indicates that the value is small. The numbers next to the variables represent the sum of each variable’s influence across all data. HospitalDay: length of hospital day, HospitalOpioid: consumption of opioid during hospital day per prescribed day, D_Opioid: preoperative use of opioid analgesics, D_antiC: preoperative use of anticonvulsant, D_antiD: preoperative use of antiderpessant, S_spine: general spinal surgery, C_CPD: presence of chronic pulmonary disease, C_mood: presence of mood disorder, C_OSD: presence of other somatoform disease, C_DM: presence of diabetes, D_BZD: preoperative use of benzodiazepine, C_Dyslipidemia: presence of dyslipidemia, C_Cancer: presence of cancer, S_lung: lung surgery, C_BZD: presence of benzodiazepine, SHAP: Shapley additive explanation.

Fig. 5.

Importance among surgery types. The x-axis represents the mean SHAP values; variables are listed in descending order of feature importance. TKA: total knee arthroplasty, TURP: transurethral resection of the prostate, THA: total hip arthroplasty, SHAP: Shapley additive explanation.

Discussion

In this study, the incidence of PCOU was 0.84%. This finding is noteworthy because the incidence has not previously been studied in a single, large population. A recent study reported an incidence of 0.3% [9] that is lower than that of our study, likely because it included only opioid-naïve patients. In addition, that study used a database from private insurance services covering patients aged 18 to 64 years, limiting the generalizability of their results to other populations, such as older adults or those under Medicaid. A recent meta-analysis reported an incidence of 6.7%, pooled from 33 observational studies conducted in multiple countries [15]. However, their definition of chronic opioid use (filling at least one opioid prescription in 90 days) was more lenient than ours (filling ≥ 10 opioid prescriptions or > 120 days' supply 90 days postoperatively). As shown, the differences in incidence may be attributed to variations in the definition of PCOU, surgery types, and participant characteristics across studies. Our study provides a less biased estimate of incidence compared to previous studies. Unlike the study using private insurance data (n = 641 941) [9], we analyzed a single large population (n = 1 108 119) that reduces sampling bias and provides results more robust to outliers and random variation, enhancing the generalizability of our findings within the Korean population. In addition, because our cohort is more homogeneous than the subjects pooled from multiple studies [15], we expect fewer confounding effects arising from high variability among study populations with specific socioeconomic backgrounds, age groups, or surgery types, many of whom were registered under private insurance, government plans, Medicare, or Medicaid. Lastly, we also excluded subjects who died or underwent additional surgeries within a year, avoiding potential overestimation of PCOU due to increased opioid exposure and postoperative pain from repeated surgeries.

We found that older age was the most important risk factor for PCOU followed by longer hospital stays, greater opioid use during hospitalization, and a history of preoperative opioid use, as indicated by SHAP analysis from the GBM model. Some studies have suggested that older patients are more likely to develop PCOU [9,2729], while others have shown greater vulnerability among younger patients [30,31], or no significant age-related differences [30]. Each age group may have specific risk factors: younger patients may have lower pain tolerance, less social support, and a higher likelihood of using opioids for nonmedical purposes, while elderly patients often experience more chronic pain, comorbidities, and may have impaired cognitive function that limits safe opioid management. Other factors, such as education, employment status, social stigma, and poverty level may also influence PCOU [8,32,33] making it difficult to draw consistent conclusions about the role of age across different populations. According to data from South Korea’s Ministry of Health and Welfare, the number of emergency room visits for patients aged 60 or older due to narcotics and psychotropic drug addiction increased by 112.3% from 2019 to 2022, while younger groups showed no significant change during the same period [34]. This vulnerability is exacerbated by the fact that only 22% of drug addiction treatment claims come from older adults, despite a sharp rise in claims among patients in their 20s and 30s. The lack of tailored treatment and prevention strategies for addiction in the elderly increases their risk of dependency, particularly when opioids are prescribed postoperatively. These findings emphasize the urgent need for comprehensive pain management strategies that address the unique risks faced by older adults.

The role of preoperative opioid use in prolonged opioid use has been well established in previous studies [15,30,35]. Specifically, PCOU rates are notably lower among opioid-naïve patients (ranging from 0.104% to 0.134% [9], 1.2% [15], and 1.7% [35]) compared to those with prior opioid use (14.8%) [35]. Consistent with these findings, our study indicates that patients with a preoperative opioid prescription had 3.96 times higher odds of developing PCOU. Although the odds ratio for perioperative opioid consumption was close to 1.00 in the LR model, the MME was significantly higher in the chronic group than in the control group (Table 2). Perioperative opioid use was ranked third in importance by SHAP analysis in the GBM model, suggesting a strong association with PCOU. This association, despite the LR model’s limitations, is further supported by the fact that the GBM model handled this variance more effectively [36], improving reliability even when odds ratios and model fit statistics in the LR model were affected [37,38]. Although the performance differences between models were clinically modest, the interpretability advantage of GBM in highlighting key variable is meaningful.

It is important to note that our analysis was adjusted for postoperative MME and hospital length of stay (LOS). This allowed us to estimate the direct effects of baseline characteristics (e.g., age, preoperative opioid use) on PCOU, independent of postoperative variables. Our goal was to identify individuals who may be inherently more at higher risk regardless of their postoperative course. Understanding these direct effects can help clinicians proactively identify and manage high-risk patients. However, this approach does not capture the total effect of baseline factors that could include both the direct and indirect pathways mediated through postoperative MME and hospital LOS. For example, older patients might be more likely to have longer hospital stays and require more opioids postoperatively, increasing their risk of PCOU. By adjusting for these mediators, we have effectively removed this indirect pathway from our analysis. Therefore, our findings reflect the direct effect of baseline factors, while the total effect may be larger and more complex. Future research could explore the total effect by using models that do not adjust for postoperative factors, allowing for a more comprehensive perspective of the factors contributing to PCOU.

It is important to acknowledge that our study did not include direct measures of postoperative pain that can influence both perioperative opioid use and the development of PCOU. This introduces the possibility that unmeasured confounding by postoperative pain may have influenced our results. For instance, inadequate pain control due to restrictive opioid administration strategies could potentially lead some patients to develop PCOU. This limitation should be considered when interpreting our findings. Furthermore, postoperative pain may influence long-term survival. While we did not have data to assess this directly, it is plausible that poorly controlled postoperative pain could negatively impact patients’ quality of life, physical functioning, and overall health, potentially affecting survival outcomes. If postoperative pain is indeed associated with survival, our Cox regression model may not fully capture the complex relationship between PCOU and long-term outcomes. However, even with this limitation in mind, the observed association between perioperative opioid consumption and PCOU, supported by our findings and existing literature [3941], suggests that further research into optimizing perioperative opioid strategies is warranted. This may include the adoption of strategies such as nociception monitoring devices and enhanced pain management techniques (e.g., multimodal analgesia, regional or neuraxial anesthesia, psychobehavioral interventions) to effectively manage pain and minimize opioid requirements. While we cannot definitively conclude that these strategies will reduce PCOU due to the potential confounding, exploring these approaches in future research, with careful attention to pain management and other confounding factors, remains a worthwhile endeavor.

In this study, the rates of preoperative BZD and opioid use were 30.4% and 62.0%, respectively. At first glance, these results may seem high; however, recent literature on surgical patients in South Korea highlights concerning trends in medication use. A study using the NHIS database found that 52.4% of patients aged 18 and older undergoing total joint arthroplasty had received opioid prescriptions for over 90 days preoperatively [42]. If similar definitions to those used in our study—where any opioid prescription within a year prior to surgery is considered preoperative use—had been applied, the prevalence could be even higher. In another study of elderly patients undergoing hip fracture surgery, preoperative opioid usage ranged from 57.1% for past users (those who had used opioids within six months prior to the surgery) to 88.7% for current users (those who received opioids within three months after admission for surgery), depending on the criteria applied [43]. Furthermore, preoperative use of BZD in South Korea is particularly concerning in recent literature, especially among the elderly [44,45]. In summary, preoperative exposure to both opioids and BZD appears to be notably high among Korean patients, suggesting a comparable, if not higher, prevalence than reported internationally. However, existing studies have typically focused on specific surgeries or populations, thus limiting the availability of comprehensive statistics for the general population. Our findings may help address a critical gap by offering a broader understanding of medication profiles among surgical patients in South Korea, providing valuable insights for clinical practices and future research.

The correlation between PCOU and the type of surgery is another critical point of this study, given the varying degrees of pain and recovery associated with different surgical procedures. In our study examining postoperative opioid use across 28 frequently performed surgical procedures in Korea, we identified lung surgery, general spine surgery, and TKA as the surgeries most strongly associated with PCOU. These three types of surgeries are known to induce significant postoperative pain and subsequent opioid requirements. Lung surgery, for instance, involves substantial postoperative pain due to the invasiveness of thoracic procedures [46]. Similarly, spinal surgeries and TKA have been reported as high-pain surgeries due to the extensive manipulation of musculoskeletal structures and lengthy rehabilitation processes [4749]. While previous studies have predominantly focused on individual surgeries or a limited variety of procedures to assess the risk factors for PCOU, our research stands out by encompassing a comprehensive examination of all 28 major surgeries identified by the Korean national statistics agency, providing a broader and more inclusive understanding of this issue. Additionally, by excluding reoperation or additional surgery, we were able to investigate the pure effect of surgical type on PCOU.

Our retrospective study design inherently presents limitations. First, some important information (postoperative pain, height, body weight, and laboratory and radiological findings) was unavailable in the NHIS database and thus was not included in this study. Second, because patients’ underlying diseases were investigated based on the claim codes registered in the NHIS database, some diseases that the patients actually had may be missing in our study. Third, specific surgeries that were not reimbursed by NHIS (e.g., cosmetic and robotic surgeries) were not included in this study. Fourth, we could not distinguish the effects of opioids used intraoperatively from those used perioperatively because the NHIS database shows only the doses of opioids used during the hospital stay, without specifically indicating those administered intraoperatively. Fifth, because our results depend only on prescription data, it is unclear whether patients adhered to or complied with the prescriptions. Finally, our retrospective design may introduce hidden confounding variables, limiting the ability to establish a definitive causal relationship between intraoperative opioid use and chronic postoperative use. Detailed data collection and advanced statistical adjustments, such as propensity score matching or inverse probability of treatment weighting are recommended to mitigate these confounders. Future prospective studies are necessary to confirm these findings with greater rigor.

We developed the ML model using 28 important variables that showed that older age, longer hospital stays, higher perioperative opioid consumption, and a history of preoperative opioid use markedly increase the likelihood of PCOU. Notably, patients undergoing lung surgery, general spine procedures, and TKA are at heightened risk. Our findings can guide personalized opioid prescribing practices, potentially reducing the risk of PCOU in high-risk patients by tailoring pain management strategies based on individual risk profiles and enhancing overall patient safety in postoperative care.

Notes

Funding

This work was supported by National Research Foundation of Korea (NRF) grant funded by the Korea government (Ministry of Science and ICT) (No. 2022R1F1A1066482).

Conflicts of Interest

No potential conflict of interest relevant to this article was reported.

Data Availability

Data sharing is not applicable because the raw dataset are not permitted to be transferred outside the Korean National Health Insurance Service (NHIS) database.

Author Contributions

Jonghae Kim (Conceptualization; Formal analysis; Investigation; Visualization; Writing – original draft; Writing – review & editing)

Hyun-Lim Yang (Formal analysis; Investigation; Methodology; Software; Visualization; Writing – original draft; Writing – review & editing)

Eugene Kim (Conceptualization; Data curation; Formal analysis; Funding acquisition; Investigation; Methodology; Project administration; Supervision; Validation; Visualization; Writing – original draft; Writing – review & editing)

Hyung-Chul Lee (Conceptualization; Data curation; Formal analysis; Supervision; Writing – original draft; Writing – review & editing)

Hyun-Kyu Yoon (Formal analysis; Investigation; Methodology; Writing – original draft; Writing – review & editing)

Yun Jin Kim (Investigation; Methodology; Visualization; Writing – original draft; Writing – review & editing)

Kyu-Nam Kim (Formal analysis; Investigation; Methodology; Writing – original draft; Writing – review & editing)

Ji-Yoon Kim (Investigation; Writing – original draft; Writing – review & editing)

Jeong Min Sung (Investigation; Methodology; Project administration; Writing – original draft; Writing – review & editing)

Tagkeun Lee (Investigation; Methodology; Writing – original draft; Writing – review & editing)

Supplementary Materials

Supplementary Table 1.

List of comorbidities and their ICD-10 codes.

kja-24831-Supplementary-Table-1.pdf
Supplementary Table 2.

List of drugs according to class.

kja-24831-Supplementary-Table-2.pdf
Supplementary Table 3.

List of equi-analgesic ratios for each opioid.

kja-24831-Supplementary-Table-3.pdf
Supplementary Table 4.

List of input variables used in this study.

kja-24831-Supplementary-Table-4.pdf
Supplementary Table 5.

Cox proportional hazards regression analysis.

kja-24831-Supplementary-Table-5.pdf
Supplementary Table 6.

Model performance.

kja-24831-Supplementary-Table-6.pdf
Supplementary Table 7.

Pairwise comparison of the areas under the receiver operating characteristic curves.

kja-24831-Supplementary-Table-7.pdf
Supplementary Fig. 1.

Kaplan–Meier survival plot for death from any cause after surgery.

kja-24831-Supplementary-Fig-1.pdf
Supplementary Fig. 2.

Shapley additive explanation (SHAP) plot with overall values.

kja-24831-Supplementary-Fig-2.pdf
Supplementary Material 1.

Determination of hyperparameters and development of the machine learning model.

kja-24831-Supplementary-Marterial-1.pdf

References

1. Pathan H, Williams J. Basic opioid pharmacology: an update. Br J Pain 2012;6:11–6. 10.1177/2049463712438493. 26516461.
2. Barbera L, Seow H, Husain A, Howell D, Atzema C, Sutradhar R, et al. Opioid prescription after pain assessment: a population-based cohort of elderly patients with cancer. J Clin Oncol 2012;30:1095–9. 10.1200/jco.2011.37.3068. 22370317.
3. Torrance N, Mansoor R, Wang H, Gilbert S, Macfarlane GJ, Serpell M, et al. Association of opioid prescribing practices with chronic pain and benzodiazepine co-prescription: a primary care data linkage study. Br J Anaesth 2018;120:1345–55. 10.1016/j.bja.2018.02.022. 29793600.
4. Beloeil H, Albaladejo P, Sion A, Durand M, Martinez V, Lasocki S, et al. Multicentre, prospective, double-blind, randomised controlled clinical trial comparing different non-opioid analgesic combinations with morphine for postoperative analgesia: the OCTOPUS study. Br J Anaesth 2019;122:e98–106. 10.1016/j.bja.2018.10.058. 30915987.
5. Morley KI, Ferris JA, Winstock AR, Lynskey MT. Polysubstance use and misuse or abuse of prescription opioid analgesics: a multi-level analysis of international data. Pain 2017;158:1138–44. 10.1097/j.pain.0000000000000892. 28267061.
6. GBD 2016 Disease and Injury Incidence and Prevalence Collaborators. Global, regional, and national incidence, prevalence, and years lived with disability for 328 diseases and injuries for 195 countries, 1990-2016: a systematic analysis for the Global Burden of Disease Study 2016. Lancet 2017;390:1211–59. Erratum in: Lancet 2017; 390: e38. 10.3410/f.731220250.793569875. 28919117.
7. Strang J, Volkow ND, Degenhardt L, Hickman M, Johnson K, Koob GF, et al. Opioid use disorder. Nat Rev Dis Primers 2020;6:3. 10.1038/s41572-019-0137-5. 31919349.
8. Clarke H, Soneji N, Ko DT, Yun L, Wijeysundera DN. Rates and risk factors for prolonged opioid use after major surgery: population based cohort study. BMJ 2014;348:g1251. 10.1136/bmj.g1251. 24519537.
9. Sun EC, Darnall BD, Baker LC, Mackey S. Incidence of and risk factors for chronic opioid use among opioid-naive patients in the postoperative period. JAMA Intern Med 2016;176:1286–93. Erratum in: JAMA Intern Med 2016; 176: 1412, JAMA Intern Med 2022; 182: 690, JAMA Intern Med 2022; 182: 783. 10.1001/jamainternmed.2016.3298. 27400458.
10. Brummett CM, Waljee JF, Goesling J, Moser S, Lin P, Englesbe MJ, et al. New persistent opioid use after minor and major surgical procedures in US adults. JAMA Surg 2017;152e170504. 10.1001/jamasurg.2017.0504. 28403427.
11. Glare P, Aubrey KR, Myles PS. Transition from acute to chronic pain after surgery. Lancet 2019;393:1537–46. 10.1016/s0140-6736(19)30352-6. 30983589.
12. Sinatra R. Causes and consequences of inadequate management of acute pain. Pain Med 2010;11:1859–71. 10.1111/j.1526-4637.2010.00983.x. 21040438.
13. Alam A, Gomes T, Zheng H, Mamdani MM, Juurlink DN, Bell CM. Long-term analgesic use after low-risk surgery: a retrospective cohort study. Arch Intern Med 2012;172:425–30. 10.1001/archinternmed.2011.1827. 22412106.
14. Dowell D, Haegerich TM, Chou R. CDC guideline for prescribing opioids for chronic pain--United States, 2016. JAMA 2016;315:1624–45. 10.1001/jama.2016.1464. 26977696.
15. Lawal OD, Gold J, Murthy A, Ruchi R, Bavry E, Hume AL, et al. Rate and risk factors associated with prolonged opioid use after surgery: a systematic review and meta-analysis. JAMA Netw Open 2020;3e207367. 10.1001/jamanetworkopen.2020.7367. 32584407.
16. Lee YH, Han K, Ko SH, Ko KS, Lee KU. Data analytic process of a nationwide population-based study using national health information database established by National Health Insurance Service. Diabetes Metab J 2016;40:79–82. 10.4093/dmj.2016.40.1.79. 26912157.
17. Chen G, Kim S, Taylor JM, Wang Z, Lee O, Ramnath N, et al. Development and validation of a quantitative real-time polymerase chain reaction classifier for lung cancer prognosis. J Thorac Oncol 2011;6:1481–7. 10.1097/jto.0b013e31822918bd. 21792073.
18. Chirikov VV, Shaya FT, Onukwugha E, Mullins CD, dosReis S, Howell CD. Tree-based claims algorithm for measuring pretreatment quality of care in medicare disabled hepatitis C patients. Med Care 2017;55:e104–12. 10.1097/mlr.0000000000000405. 29135773.
19. Gorodeski EZ, Ishwaran H, Kogalur UB, Blackstone EH, Hsich E, Zhang ZM, et al. Use of hundreds of electrocardiographic biomarkers for prediction of mortality in postmenopausal women: the women’s health initiative. Circ Cardiovasc Qual Outcomes 2011;4:521–32. 10.1161/circoutcomes.110.959023. 21862719.
20. Thottakkara P, Ozrazgat-Baslanti T, Hupf BB, Rashidi P, Pardalos P, Momcilovic P, et al. Application of machine learning techniques to high-dimensional clinical data to forecast postoperative complications. PLoS One 2016;11e0155705. 10.1371/journal.pone.0155705. 27232332.
21. Lo-Ciganic WH, Huang JL, Zhang HH, Weiss JC, Wu Y, Kwoh CK, et al. Evaluation of machine-learning algorithms for predicting opioid overdose risk among medicare beneficiaries with opioid prescriptions. JAMA Netw Open 2019;2e190968. 10.1001/jamanetworkopen.2019.0968. 30901048.
22. Raebel MA, Newcomer SR, Reifler LM, Boudreau D, Elliott TE, DeBar L, et al. Chronic use of opioid medications before and after bariatric surgery. JAMA 2013;310:1369–76. 10.1001/jama.2013.278344. 24084922.
23. Vissers KC, Besse K, Hans G, Devulder J, Morlion B. Opioid rotation in the management of chronic pain: where is the evidence? Pain Pract 2010;10:85–93. 10.1111/j.1533-2500.2009.00335.x. 20070552.
24. Gammaitoni AR, Fine P, Alvarez N, McPherson ML, Bergmark S. Clinical application of opioid equianalgesic data. Clin J Pain 2003;19:286–97. 10.1097/00002508-200309000-00002. 12966254.
25. Pereira J, Lawlor P, Vigano A, Dorgan M, Bruera E. Equianalgesic dose ratios for opioids. a critical review and proposals for long-term dosing. J Pain Symptom Manage 2001;22:672–87. 10.1016/s0885-3924(01)00294-9. 11495714.
26. Scott ML, Lee SI. A unified approach to interpreting model predictions In: NIPS’17: Proceedings of the 31st International Conference on Neural Information Processing Systems: New York, Curran Associates Inc. 2017, pp 4768-77.
27. Stark N, Kerr S, Stevens J. Prevalence and predictors of persistent post-surgical opioid use: a prospective observational cohort study. Anaesth Intensive Care 2017;45:700–6. 10.1177/0310057x1704500609. 29137580.
28. Campbell CI, Weisner C, Leresche L, Ray GT, Saunders K, Sullivan MD, et al. Age and gender trends in long-term opioid analgesic use for noncancer pain. Am J Public Health 2010;100:2541–7. 10.2105/ajph.2009.180646. 20724688.
29. Degen RM, McClure JA, Le B, Welk B, Marsh J. Persistent post-operative opioid use following hip arthroscopy is common and is associated with pre-operative opioid use and age. Knee Surg Sports Traumatol Arthrosc 2021;29:2437–45. 10.1007/s00167-021-06511-0. 33646372.
30. Hinther A, Abdel-Rahman O, Cheung WY, Quan ML, Dort JC. Chronic postoperative opioid use: a systematic review. World J Surg 2019;43:2164–74. 10.1007/s00268-019-05016-9. 31073685.
31. Melucci AD, Lynch OF, Wright MJ, Baran A, Temple LK, Poles GC, et al. Evaluating age as a predictor of postoperative opioid use and prescribing habits in older adults with cancer. J Am Med Dir Assoc 2022;23:678–83. 10.1016/j.jamda.2022.01.081. 35247360.
32. Wallen S, Szabo E, Palmetun-Ekback M, Naslund I, Ottosson J, Naslund E, et al. Impact of socioeconomic status on new chronic opioid use after gastric bypass surgery. Surg Obes Relat Dis 2023;19:1375–81. 10.1016/j.soard.2023.06.005. 37532668.
33. Thurston KL, Zhang SJ, Wilbanks BA, Billings R, Aroke EN. A systematic review of race, sex, and socioeconomic status differences in postoperative pain and pain management. J Perianesth Nurs 2023;38:504–15. 10.1016/j.jopan.2022.09.004. 36464570.
34. Kim YS. 172 emergency room visits by narcotics-addicted seniors in their 60s and above: record high in the past five years [Internet]. Seoul: Medical World News; 2024 Sep 16 [cited 2024 Nov 26]. Available from http://www.medicalworldnews.co.kr/news/view.php?idx=1510963304.
35. Mohamadi A, Chan JJ, Lian J, Wright CL, Marin AM, Rodriguez EK, et al. Risk factors and pooled rate of prolonged opioid use following trauma or surgery: a systematic review and meta-(regression) analysis. J Bone Joint Surg Am 2018;100:1332–40. 10.2106/jbjs.17.01239. 30063596.
36. Natekin A, Knoll A. Gradient boosting machines, a tutorial. Front Neurorobot 2013;7:21. 10.3389/fnbot.2013.00021. 24409142.
37. Paul P, Pennell ML, Lemeshow S. Standardizing the power of the Hosmer-Lemeshow goodness of fit test in large data sets. Stat Med 2013;32:67–80. 10.1002/sim.5525. 22833304.
38. Kramer AA, Zimmerman JE. Assessing the calibration of mortality benchmarks in critical care: the Hosmer-Lemeshow test revisited. Crit Care Med 2007;35:2052–6. 10.1097/01.ccm.0000275267.64078.b0. 17568333.
39. Humble SR, Dalton AJ, Li L. A systematic review of therapeutic interventions to reduce acute and chronic post-surgical pain after amputation, thoracotomy or mastectomy. Eur J Pain 2015;19:451–65. 10.1002/ejp.567. 25088289.
40. Hah JM, Bateman BT, Ratliff J, Curtin C, Sun E. Chronic opioid use after surgery: implications for perioperative management in the face of the opioid epidemic. Anesth Analg 2017;125:1733–40. 10.1213/ane.0000000000002458. 29049117.
41. Richman JM, Liu SS, Courpas G, Wong R, Rowlingson AJ, McGready J, et al. Does continuous peripheral nerve block provide superior pain control to opioids? A meta-analysis. Anesth Analg 2006;102:248–57. 10.1213/01.ane.0000181289.09675.7d. 16368838.
42. Oh TK, Song IA. Association of preoperative opioid and glucocorticoid use with mortality and complication after total knee or hip arthroplasty. J Korean Med Sci 2024;39e265. 10.3346/jkms.2024.39.e265. 39468946.
43. Yoo JI, Jang SY, Cha Y, Park CH, Kim JT, Oh S, et al. Effect of opioids on all-cause mortality and sustained opioid use in elderly patients with hip fracture: a Korea nationwide cohort study. J Korean Med Sci 2021;36e127. 10.3346/jkms.2021.36.e127. 34002547.
44. Woodcock BG, Kostev K, Shin JY. Benzodiazepine prescribing in the elderly in Germany and Korea: a comparison of two observational studies
. Int J Clin Pharmacol Ther 2017;55:480–2. 10.5414/cp203042. 28487010.
45. Park SY, Bae S, Shin JY. Real-world prescribing patterns of long-acting benzodiazepines for elderly Koreans in 2013
. Int J Clin Pharmacol Ther 2017;55:472–9. 10.5414/cp202974. 28487009.
46. Brown LM, Kratz A, Verba S, Tancredi D, Clauw DJ, Palmieri T, et al. Pain and opioid use after thoracic surgery: where we are and where we need to go. Ann Thorac Surg 2020;109:1638–45. 10.1016/j.athoracsur.2020.01.056. 32142814.
47. Kalakoti P, Hendrickson NR, Bedard NA, Pugely AJ. Opioid utilization following lumbar arthrodesis: trends and factors associated with long-term use. Spine (Phila Pa 1976) 2018;43:1208–16. 10.1097/brs.0000000000002734. 30045343.
48. Kakalecik J, Sipavicius E, Miley EN, Horodyski M, Gray CF, Prieto HA, et al. Opioid utilization after primary total hip and knee arthroplasty following sequential implementation of statewide legislation. Arthroplast Today 2023;25:101275. 10.1016/j.artd.2023.101275. 38229868.
49. Zywiel MG, Stroh DA, Lee SY, Bonutti PM, Mont MA. Chronic opioid use prior to total knee arthroplasty. J Bone Joint Surg Am 2011;93:1988–93. 10.2106/jbjs.j.01473. 22048093.

Article information Continued

Fig. 1.

Flow chart.

Fig. 2.

The stage period of analysis. Each patient was observed for 365 days before and after the hospitalization during which surgery was performed. The blue boxes indicate the conditions that should be fulfilled during their corresponding periods. The light green boxes indicate the parameters that should be measured during the given periods. MME: morphine milligram equivalent, POD: postoperative day.

Fig. 3.

Receiver operating characteristic and precision-recall curves. The x-axis and y-axis of the receiver operating characteristic curves indicate the false positive rate and true positive rate, respectively. The area under the curve (AUC) metrics are presented as mean ± standard deviation. GBM: gradient boosting machine, DT: decision tree, LR: logistic regression, FNN: feed-forward neural network, NB: naïve bayes, RF: random forest.

Fig. 4.

SHAP plot with the top 15 values. The x-axis represents a log-scaled domain of the feature space; each data point indicates a test sample. A feature value corresponds to a SHAP value that reflects the degree of contribution. Purple indicates that the value of the variable is large, while yellow indicates that the value is small. The numbers next to the variables represent the sum of each variable’s influence across all data. HospitalDay: length of hospital day, HospitalOpioid: consumption of opioid during hospital day per prescribed day, D_Opioid: preoperative use of opioid analgesics, D_antiC: preoperative use of anticonvulsant, D_antiD: preoperative use of antiderpessant, S_spine: general spinal surgery, C_CPD: presence of chronic pulmonary disease, C_mood: presence of mood disorder, C_OSD: presence of other somatoform disease, C_DM: presence of diabetes, D_BZD: preoperative use of benzodiazepine, C_Dyslipidemia: presence of dyslipidemia, C_Cancer: presence of cancer, S_lung: lung surgery, C_BZD: presence of benzodiazepine, SHAP: Shapley additive explanation.

Fig. 5.

Importance among surgery types. The x-axis represents the mean SHAP values; variables are listed in descending order of feature importance. TKA: total knee arthroplasty, TURP: transurethral resection of the prostate, THA: total hip arthroplasty, SHAP: Shapley additive explanation.

Table 1.

Baseline Characteristics

Variable Total (n = 1 108 119) Chronic group (n = 9308) Control group (n = 1 098 811) Median difference (95% CI)/OR (95% CI) P value
Demographic
 Age (yr) 48 (32, 62) 66 (57, 73) 48 (31, 62) 17.00 (17.00–17.00) < 0.001
 Sex (F) 758 715 (68.5) 5450 (58.6) 753 265 (68.6) 0.65 (0.62–0.68) < 0.001
Medical comorbidities
 Diabetes 274 630 (24.8) 4225 (45.4) 270 405 (24.6) 2.55 (2.44–2.65) < 0.001
 Hypertension 338 526 (30.5) 5881 (63.2) 332 645 (30.3) 3.95 (3.79–4.12) < 0.001
 Hyperlipidemia 323 627 (29.2) 5482 (58.9) 318 145 (29.0) 3.52 (3.37–3.67) < 0.001
 Ischemic heart disease 102 599 (9.3) 2226 (23.9) 100 373 (9.1) 3.13 (2.98–3.28) < 0.001
 Congestive heart failure 20 245 (1.8) 596 (6.4) 19 649 (1.8) 3.78 (3.45–4.08) < 0.001
 Chronic renal insufficiency 8123 (0.7) 235 (2.5) 7888 (0.7) 3.58 (3.13–4.07) < 0.001
 Chronic pulmonary disease 291 516 (26.3) 4760 (51.1) 286 756 (26.1) 2.96 (2.85–3.09) < 0.001
 Liver disease 293 652 (26.5) 4430 (47.6) 289 222 (26.3) 2.54 (2.44–2.64) < 0.001
 Cerebrovascular disease 76 127 (6.9) 1795 (19.3) 74 332 (6.8) 3.29 (3.13–3.47) < 0.001
 Alcohol abuse 5173 (0.5) 134 (1.4) 5039 (0.5) 3.17 (2.65–3.75) < 0.001
 Drug abuse 460 (0.0) 21 (0.2) 439 (0.0) 5.66 (3.54–8.54) < 0.001
 Psychosis 1980 (0.2) 57 (0.6) 1923 (0.2) 3.51 (2.67–4.53) < 0.001
 Other somatoform disease 190 144 (17.2) 3925 (42.2) 186 219 (16.9) 3.57 (3.43–3.72) < 0.001
 Dementia 26 969 (2.4) 909 (9.8) 26 060 (2.4) 4.46 (4.15–4.77) < 0.001
 Mental retardation 649 (0.1) 5 (0.1) 644 (0.1) 0.92 (0.33–1.98) 0.1
 Mood disorder 100 413 (9.1) 2801 (30.1) 97 612 (8.9) 4.42 (4.22–4.62) < 0.001
 Cancer 269 518 (24.3) 3552 (38.2) 265 966 (24.2) 1.93 (1.85–2.02) < 0.001
Preoperative medications
 Antidepressants 112 237 (10.1) 3201 (34.4) 109 036 (9.9) 4.76 (4.56–4.97) < 0.001
 Antipsychotics 72 772 (6.6) 1846 (19.8) 70 926 (6.5) 3.59 (3.40–3.77) < 0.001
 Anticonvulsants 88 030 (7.9) 2740 (29.4) 85 290 (7.8) 4.96 (4.74–5.19) < 0.001
 BZDs 337 126 (30.4) 5766 (61.9) 331 360 (30.2) 3.77 (3.62–3.93) < 0.001
 Opioid analgesics 687 375 (62.0) 8531 (91.7) 678 844 (61.8) 6.79 (6.32–7.32) < 0.001
 Non-opioid analgesics 1 034 821 (93.4) 9105 (97.8) 1 025 716 (93.3) 3.20 (2.79–3.69) < 0.001

Values are presented as median (Q1, Q3) or number (%). BZD: benzodiazepine, OR: odds ratio.

Table 2.

Perioperative Data

Variable Total (n = 1 108 119) Chronic group (n = 9308) Control group (n = 1 098 811) Median difference (95% CI)/OR (95% CI) P value
Type of surgery
 Cataract surgery 7906 (0.7) 55 (0.6) 7851 (0.7) 0.83 (0.63–1.07) 0.177
 Tonsillectomy (regardless of adenoidectomy) 19 702 (1.8) 37 (0.4) 19 665 (1.8) 0.22 (0.16–0.3) < 0.001
 Cardiac surgery 4710 (0.4) 34 (0.4) 4676 (0.4) 0.86 (0.6–1.18) 0.418
 Varicose vein ligation and removal 25 074 (2.3) 90 (1.0) 24 984 (2.3) 0.42 (0.34–0.51) < 0.001
 Appendectomy 57 140 (5.2) 122 (1.3) 57 018 (5.2) 0.24 (0.20–0.29) < 0.001
 Cholecystectomy 50 590 (4.6) 426 (4.6) 50 164 (4.6) 1.00 (0.91–1.12) 0.958
 Hernia repair, inguinal and femoral 14 889 (1.3) 102 (1.1) 14 787 (1.3) 0.81 (0.66–0.98) 0.041
 TURP 9273 (0.8) 120 (1.3) 9153 (0.8) 1.55 (1.29–1.85) < 0.001
 Prostatectomy (open, laparoscopic) 2888 (0.3) 25 (0.3) 2863 (0.3) 1.03 (0.68–1.49) 0.961
 Hysterectomy 34 559 (3.1) 241 (2.6) 34 318 (3.1) 0.82 (0.72–0.94) 0.003
 Cesarean section 66 268 (6.0) 13 (0.1) 66 255 (6.0) 0.02 (0.01–0.04) < 0.001
 Normal delivery 205 730 (18.6) 12 (0.1) 205 718 (18.7) 0.01 (0.00–0.01) < 0.001
 THA 19 936 (1.8) 374 (4.0) 19 562 (1.8) 2.31 (2.08–2.56) < 0.001
 TKA 67 821 (6.1) 1252 (13.5) 66 569 (6.1) 2.41 (2.27–2.56) < 0.001
 Mastectomy 20 621 (1.9) 64 (0.7) 20 557 (1.9) 0.36 (0.28–0.47) < 0.001
 Brain tumor 5743 (0.5) 80 (0.9) 5663 (0.5) 1.67 (1.34–2.09) < 0.001
 Upper GI tract surgery 17 667 (1.6) 190 (2.0) 17 477 (1.6) 1.29 (1.11–1.48) <0.001
 Thyroid surgery 44 866 (4.0) 143 (1.5) 44 723 (4.1) 0.37 (0.31–0.43) < 0.001
 Hemorrhoid surgery 33 280 (3.0) 158 (1.7) 33 122 (3.0) 0.56 (0.47–0.65) < 0.001
 General spine surgery 158 198 (14.3) 3335 (35.8) 154 863 (14.1) 3.40 (3.26–3.55) < 0.001
 Endoscopic spinal surgery 1242 (0.1) 6 (0.1) 1236 (0.1) 0.57 (0.23–1.16) 0.221
 Colorectal surgery 16 991 (1.5) 399 (4.3) 16 592 (1.5) 2.92 (2.64–3.23) < 0.001
 Hepatobiliary surgery 9378 (0.8) 277 (3.0) 9101 (0.8) 3.67 (3.25–4.14) < 0.001
 Lung surgery 14 972 (1.4) 546 (5.9) 14 426 (1.3) 4.68 (4.29–5.12) < 0.001
 Osteotomy 7813 (0.7) 42 (0.5) 7771 (0.7) 0.64 (0.46–0.85) 0.004
 Shoulder arthroplasty 1687 (0.2) 52 (0.6) 1635 (0.1) 3.77 (2.82–4.92) < 0.001
 Shoulder arthroscopy surgery 66 972 (6.0) 484 (5.2) 66 488 (6.1) 0.85 (0.78–0.93) 0.001
 Knee arthroscopy surgery 122 203 (11.0) 629 (6.8) 121 574 (11.1) 0.58 (0.54–0.63) < 0.001
Consumption of opioid, MME (mg)/prescribed day
 During hospitalization 10.00 (0.00, 63.00) 197.50 (12.88, 551.00) 10.00 (0.00, 60.00) 107.8 (100–115) < 0.001
 POD 8–30 0.00 (0.00, 0.00) 0.00 (0.00, 20.00) 0.00 (0.00, 0.00) 0 (0–0) < 0.001
 POD 31–90 0.00 (0.00, 0.00) 68.00 (0.00, 900.00) 0.00 (0.00, 0.00) 62 (60–63) < 0.001
 POD 91–365 0.00 (0.00, 0.00) 2640.00 (504.00, 5880.00) 0.00 (0.00, 0.00) 2640 (2600–2660) < 0.001
 All study period 10.00 (0.00, 60.00) 432.90 (213.00, 822.67) 10.00 (0.00, 55.00) 373 (366.4–380) < 0.001
Length of hospital stay (d) 7.00 (4.00, 13.00) 15.00 (9.00, 23.00) 7.00 (4.00, 12.00) 7 (6–7) < 0.001
All cause death
 Within 1.5 yr 1247 (0.1) 175 (1.9) 1072 (0.1) 19.62 (16.65–22.98) < 0.001
 Within 2.5 yr 7641 (0.7) 620 (6.7) 7021 (0.6) 11.10 (10.19–12.07) < 0.001
 Within 5 yr 29 687 (2.7) 1343 (14.4) 28 344 (2.6) 6.37 (6.0–6.75) < 0.001
 Within 10 yr 67 703 (6.1) 2101 (22.6) 65, 6.2 (6.0) 4.59 (4.37–4.82) < 0.001

Values are presented as number (%) or median (Q1, Q3). OR: odds ratio, TURP: transurethral resection of the prostate, THA: total hip arthroplasty, TKA: total knee arthroplasty, GI: gastrointestinal, MME: morphine milligram equivalent, POD: postoperative day.

Table 3.

Risk Factors for Chronic Opioid Use after Surgery from a Multiple Binary LR Model

Variable Partial regression coefficient (95% CI) Odds ratio (95% CI) P value
Intercept −7.28 (−7.79 to −6.81) < 0.001
Age (yr) 0.03 (0.03–0.03) 1.03 (1.03–1.03) < 0.001
Gender (F) −0.19 (−0.23 to −0.14) 0.82 (0.79–0.87) < 0.001
Medical comorbidities
 Diabetes 0.17 (0.13–0.22) 1.20 (1.14–1.26) < 0.001
 Hyperlipidemia 0.17 (0.12–0.22) 1.19 (1.13–1.25) < 0.001
 Chronic pulmonary disease 0.24 (0.20–0.28) 1.26 (1.20–1.32) < 0.001
 Other somatoform disease 0.16 (0.11–0.22) 1.18 (1.12–1.24) < 0.001
 Mood disorder 0.20 (0.14–0.26) 1.24 (1.17–1.33) < 0.001
 Cancer 0.23 (0.18–0.29) 1.27 (1.20–1.35) < 0.001
Preoperative medications
 Antidepressants 0.39 (0.33–0.44) 1.48 (1.40–1.57) < 0.001
 Anticonvulsants 0.51 (0.46–0.56) 1.68 (1.59–1.77) < 0.001
 BZDs 0.23 (0.18–0.28) 1.27 (1.21–1.34) < 0.001
 Opioid analgesics 1.40 (1.32–1.48) 3.96 (3.66–4.30) < 0.001
Type of Surgery
 Cataract 0.01 (−0.33 to 0.32) 1.01 (0.72–1.38) 0.974
 Tonsillectomy −0.18 (−0.59 to 0.20) 0.83 (0.55–1.22) 0.352
 Cardiac −1.25 (−1.68 to −0.85) 0.28 (0.19–0.42) < 0.001
 Varicose vein ligation and removal 0.30 (0.02–0.57) 1.36 (1.02–1.77) 0.032
 Appendectomy −0.41 (−0.66 to −0.16) 0.67 (0.52–0.85) 0.001
 Cholecystectomy −0.19 (−0.39 to 0.00) 0.82 (0.68–1.00) 0.05
 Hernia 0.12 (−0.15 to 0.38) 1.13 (0.86–1.47) 0.376
 TURP 0.30 (0.04–0.55) 1.34 (1.04–1.73) 0.021
 Prostatectomy −0.92 (−1.41 to −0.48) 0.40 (0.24–0.62) < 0.001
 Hysterectomy 0.20 (−0.02 to 0.41) 1.22 (0.98–1.51) 0.072
 Cesarean section −1.69 (−2.37 to −1.12) 0.18 (0.09–0.33) < 0.001
 Normal delivery −3.01 (−3.68 to −2.44) 0.05 (0.03–0.09) < 0.001
 THA 0.13 (−0.65 to 0.34) 1.14 (0.94–1.40) 0.197
 TKA 0.04 (−0.14 to 0.22) 1.04 (0.87–1.25) 0.669
 Mastectomy −0.44 (−0.76 to −0.14) 0.64 (0.47–0.87) 0.004
 Brain tumor −0.34 (−0.64 to −0.05) 0.71 (0.53–0,95) 0.020
 Thyroid −0.78 (−1.03 to −0.54) 0.46 (0.36–0.58) < 0.001
 Hemorrhoid 0.39 (0.16–0.63) 1.48 (1.17–1.87) 0.001
 General spine 0.57 (0.41–0.75) 1.77 (1.50–2.11) < 0.001
 Endoscopic spinal −0.11 (−1.16 to 0.68) 0.89 (0.31–1.98) 0.782
 Colorectal 0.33 (0.14–0.53) 1.40 (1.15–1.71) 0.001
 Hepatobiliary 0.49 (0.27–0.70) 1.62 (1.32–2.01) < 0.001
 GI tract −0.32 (−0.55 to −0.10) 0.72 (0.58–0.91) 0.005
 Lung 0.84 (0.65–1.04) 2.23 (1.92–2.82) < 0.001
 Shoulder arthroplasty 0.44 (0.08–0.77) 1.55 (1.08–2.16) 0.011
 Shoulder arthroscopy 0.00 (−0.18 to 0.19) 1.00 (0.83–1.21) 0.986
 Knee arthroscopy 0.38 (0.19–0.56) 1.46 (1.22–1.76) 0.001
 Osteotomy 0.05 (−0.32 to 0.40) 1.05 (0.72–1.49) 0.778
Length of hospital stay (d) 0.02 (0.02–0.03) 1.02 (1.02–1.03) < 0.001
Consumption of opioid, MME/prescribed day 0.00 (0.00–0.00) 1.00 (1.00–1.00) < 0.001

LR: logistic regression, BZD: benzodiazepine, TURP: transurethral resection of the prostate, THA: total hip arthroplasty, TKA: total knee arthroplasty, GI: gastrointestinal tract, MME: morphine milligram equivalent.