Skip to Content
PharmacoepidemiologyPharmacoepidemiology
  • Article
  • Open Access

2 November 2026

14 Pages

Documented Mental Health Disorders and Long-Term Opioid Therapy After Hospital Discharge in a Predominantly Cardiothoracic Surgical Cohort

and
1
Department of Medicine, Faculty of Medicine and Health Sciences, McGill University, Montréal, QC H4A 3J1, Canada
2
Clinical & Health Informatics Research Group, McGill University, Montréal, QC H3A 1G1, Canada
3
McGill University Health Centre (MUHC), Montréal, QC H4A 3J1, Canada
4
Department of Epidemiology, Biostatistics and Occupational Health, School of Population and Global Health, Faculty of Medicine and Health Sciences, McGill University, Montréal, QC H3A 1G1, Canada

Abstract

Background/Objectives: We evaluated the association of documented mental health disorders with long-term opioid therapy (LTOT) after hospital discharge in predominantly cardiothoracic surgical RightRx participants. Methods: The retrospective cohort included 999 patients newly prescribed an opioid at discharge. The 15-category administrative definition was checked against patient-level diagnosis records, and two erroneous code mappings were corrected. The corrected mental health composite identified 153 patients. LTOT was defined as ≥90 cumulative modeled days supplied within discharge days 0–179. Adjusted Firth regression included age, sex, and trial arm. Results: Four patients were reclassified from the original 157-person mental health group; none met LTOT. LTOT occurred in 14/999 (1.4%): 2/153 (1.31%) with and 12/846 (1.42%) without a corrected documented mental health disorder (adjusted OR 1.07, 95% CI 0.20–3.73; risk difference −0.11 percentage points, 95% CI −1.52 to 3.28). The adjusted opioid fill-rate ratio was 1.51 (95% CI 1.27–1.79), attenuating to 1.14 (95% CI 0.97–1.35) after removal of two extreme fill counts. A distinct late-dispensing outcome (≥1 eligible opioid fill on days 90–179) occurred in 89 patients (adjusted OR 1.42, 95% CI 0.80–2.41). Conclusions: LTOT was rare, and the confidence interval remains compatible with clinically important associations. Coding corrections did not materially alter the principal interpretation. The fill-frequency finding is upper-tail-sensitive and exploratory. Incomplete longitudinal pharmacy eligibility and predominantly surgical case mix limit inference.

1. Introduction

Opioids are frequently used for acute pain management during and after hospitalization, but opioid exposure initiated at hospital discharge can become a clinically important pathway to longer-term use. In a cohort of opioid-naïve hospitalized patients, Calcaterra et al. found that receipt of an opioid prescription at hospital discharge was associated with increased future chronic opioid use, highlighting discharge prescribing as an important medication-safety transition point [1]. The characteristics of early opioid exposure may influence the likelihood of continued opioid use. Shah et al. found that features of the initial opioid prescription, particularly prescription duration, were important predictors of continued opioid use among opioid-naïve patients, suggesting that early prescribing decisions may shape later opioid trajectories [2]. Persistent opioid use after hospital discharge has therefore become a target for opioid stewardship. Hapca et al. reported that persistent post-discharge opioid use may occur among patients discharged with new strong opioids and emphasized the role of opioid stewardship in rationalizing opioid use during hospitalization and after discharge [3].
Mental health disorders are clinically relevant when studying post-discharge opioid use because psychiatric comorbidity may coexist with pain, increase symptom burden, complicate medication management, and influence outpatient follow-up after hospitalization. In surgical populations, Brummett et al. found that new persistent opioid use after minor and major surgery was associated with patient-level factors including mental health and pain-related conditions, suggesting that persistent opioid use may reflect broader patient vulnerability rather than procedure intensity alone [4].
Recent syntheses of the surgical and trauma literature continue to identify mental health conditions as potential correlates of new persistent opioid use among opioid-naïve patients. A systematic review and meta-analysis by Lee et al. associated preoperative anxiety, depression, and benzodiazepine use with new persistent opioid use after surgery [5]. However, evidence is heterogeneous across indications, psychiatric diagnoses, outcome definitions, and healthcare settings [6]. The present secondary analysis of RightRx data was predominantly composed of patients from cardiothoracic surgery services, rather than a representative cohort of all hospital discharges.
Hospital discharge is a medication transition where prescribing, medication reconciliation, counseling, and access to follow-up may influence outpatient opioid dispensing. Because our source cohort was predominantly cardiothoracic surgical, the present analysis addresses post-discharge opioid exposure in this particular clinical population rather than filling a gap for all general hospital discharges.
Opioid-specific discharge interventions are increasingly studied. A systematic review by Phinn et al. evaluated organizational interventions designed to improve opioid prescribing for noncancer pain at discharge [7]. Against this background, our primary objective was to estimate the association between any documented mental health disorder and long-term opioid therapy (LTOT), defined by cumulative opioid days supplied during 180 days after discharge, among opioid-naïve RightRx participants newly prescribed an opioid. Our secondary objective was to examine any outpatient opioid dispensing, number of fills, and cumulative opioid days supplied. On the basis of published associations in surgical cohorts, we hypothesized that documented mental health disorders would be associated with greater post-discharge opioid exposure; the small number of LTOT events ultimately constrained evaluation of this hypothesis.

2. Materials and Methods

2.1. Study Design and Setting

A retrospective cohort study was conducted within the RightRx cluster-randomized trial at the McGill University Health Centre (MUHC), Montréal, Québec, Canada, between October 2014 and November 2016. The MUHC is a large tertiary academic health network. RightRx enrolled adult patients admitted to participating internal medicine and cardiothoracic surgery units at the Royal Victoria Hospital and the Montreal General Hospital. RightRx compared usual-care discharge medication reconciliation with an electronic medication reconciliation intervention integrated into hospital workflow. In the intervention arm, clinicians had access to electronically retrieved community medication information and a structured reconciliation process to support review of admission and discharge medications. In the control arm, medication reconciliation was performed according to usual care at participating units, without the full electronic reconciliation workflow used in the intervention arm. The RightRx study design and electronic reconciliation process have been reported previously [8,9].
The published parent RightRx trial required provincial drug-insurance coverage at enrollment, included discharged patients from eligible study units and only their first eligible hospitalization, and excluded patients who died before hospital discharge [9]. These parent-trial eligibility criteria do not establish uninterrupted outpatient pharmacy-claims eligibility throughout the subsequent 180-day analytic follow-up.

2.2. Data Sources

Patient-level information was obtained from linked provincial administrative databases and the RightRx trial database. Régie de l’assurance maladie du Québec (RAMQ) administrative data included outpatient pharmacy claims, physician billing claims, and beneficiary information. The MED-ÉCHO hospitalization database provided admission and discharge dates and hospitalization-related information. The mental-health exposure was derived from combined RAMQ/MOXXING medical-services diagnosis records. A separate diagnosis-level comparison of MED-ÉCHO index-admission diagnoses with the medical-services classification assessed patient and index-admission linkage and the capture of qualifying mental-health diagnoses (Supplementary Table S14). The RightRx trial database included the validated community medication list compiled at admission and the discharge prescription generated for each eligible admission. Hospital discharge medication data were used to identify newly prescribed opioids at discharge. Outpatient pharmacy claims were used to ascertain opioid exposure before admission and opioid dispensing during the 180-day follow-up period after discharge.

2.3. Study Population and Index Discharge

The RightRx parent-study extract contained 3567 patient records. The linked discharge-prescribing source available for this analysis comprised 2544 participants; the individual linkage and exclusion steps between the parent cohort and this source extract could not be reconstructed completely from the retained files. Among these 2544 participants, 1162 (45.7%) had at least one new analgesic opioid on the discharge prescription that was absent from the validated pre-admission community medication list, while 1382 did not. We excluded 163 of the 1162 participants (14.0%) with qualifying outpatient opioid dispensing in the 180 days before admission, leaving 999 opioid-naïve patients (Figure 1). Each patient contributed one index discharge in the analytic extract; no patient identifier was repeated. All 999 were classified as discharged home in the linked trial extract. Patients without a qualifying dispensing record during follow-up remained in the analysis with zero opioid days supplied. The separately retained short-baseline pharmacy extract could not be used to independently reconstruct the full 180-day opioid-naïve look-back; the final analysis uses the pre-established opioid-naïve cohort. We verified that all 999 analytic identifiers link to the 3567-record parent extract and carry its parent-trial eligibility indicator; this does not reconstruct the 1023 records absent from the curated 2544-person discharge extract. Ten members of the final analytic cohort had at least one pre-admission claim for an opioid product excluded from the historical opioid-naïve algorithm (fentanyl patches, single-ingredient codeine, or methadone), underscoring that opioid-naïve status is operational rather than absence of all opioid pharmacotherapy.
Figure 1. Selection of the 999-patient opioid-naïve cohort and qualifying 180-day outpatient opioid outcomes. Percentages use the immediate parent group as the denominator unless otherwise specified. Overall, 14/999 (1.4%) met LTOT and 985/999 (98.6%) did not, including the 175 patients without follow-up opioid dispensing. LTOT = long-term opioid therapy; MH = documented mental health disorder.

2.4. Documented Mental Health Disorders

Documented mental health disorders were identified from administrative ICD-9/ICD-10 diagnosis records between 12 months before admission and seven days after discharge; one qualifying code sufficed. The seven-day extension captured delayed coding linked to the index admission but may include diagnoses not known at discharge. The SAS exposure pipeline constructed BILO from medical services, a deduplicated combination of RAMQ/MOXXING medical-service extracts. Its diagnostic rules were reconstructed using dated medical-services records and description labels, with questionable mappings checked against classification references. The medical-services coding assessment did not independently evaluate MED-ÉCHO hospitalization diagnoses. In a separate MED-ÉCHO index-admission audit, all 999 participants were linked to their corresponding hospitalization records, and admission and discharge dates were compared with the parent RightRx records to verify the index admissions. ICD-9/ICD-10 diagnoses were standardized for formatting, including punctuation, and the corrected mental-health algorithm was applied to both sources. Qualifying diagnoses were compared at the patient and diagnostic-code/category level within the defined ascertainment window, after deduplicating repeated diagnosis rows to distinct patient–diagnosis-code pairs. Among the 999 participants, 43 had a qualifying MED-ÉCHO index-admission mental-health diagnosis; all 43 were included among the 153 medical-services-positive patients, with no MED-ÉCHO-only positives. The diagnosis-level comparison confirmed that every qualifying index-hospitalization MED-ÉCHO diagnosis was represented in the medical-services classification (Supplementary Table S14). This index-admission assessment does not establish complete longitudinal inpatient diagnosis coverage or clinical validity of the phenotype. Two nonpsychiatric mappings (ICD-9 2898 in the psychosis category and ICD-10 V654 in the addictive category) were removed; 4 patients positive only through these codes moved to the unexposed group, yielding 153 exposed and 846 unexposed participants. Potentially ambiguous tobacco- or alcohol-related codes and overlapping mood codes were retained and are described in Supplementary Table S11. Delirium/confusion was retained in the broad source-defined neuropsychiatric composite for comparability, although acute or postoperative delirium differs etiologically from established psychiatric morbidity; an exclusion analysis was conducted. The separately coded serious-mental-illness (SMI) descriptor excludes the ICD-9 293 delirium prefix. Category counts and operational coding definitions are in Supplementary Tables S3, S5 and S11. A discharge-only exposure sensitivity was also fitted. These administrative categories have not been independently clinically adjudicated [10].

2.5. Long-Term Opioid Therapy (LTOT)

The designated primary outcome was long-term opioid therapy (LTOT), defined as ≥90 modeled cumulative opioid days supplied during discharge days 0–179, a stringent administrative threshold consistent with published variation in LTOT definitions [11]. Four qualifying opioid categories were newly prescribed at discharge: oxycodone (799 patients), hydromorphone (185), morphine (20), and codeine–acetaminophen (1); these categories overlap because some patients had more than one newly prescribed opioid. The same restricted qualifying drug-name categories applied to baseline opioid-naïve classification and 180-day follow-up. Transdermal fentanyl, single-ingredient codeine, and methadone were excluded by the operational selection rule; tramadol, tapentadol, hydrocodone, and other ATC-class examples were not additional eligible products under that rule (Supplementary Tables S2 and S12). The patient-level calculation shifted overlapping positive-duration supplies forward across opioid molecules, removed duplicate dispensings, and truncated supplied days at day 179; modeled supply is not confirmed consumption. Alternative measurement assumptions are described in Supplementary Table S4. To evaluate persistence under a less stringent but clinically distinct approach, we also assessed ≥1 qualifying outpatient opioid dispensing during discharge days 90–179, adapted from postoperative persistence literature [4,12]. This outcome indicates late dispensing rather than ≥90 cumulative supplied days. Exploratory broader-product analyses included the excluded products, while retaining the 14-event restricted primary endpoint for comparison (Supplementary Tables S12 and S13).

2.6. Secondary Outcomes

Secondary opioid-dispensing outcomes were any qualifying opioid dispensed, number of opioid fills, and cumulative opioid days supplied during the same strict 180-day window. Fill counts capture dispensing frequency but not necessarily duration of opioid use. These outcomes were chosen to distinguish initiation and repeated dispensing from the stringent LTOT threshold.

2.7. Covariates and Follow-Up Ascertainment

The primary adjustment set included age at admission, sex, and RightRx intervention arm to limit model complexity given only 14 primary events. Baseline medication burden was the source-calculated count of distinct drugs dispensed in the three calendar months preceding admission, using outpatient prescription records. Baseline psychotropic medication indicators were derived from dispensing in the same three-month pre-admission window. Comorbidity burden was the source-derived sum of 27 diagnosis-based comorbidity indicators plus a separately coded dementia indicator; relevant diagnoses were collected from 12 months before admission through one day after admission, according to the study SAS algorithm. These measures were added separately in sensitivity analyses. Admitting clinical service (internal medicine vs. cardiothoracic surgery) was considered in a further sensitivity model. Pain-related conditions, healthcare utilization, and psychotropic medication indicators were described rather than jointly modeled with the primary outcome. Cancer and initial discharge opioid formulation, quantity, duration, and dose could also be relevant, but sparse events and incomplete harmonization prevented reliable comprehensive adjustment. Because discharge opioid characteristics can follow from mental health and other clinical factors, adjusting for them would require clarification of the causal estimates. For the source model, all 999 patients had non-missing values for age, sex, trial arm, medication burden, comorbidity count, and admitting-service category. A linked parent-extract CANCER flag (401/999, 40.1%) was summarized and added in an exploratory fit; 55/521 participants in the intervention arm and 346/478 in usual care were flag-positive. The full parent extract reproduces the published arm-specific cancer totals (297/1690 intervention and 900/1877 usual care) [9]. This variable is not proof of active malignancy or an opioid indication. The four study units can be mapped using hospital and admitting service, and arm assignments agreed for all 999 uniquely matched patients when compared with the parent-study file. The parent randomized trial used a two-step cluster bootstrap for its randomized intervention effect [9]. A comparable bootstrap was considered here; however, the exposure was not randomized, the analytic sample has only four units and 14 LTOT events, and stable cluster-resampled Firth intervals are not supported without unverifiable assumptions. Resampling two trial units per arm yields very few distinct first-stage cluster compositions and potentially zero-event strata; a stable cluster-bootstrap confidence interval cannot be established from the retained four-unit, 14-event cohort. Primary intervals remain patient-level, unadjusted for intra-unit correlation.

2.8. Statistical Analysis

Baseline characteristics are summarized as counts and percentages or medians with interquartile ranges. For LTOT, we report the group proportions, Fisher exact test, an absolute risk difference with a Newcombe 95% confidence interval based on Wilson score limits, and Firth penalized logistic regressions to reduce sparse-data estimation bias. The primary adjusted model included mental health disorder, age, sex, and intervention arm; sensitivity models separately added baseline medication burden, comorbidity count, or clinical service. Profile penalized-likelihood confidence intervals were used for Firth odds ratios. We re-estimated the adjusted model after restricting exposure ascertainment through discharge, removing the delirium/confusion category, and including the source cancer flag separately; we also compared the historical and corrected coding classifications. The separate MED-ÉCHO index-admission audit assessed patient and admission-date linkage and patient-by-code/category concordance with medical-services; it did not modify the designated primary model (Supplementary Table S14). For the product-definition sensitivity, we fit analogous age-, sex-, and trial-arm–adjusted Firth regressions to the broadened LTOT event indicator in the original 999-patient cohort and after excluding the 10 patients with baseline claims for excluded products. Because only 14 primary events occurred, penalization cannot restore statistical power or eliminate residual confounding.
For secondary outcomes, modified Poisson regression with robust standard errors estimated risk ratios for any dispensing, and negative binomial regression estimated rate ratios for opioid fill counts and cumulative days supplied. Covariates were mental health disorder, age, sex, and intervention arm. Fill-count variance exceeded its mean in both groups (variance-to-mean ratios 2.10 and 41.34 for patients without and with documented mental health disorders), consistent with overdispersion. We report crude and adjusted estimates. Exploratory influence diagnostics successively omitted the maximum fill count, both observations with at least 20 fills, all 9 patients with at least 10 fills, and the 14 LTOT patients from fill-count models; separate opioid-days refits excluded LTOT patients or the 6 patients with at least 120 supplied opioid days. These outcome-defined restrictions were post hoc diagnostic checks and did not alter the full-cohort primary or secondary estimates. A late-fill indicator based on at least one eligible opioid dispensing dated 90–179 days after discharge was fitted with an otherwise analogous Firth logistic model. Broad-product and baseline-classification checks were exploratory and preserved the original operational endpoint. The parent RightRx trial randomized four clinical units; patient-level confidence intervals here were not cluster-adjusted because robust cluster variance estimation based on four units is unreliable. Therefore, reported intervals do not address within-unit correlation, an additional inference limitation.
All analyses were performed using SAS 9.4;. The strict 180-day analytic definition counts outpatient dispensing from discharge (day 0) through day 179. Analyses distinguish the designated primary outcome from exploratory measurement and influence checks.

3. Results

3.1. Cohort Selection and Descriptive Characteristics

The linked discharge source cohort contained 2544 patients, of whom 1162 (45.7%) were newly prescribed an opioid at discharge. Excluding 163 with prior opioid dispensing yielded 999 opioid-naïve patients (Figure 1). There were 926 (92.7%) cardiothoracic surgical and 73 (7.3%) internal medicine admissions, including 136 and 17 patients with documented mental health disorders, respectively. A total of 857 participants (85.8%) had a recorded index surgery. Under the corrected code definition, documented mental health disorders occurred in 153 (15.3%) patients; 157 (15.7%) had been classified under the original algorithm.
Baseline and discharge characteristics by the corrected exposure appear in Table 1. The cohort had a median age of 69 years, 35.8% were women, and 52.2% were in the intervention arm. Anxiety, depression, and adjustment disorder were the most frequent documented categories, although Table 1 displays selected categories only; Supplementary Table S3 gives all 15 categories. Psychotropic dispensing does not establish an administrative diagnosis. Service-stratified and discharge-molecule counts, stratified by mental health status, are provided in Supplementary Tables S6–S8.
Table 1. Pre-admission and discharge characteristics of opioid-naïve patients newly prescribed opioids at discharge, by mental health disorder status.
Primary outcome: LTOT occurred in 14/999 patients (1.4%; 14/824 or 1.7% among those with an eligible dispensing): 2/153 (1.31%) with and 12/846 (1.42%) without corrected documented mental health disorders. The absolute risk difference was −0.11 percentage points (Newcombe 95% CI −1.52 to 3.28). No clinically important association can be excluded with these sparse events. Table 2 presents Firth estimates; Supplementary Table S11 contrasts the historical and corrected results.
Table 2. Association between documented mental health disorder and long-term opioid therapy within 180 days after discharge.
After correction of two erroneous administrative mappings, the adjusted LTOT odds ratio was 1.07 (95% profile penalized-likelihood CI 0.20–3.73), compared with 1.04 (0.20–3.62) using the historical exposure. The exposure-only and alternative adjustment estimates remained imprecise (Table 2). Restricting corrected mental health ascertainment to discharge yielded 150 exposed patients and an adjusted OR of 1.09 (95% CI 0.21–3.78). Excluding delirium/confusion reclassified eight additional patients (145 exposed) and gave an adjusted OR of 1.13 (95% CI 0.22–3.93). The source cancer-flag–adjusted estimate was 1.06 (95% CI 0.20–3.68). A separate alternative outcome of any eligible opioid fill during days 90–179 occurred in 89/999, including 18/153 corrected exposed patients; its adjusted OR was 1.42 (95% CI 0.80–2.41). This last outcome concerns late dispensing rather than 90 cumulative supplied days. The historical opioid-product rules identified 14 LTOT events. Including transdermal fentanyl, single-ingredient codeine, and methadone in follow-up generated 19 events (4/153 with and 15/846 without corrected MH); the adjusted Firth OR was 1.55 (95% CI 0.46–4.26). In a further exploratory analysis excluding 10 people with baseline claims for these historically excluded products, 16/989 met the broadened endpoint (3/151 corrected MH versus 13/838 without; adjusted OR 1.40, 95% CI 0.35–4.25). These analyses retain the original discharge-defined source cohort and do not reproduce a newly ascertained opioid-naïve population (Supplementary Tables S12 and S13). In the separate MED-ÉCHO index-admission audit, all 999 patients and admissions were matched; 43 were MED-ÉCHO-positive, and all 43 were already among the 153 medical-services-positive patients (Supplementary Table S14). The designated 14-event primary endpoint and adjusted OR of 1.07 were unchanged.

3.2. Secondary Opioid Dispensing Outcomes

Among patients without versus with a corrected documented mental health disorder, 700/846 (82.7%) versus 124/153 (81.0%) had an eligible follow-up fill. Mean opioid days supplied were 11.39 versus 14.01, and mean opioid fill counts were 1.39 versus 2.61 (Table 3). The medians remained five versus six opioid days and one fill in each group.
Table 3. Secondary opioid-dispensing outcomes.
Adjusted models did not detect clear associations with any qualifying follow-up dispensing (RR 0.98, 95% CI 0.91–1.07) or cumulative supplied opioid days (rate ratio 1.09, 95% CI 0.87–1.37). The corrected-exposure adjusted fill-rate ratio was 1.51 (95% CI 1.27–1.79), and it declined to 1.22 (95% CI 1.04–1.44) when the 127-fill observation was omitted and 1.14 (95% CI 0.97–1.35) after both high-fill observations were removed. The medians were identical and the sensitivity analysis was exploratory. The two extreme exposed-group observations were 22 and 127 fills, compared with a maximum of 19 in the comparison group (Supplementary Figure S1 and Table S4 or Table S9).

4. Discussion

In this predominantly cardiothoracic surgical RightRx cohort, only 14/999 participants met the original ≥90-day operational LTOT threshold. Two plainly inappropriate diagnostic mappings were identified and corrected: the primary adjusted OR moved from 1.04 to 1.07, without altering the 14 LTOT events or supporting any inference of absence of an association. An additional exclusion of the acute delirium category, which may reflect hospital-associated illness rather than pre-existing psychiatric vulnerability, did not materially change this uncertainty. The separate MED-ÉCHO index-admission assessment found that the 43 MED-ÉCHO-positive participants were already included among the 153 medical-services-positive participants and that all qualifying MED-ÉCHO index diagnoses were represented at the diagnosis level. This finding does not establish longitudinal inpatient ascertainment or clinical validation. The wide confidence interval remains compatible with clinically important effects in either direction.
Observed cumulative opioid supply was generally short. Our data link hospital discharge prescriptions with outpatient claims but do not establish that discharge prescriptions could not be refilled, nor do they identify why specific patients subsequently received or did not receive opioids. Outpatient prescribing decisions, symptom burden, pharmacy access, and changes in clinical condition may influence follow-up dispensing, but these processes were not directly evaluated.
The LTOT frequency depends on its operational definition. At least 90 cumulative days supplied in 180 days is more stringent than definitions such as any dispensing between postoperative days 90 and 180 used by Brummett et al. [4]; heterogeneity of definitions has been reviewed systematically [11]. Our stockpiling assumption shifted supply across molecules, but analyses applying alternate overlap rules classified 13 or 9 patients as meeting LTOT. These are measurement sensitivities, not evidence of differential true consumption. The present study period (2014–2016), sample composition, claims-based exposure, and uncommon LTOT outcome limit direct comparison with reports from other surgical or trauma populations [4,5,6]. The alternative day-90–179 dispensing indicator identified 89 participants, illustrating how less stringent persistence definitions capture different populations [4,12]. It should not be interpreted as equivalent to long-term continuous use.
No clear adjusted association was observed with having any eligible post-discharge fill or with cumulative opioid days supplied. These secondary outcomes capture distinct aspects of pharmacy claims and cannot establish equivalence in actual opioid consumption. Within-service descriptive LTOT proportions also vary, emphasizing that extrapolation to other admitting services is inappropriate and that residual confounding is possible. In a product-definition sensitivity analysis, five additional participants met ≥90 modeled supplied days when excluded opioid types were included during follow-up (19 versus 14 events; corrected-exposure adjusted Firth OR 1.55, 95% CI 0.46–4.26). Exclusion of the 10 people with baseline use of those historically excluded drugs left 16 events among 989 patients (adjusted OR 1.40, 95% CI 0.35–4.25). These comparisons are exploratory and do not reconstruct a new discharge cohort; a broad product definition could affect incidence, opioid-naïve classification, and association estimates. The restricted original endpoint should be interpreted accordingly.
A higher mean opioid fill count was observed among patients with documented mental health disorders, but the full-cohort secondary estimate was sensitive to the upper tail of the count distribution. Both groups had a median of one fill, and several exploratory influence refits attenuated the estimated association. Even the smaller, sometimes nominally significant ratios from outcome-defined subsets should not be interpreted as independent confirmatory tests; the cutoffs were selected after observing the distribution and change the analyzed population. We therefore consider this association hypothesis-generating. Explanations involving smaller quantities per fill, fragmented follow-up, switching molecules, or closer monitoring cannot be distinguished using these data and should not be treated as demonstrated clinical trajectories.
Our results differ from some studies associating mental health conditions with persistent post-discharge opioid use. For example, Hapca et al. reported an association with pre-admission mental health history in a cohort of patients referred to an acute pain service and discharged with strong opioids [3]. That population, its inclusion of some patients with prior opioid exposure, clinical follow-up and outcome definition differ from our opioid-naïve, predominantly cardiothoracic surgical cohort and stringent cumulative-days endpoint. Comparisons with other surgical studies are likewise complicated by variations in case mix, coding, calendar period, and statistical precision [4,5,6]. The present broad mental health composite encompasses heterogeneous administrative diagnoses rather than a validated disorder-specific measure. Discharge opioid dose and duration were not uniformly harmonized. Larger studies should evaluate diagnosis-specific effects and account for pain, cancer-related indications, initial opioid exposure, and actual time under observation. Recent reviews also emphasize variable definitions and clinical settings in postoperative opioid persistence [6,12]. The 2014–2016 data do not support attributing observed dispensing to active cancer pain, even though a source cancer flag was common and unequally distributed between randomized arms.

5. Strengths and Limitations

This analysis linked hospital discharge prescribing information with outpatient pharmacy claims, applied a clearly specified patient-level duration algorithm, and distinguished cumulative opioid days from dispensing frequency. The analytic cohort and principal estimates were checked against the SAS source datasets and output tables. Targeted sensitivity analyses investigated administrative diagnosis timing, clinical service, differing assumptions about overlapping opioid supplies, and the potential influence of unusually high fill counts. These checks improve transparency but do not overcome the design and data limitations described below. The 15 mental-health categories were reconstructed from 1,287,870 medical-services records; two code-to-category errors were corrected, delirium and SMI specificity were assessed, all 999 primary days-supplied values were reproduced, and adjusted models were refitted. A separate MED-ÉCHO index-admission audit matched 999/999 index admissions and found 43/43 MED-ÉCHO-positive patients represented among those classified positive in medical-services, alongside complete qualifying-diagnosis capture (Supplementary Table S14). These steps improve reproducibility and assessment of index-admission source coverage, but do not establish complete longitudinal coverage or eliminate the study’s design limitations.
The primary limitation is that only 14 patients met the LTOT definition, including two with documented mental health disorders. The resulting wide confidence interval precludes excluding clinically important associations, notwithstanding Firth penalization. Mental health diagnoses were heterogeneous. The separate MED-ÉCHO assessment found complete capture of qualifying index-hospitalization diagnoses by the medical-services classification. That finding does not establish completeness of inpatient diagnoses from other admissions or clinical validity of the administrative phenotype; including diagnoses entered during the seven days after discharge also creates potential temporal misclassification. The sample was drawn mainly from cardiothoracic surgery units in a single health network in 2014–2016 and is not representative of general hospital discharges. Selection from the 3567-person parent extract to the 2544-person linked source extract could not be fully reconstructed. Dispensing claims do not confirm ingestion and the carry-forward calculation is sensitive to the handling of overlapping prescriptions. Complete outpatient pharmacy eligibility throughout the 180-day follow-up, verified coverage-termination dates, and patient-level death and readmission dates were unavailable. The available parent-trial short-term hospitalization and mortality indicators (Supplementary Table S10) are not a substitute for complete time-at-risk data. Three patients coded as deceased in interview status were excluded in an exploratory check without changing the 14 LTOT events or the rounded adjusted estimate; this was not a censoring or competing-risk analysis. Patients with no qualifying outpatient dispensing were assigned zero supplied days; for 110 of the 175 such patients, at least one other outpatient drug claim was observed, while 65 had none, which cannot distinguish non-adherence from incomplete ascertainment or other causes. The parent study randomized only four clinical units; adjusting for treatment arm without a cluster-level variance correction may underestimate uncertainty. Pain severity, cancer-related indications, and initial opioid prescribing details could not be fully accounted for. Finally, the opioid fill-count association was strongly influenced by two patients with extreme values. The present analyses therefore neither establish equivalence nor rule out clinically relevant associations; future research needs larger event counts and complete longitudinal eligibility and clinical follow-up. Misclassification can affect both sides of the main association: missing late or excluded-product claims may lower observed LTOT incidence and create false non-LTOT classifications, while baseline claims for excluded opioids may falsely imply opioid-naïve status. Such errors could bias association estimates in either direction if ascertainment differs by mental-health status. The parent-trial provincial drug-insurance eligibility requirement does not confirm 180 days of continuous eligibility. Neither the extent nor direction of residual bias can be estimated reliably from the present extracts. The source CANCER flag was more frequent in usual care (346/478) than in intervention (55/521), consistent with the direction in the published parent trial [9]. Twelve of fourteen LTOT events occurred in the usual-care arm, and patient-level confidence intervals ignore possible within-unit correlation. The parent trial used a specialized two-step cluster bootstrap for the randomized treatment effect; with only four units and sparse outcomes here, analogous resampling, with only two independent randomized units per arm and near-zero-event strata, may yield unstable observational exposure estimates and was not used as confirmatory inference. Detailed comparisons of the diagnostic classifications and sensitivity definitions are provided in the Supplementary Materials.

6. Conclusions

In this predominantly cardiothoracic surgical RightRx cohort, corrected administrative diagnostic classifications did not reveal a statistically clear association between documented mental health disorders and the original ≥90-days-supplied LTOT outcome (adjusted OR 1.07, 95% CI 0.20–3.73). The 14 primary events, incomplete observation of pharmacy eligibility, and unadjusted unit clustering prevent exclusion of meaningful associations. The observed higher opioid fill frequency was sensitive to two extreme observations. A broader opioid-product definition and a distinct late-dispensing endpoint yielded higher event counts and underscore the importance of operational definitions. Larger studies with validated psychiatric phenotypes, complete longitudinal eligibility, and sufficient cluster numbers are needed.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/pharma5040047/s1, Figure S1, opioid-fill distributions (full range and enlarged view); Table S1, descriptive dispensing outcomes; Table S2, opioid product definition; Table S3, mental health diagnostic categories; Table S4, outcome-definition and influence analyses; Table S5, operational diagnostic algorithms; Table S6, LTOT by clinical service; Table S7, new discharge opioid molecules; Table S8, descriptive LTOT events by trial assignment; Table S9, additional exploratory sensitivity analyses; Table S10, available short-term hospitalization and mortality-status indicators; Table S11, diagnostic algorithm correction and original-versus-corrected estimates; Table S12, opioid product inclusion by analytic stage; Table S13, alternative persistence and source cancer sensitivity results; Table S14, separate MED-ÉCHO index-admission linkage and qualifying-diagnosis concordance.

Author Contributions

Conceptualization, N.N. and R.T.; methodology, N.N. and R.T.; software, N.N.; validation, N.N. and R.T.; formal analysis, N.N.; investigation, N.N.; resources, R.T.; data curation, N.N.; writing—original draft preparation, N.N.; writing—review and editing, N.N. and R.T.; visualization, N.N.; supervision, R.T.; project administration, R.T.; funding acquisition, R.T. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding. The APC was funded by the authors.

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki and was approved by the McGill University Health Centre (MUHC) Research Ethics Board (REB), Cells, Tissues, Genetics and Qualitative Research (CTGQ) panel, project number 2011-930 (also listed as 10-180). The initial project REB approbation date was 9 March 2011, with the most recent annual renewal approved on 24 November 2025 (renewal period 21 December 2025 to 20 December 2026).

Data Availability Statement

The data used in this study are not publicly available due to legal and ethical restrictions related to privacy and the conditions of access to Quebec administrative health data (RAMQ/MED-ÉCHO) and the RightRx trial dataset. Access may be possible through the appropriate data custodians and institutional approvals, subject to data sharing agreements and Research Ethics Board authorization.

Acknowledgments

The authors thank the RightRx trial team and the McGill University Health Centre (MUHC) clinical and informatics teams for supporting data access and linkage processes, as well as the provincial data custodians for the use of RAMQ and MED-ÉCHO data.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

ATC, Anatomical Therapeutic Chemical classification; CI, confidence interval; ED, emergency department; IQR, interquartile range; LTOT, long-term opioid therapy; MH, mental health; MUHC, McGill University Health Centre; RAMQ, Régie de l’assurance maladie du Québec; REB, Research Ethics Board; SMI, serious mental illness; MED-ÉCHO, Québec hospital discharge administrative database.

References

  1. Calcaterra, S.L.; Yamashita, T.E.; Min, S.J.; Keniston, A.; Frank, J.W.; Binswanger, I.A. Opioid prescribing at hospital discharge contributes to chronic opioid use. J. Gen. Intern. Med. 2016, 31, 478–485. [Google Scholar] [CrossRef] [Scilit]
  2. Shah, A.; Hayes, C.J.; Martin, B.C. Factors influencing long-term opioid use among opioid-naive patients: An examination of initial prescription characteristics and pain etiologies. J. Pain 2017, 18, 1374–1383. [Google Scholar] [CrossRef] [Scilit]
  3. Hapca, S.; Peet, L.; Gibson, C.; Harvey, A.; Forget, P. Persistent post-discharge opioid use and opioid stewardship: A single-centre retrospective cohort study. Br. J. Pain 2024, 18, 497–503. [Google Scholar] [CrossRef] [Scilit]
  4. Brummett, C.M.; Waljee, J.F.; Goesling, J.; Moser, S.; Lin, P.; Englesbe, M.J.; Bohnert, A.S.B.; Kheterpal, S.; Nallamothu, B.K. New persistent opioid use after minor and major surgical procedures in US adults. JAMA Surg. 2017, 152, e170504. [Google Scholar] [CrossRef] [Scilit]
  5. Lee, Y.-J.; Polomano, R.C.; Schmidt, H.D.; Min, J.; Compton, P.A. Patient-related risk factors for new persistent opioid use after surgery among opioid-naïve individuals in the United States: A systematic review and meta-analysis. Pain Med. 2026, 27, 727–752. [Google Scholar] [CrossRef] [Scilit]
  6. Bui, T.; Dooley, M.J.; Bell, J.S.; Myles, P.S. New persistent opioid use after surgery and traumatic injury: A narrative review of global rates, risk factors, and healthcare interventions. BJA Open 2025, 16, 100509. [Google Scholar] [CrossRef] [Scilit]
  7. Phinn, K.; Liu, S.; Patanwala, A.E.; Penm, J. Effectiveness of organizational interventions on appropriate opioid prescribing for noncancer pain upon hospital discharge: A systematic review. Br. J. Clin. Pharmacol. 2023, 89, 982–1002. [Google Scholar] [CrossRef] [Scilit]
  8. Tamblyn, R.; Winslade, N.; Lee, T.C.; Motulsky, A.; Meguerditchian, A.; Bustillo, M.; Elsayed, S.; Buckeridge, D.L.; Couture, I.; Qian, C.J.; et al. Improving patient safety and efficiency of medication reconciliation through the development and adoption of a computer-assisted tool with automated electronic integration of population-based community drug data: The RightRx project. J. Am. Med. Inform. Assoc. 2018, 25, 482–495. [Google Scholar] [CrossRef] [Scilit]
  9. Tamblyn, R.; Abrahamowicz, M.; Buckeridge, D.L.; Bustillo, M.; Forster, A.J.; Girard, N.; Habib, B.; Hanley, J.; Huang, A.; Kurteva, S.; et al. Effect of an electronic medication reconciliation intervention on adverse drug events: A cluster randomized trial. JAMA Netw. Open 2019, 2, e1910756. [Google Scholar] [CrossRef] [Scilit]
  10. Canadian Institute for Health Information (CIHI). Canadian Classifications Browser: ICD-10-CA and Canadian Coding Standards. Available online: https://publications.gc.ca/site/eng/9.507591/publication.html (accessed on 19 October 2026).
  11. de Oliveira Costa, J.; Bruno, C.; Baranwal, N.; Gisev, N.; Dobbins, T.A.; Degenhardt, L.; Pearson, S.-A. Variations in long-term opioid therapy definitions: A systematic review of observational studies using routinely collected data (2000–2019). Br. J. Clin. Pharmacol. 2021, 87, 3706–3720. [Google Scholar] [CrossRef] [Scilit]
  12. Lawal, O.D.; Gold, J.; Murthy, A.; Ruchi, R.; Bavry, E.; Hume, A.L.; Lewkowitz, A.K.; Brothers, T.; Wen, X. Rate and risk factors associated with prolonged opioid use after surgery: A systematic review and meta-analysis. JAMA Netw. Open 2020, 3, e207367. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.