Introduction

Of the 1.2 million adolescents and adults living with HIV in the United States, 30-85% have been estimated to be living with chronic pain.[1,2,3] Current HIV antiretroviral therapy regimens are effective in maintaining virologic suppression, improving quality of life, and reducing HIV-related morbidity and mortality.[4] Yet, as the population ages, chronic pain has become increasingly prevalent among people living with HIV (PLWH).[5] Independent of HIV viral load, PLWH report muscular, joint, and neuropathic pain as some of the most bothersome and common symptoms experienced.[6] PLWH are more likely than HIV uninfected patients to receive opioids [7] at higher doses for the treatment of chronic pain [8] and are also more likely to use other illicit substances, which may increase the risk for opioid use disorder.[9] Since 2010, increasing efforts have been made to reduce reliance upon opioids for chronic pain, culminating in the Centers for Disease Control and Prevention (CDC) 2016 opioid prescribing guidelines.[10] These efforts have reduced the number and dose of opioid prescriptions in the United States with the intention to support and protect health.[11, 12]

Patients who have experienced cessation of opioids for chronic pain have been shown to be at greater risk of depression, non-prescribed opioid use, opioid-related emergency room admissions, and death from suicide and opioid overdose.[13,14,15,16] Undertreated chronic pain among PLWH has been associated with decreased antiretroviral adherence [17] and increased odds of no-show visits, [18] placing HIV care and opioid stewardship goals in potential conflict. Some HIV providers have shown selective compliance with opioid prescribing guidelines, [19, 20] noting that although prescribed opioids may result in use disorders and distract from other care goals, they may also reduce non-prescribed opioid use, improve attendance at visits, and sustain engagement in care.[20] Having chronic pain and no prescribed opioids for pain management has been associated with virologic failure among PLWH.[1] However, no study published to-date has reported the impact of reducing or stopping long-term opioids for the treatment of chronic pain on patient engagement among PLWH. We sought to examine the association of opioid dose changes with disengagement in HIV care, defined as not meeting guidelines for viral load testing, and elevated viral load. We hypothesized that opioid dose reductions or cessation would be associated with increased odds of disengagement in care and subsequent virologic failure among PLWH.

Methods

Using data from a retrospective cohort study of PLWH with chronic non-cancer pain, we modeled associations of opioid dose changes with (1) time to disengagement from HIV care using a pooled logistic regression model where each observation was a patient-month; and (2) experiencing virologic failure using a logistic regression model where each observation was a viral load test. This study was approved by the University of California San Francisco Institutional Review Board (#16-19352).

Study sample

Patients were selected from 7 clinics in the same health system, serving only publicly insured or uninsured individuals in San Francisco, California. Inclusion criteria included: ≥ 18 years of age; having been prescribed opioids for chronic non-cancer pain for ≥ 3 months from January 1, 2013 to December 31, 2015; having an HIV diagnosis prior to December 31, 2015; and being alive through December 31, 2015. A total of 927 patients met the criteria and 300 patients were randomly selected for data extraction and analysis.

Measures

Medical record data were electronically and manually extracted for the period from January 1, 2012 to June 30, 2019. Data electronically extracted included demographics, laboratory data (HIV viral load, CD4 count, urine drug screen results), and all ICD codes for visit encounters during the study period (see sTable 1 for all ICD codes used, Supplemental Digital Content 1). Manually collected data included opioid prescription details (type, dose, dates of prescriptions), concerning behaviors documented by the provider (i.e. ongoing alcohol, cocaine, methamphetamine, or illicit opioid use; suspected diversion of opioids; early refills; reported lost opioid medications; emergency department visit for opioid overdose), and emergency department visits by opioid-relatedness. Charts were reviewed by a physician to ensure accuracy using a previously published procedure.[15] Medications for opioid use disorder (MOUD) were collected from medical charts (buprenorphine) or from the Community Behavioral Health Services Division of the San Francisco Department of Public Health (daily methadone maintenance dosing data). Mortality data were collected from the California Electronic Death Record System.

Exposure

Opioid dose changes were defined using daily prescription data from medical charts and converted to daily morphine milligram equivalents (MME) using standard methods.[21, 22] Dose changes were categorized as either an increase or decrease (30% relative change from the pre-change MME), a discontinuation (any change to zero MME), or unchanged. Any dose increase from zero MME was also categorized as an increase. The 30% threshold, used in other studies, aimed to capture clinically meaningful dose changes.[15] The direction and relative magnitude of dose changes were obtained by comparing a patient’s pre-change MME and their MME 30 days after dose change; the rationale for this decision was to reduce noise from short-term fluctuations in dose, which were not relevant to our primary research questions.

Outcomes

Disengagement from care was defined as having fewer than two HIV viral load tests in 365 days. This definition aligns with the American Academy of HIV Medicine guidelines, which recommends at least two viral load tests per year.[23] The start of each patient’s analysis period was defined as the earliest date on which they had at least two viral load tests within 365 days, at least one CD4 test (to allow for a baseline covariate value), and at least 365 days of follow-up data. Patients receiving the standard of care would be expected to have one test every six months on average. We therefore defined the date of disengagement as 180 days after the patient’s last viral load test, before not having one in the subsequent 365 days. The end of each patient’s analysis period was defined as the date on which they experienced the outcome (disengagement from care), moved away or to a different health system, died, or reached the end of study follow-up period, whichever occurred first. In our time-to-event setup, the disengagement outcome was operationalized as a binary variable set to zero in the months before disengagement, one in the month of disengagement for patients who experienced the outcome and missing in the months following disengagement or exit from the cohort. The unit of analysis was patient-months, with the analysis dataset including every patient-month during each patient’s analysis period.

Virologic failure was evaluated as a binary variable indicating the results of a viral load test, set to one for results of > 200 copies/mL and zero otherwise. In this model, the start of each patient’s analysis period was defined as the earliest date on which they had at least one viral load and one CD4 test (to allow for a baseline covariate value) and 365 days of follow-up data. The end of the patient analysis was defined consistent with the disengagement model. The unit of analysis was the patient viral load test, with the analysis dataset including every viral load test occurring during each patient’s analysis period. Additional details on analysis period rationale are available in the Supplemental Digital Content 1.

We assumed that dose changes could be associated with each outcome for up to one year following the occurrence of the dose change. We also assumed that a dose change would not have any effect on a patient’s viral load for at least 30 days, thus for the viral load analysis we modeled dose changes as occurring 30 days after they actually occurred.

Covariates

Both analyses included several time-invariant and time-dependent covariates. We included covariates that were hypothesized to be related to both future dose changes and the outcomes and that were obtainable from medical records. Due to similarities between the two outcomes, each model included the same set of covariates. Time-invariant covariates included patient race/ethnicity, sex, and age at baseline. Time-dependent covariates included monthly mean opioid dose and several dichotomous measures indicating occurrence in the past six months of the following: concerning behaviors documented by a provider; urine drug screening positive for cocaine, amphetamines, or heroin (6-MAM); virologic failure (> 200 copies/mL); CD4 count; substance use-related healthcare visits; diagnosis of an affective or psychotic disorder; and use of medications (i.e., methadone or buprenorphine) for OUD (full details available in the Supplemental Digital Content 1).

Inverse probability of treatment and retention weights

For both outcomes, we hypothesized that bidirectional effects linking opioid dose changes and other clinical covariates would introduce time-dependent confounding, which we accounted for using stabilized inverse probability of treatment weights (IPTWs).[24, 25] Both models also accounted for differential loss to follow-up using stabilized inverse probability of retention weights (IPRWs).[24, 25]

To calculate stabilized weights for each analysis, we constructed separate longitudinal datasets composed of patient-month observations spanning respective analysis periods. For the IPTWs, we estimated the probability of each type of dose change for each patient-month as a function of past dose change and covariates using multinomial logistic regression models with dose change as the outcome. For the IPRWs, we estimated the probability of being censored during each patient-month as a function of past treatment and covariates using a pooled logistic regression model with a binary outcome indicating each patient’s last month of follow-up, then estimated IPRWs using the complement of the fitted probability of censoring. The final inverse probability weights (IPWs) were equal to the product of the stabilized IPTWs and IPRWs for each patient-month. Although weights for both analyses were calculated using the same underlying sample and clinical data, analysis periods differed for each and thus so did the final weight estimates (full details are available in the Supplemental Digital Content 1).

Disengagement from care model

Dose changes were included in the model as separate indicator variables corresponding to increases, decreases, and discontinuations, with no change as the reference. Assuming that dose changes could influence the risk of a patient disengaging from care beyond the month in which the dose change occurred, we carried forward dose changes either until the patient’s next dose change or for up to 12 months, whichever was sooner. After 12 months, patients were considered to have no dose change. We allowed for the effect of dose changes to vary over time by including a variable that captured the sequential count in months since a dose change occurred. These sequential count variables were first included as three-knot restricted cubic splines with knots at 3, 6, and 9 months following the dose change. If the spline terms were not statistically significant at p < 0.2 as assessed using Wald tests, only a linear term was included; if the linear term was not significant at p < 0.2, the linear term was also removed and the effect of the dose change was modeled as constant. If a trend was indicated for a particular type of dose change, the coefficient for the corresponding indicator variable can be interpreted as the immediate effect of that type of dose change, whereas delayed effects can be calculated using linear combinations of the immediate effect and the change in effect over time. If no trend is indicated, the coefficient for the corresponding indicator variable estimates the constant effect.

Our final estimates were obtained by fitting a pooled logistic regression model to the analysis dataset of patient-months. Independent variables included the indicator and appropriate trend variables for each type of dose change, all baseline covariates (including baseline values of time-dependent covariates), and a four-knot restricted cubic spline for months since observations began (December 31, 2012), with knots at the 5, 35, 65, and 95 percentile values. To adjust for time-dependent confounding and differential loss to follow-up, each patient-month was weighted by its corresponding stabilized IPWs. If a trend in the effects of dose change was indicated, we presented the immediate effect and the delayed effect after 1, 3, 6, and 9 months; otherwise, we present only a single constant effect. Confidence intervals (95%) were calculated using cluster robust standard errors to account for clustering by participant.

Viral load model

Because the unit of analysis was a patient viral load test, dose changes only needed to be defined for the period preceding each viral load test. Specifically, for each patient viral load test, dose change was defined as the most recent dose change up to 365 days prior to the viral load test. Dose changes and possible time-varying effects were operationalized as described for the disengagement from care analysis; however, the unit of time was days instead of months. Thus, time-varying effects were included as either linear or spline terms for days since the dose change, with spline knots at 90, 180, and 270 days. This model also controlled for secular trend using a four-knot restricted cubic spline in days since December 31, 2012 (with knots defined using the same quantiles as the disengagement from care model).

Final estimates were obtained by fitting a logistic regression model to the dataset of viral load tests and the same independent variables as described for the disengagement analysis. To adjust for time-dependent confounding and differential loss to follow-up, each patient viral load observation was weighted by the IPW corresponding to the month of the viral load assessment. Constant and time-varying dose change effects with 95% confidence intervals and cluster robust standard errors are presented as described for the disengagement from care analysis.

Sensitivity analyses

We conducted three sensitivity analyses common to both outcomes. To assess the sensitivity of our results to a small number of extreme IPTW values, we ran our final regression models using IPWs composed of the original IPRW values and updated IPTW values trimmed to the 1% and 99% quantile values. Only the IPTWs were trimmed because their ranges were substantially larger than those of the IPRWs.

To calculate the IPTWs and IPRWs for both analyses, we defined event-related time-dependent covariates (e.g., opioid-related ED visits) by the occurrence of each event in the prior six months. To assess the sensitivity of our results to this decision, we conducted two additional analyses that defined these covariates by the event having occurred in the prior three months and prior nine months. This affects both baseline and time-dependent covariates in the regression models used to estimate the IPTWs and IPRWs and baseline covariates in the final regression models.

For the disengagement from care analysis, we defined the date of a patient’s disengagement from care as 180 days after their last viral load test before not having one for at > 365 days. Although we believe this to be a reasonable choice, we have no way of assessing how well this choice captures the timing of disengagement across patients. To address this issue, we conducted a sensitivity analysis in which we randomly selected dates of disengagement for patients who experienced the outcome and obtained new estimates using these newly defined outcome dates. Specifically, for each patient that experienced a lapse in viral load tests of > 365 days, we assumed that disengagement occurred sometime between 30 and 365 days after the patient’s last viral load test before their lapse. We used the range of 30–365 days for the following reasons: (1) patients were clearly not disengaged from care at the time of their most recent pre-lapse viral load test, but may have disengaged soon (i.e. 30 days) after; (2) given our outcome definition of having fewer than two viral load tests in a year, disengagement must have occurred within 365 days of the most recent pre-lapse viral load test. Thus, we randomly drew a value between 30 and 365 for each patient who experienced the outcome in order to define new outcome dates, constructed a new dataset using these new dates, and calculated IPTWs and obtained new estimates for the associations between dose changes and disengagement from care. We repeated this entire procedure 1000 times and present the 2.5% and 97.5% of the estimated dose change effects. A challenge with this approach is that dose change effects may or may not vary over time for a given dataset. To accommodate this, we allowed dose change effects to vary over time if indicated using Wald tests (as described for the main analysis) and report the quantiles for the immediate and delayed effects for datasets where time-varying effects were indicated and for a constant effect for datasets where they were not indicated.

For the main viral load analysis, we only censored patients when they moved away or to a different health system, died, or reached the end of study follow-up period; we did not censor patients at the estimated date of disengagement from care as defined in the disengagement from care analysis (i.e., 180 days after a patient’s last viral load before not having a viral load test for at least 365 days). The reason for this is because it is possible for patients to have viral load tests at some point in time after their estimated date of disengagement, and we sought to make use of all available viral load data. To assess the sensitivity of our results to this choice, we conducted a sensitivity analysis in which we censored patients at their estimated date of disengagement from care, if earlier than their standard-defined censor date.

For the main viral load analysis, we assumed that dose changes would not affect a patient’s viral load until at least 30 days after the dose change. Although we hypothesize this 30-day delay to be a more realistic specification, we also present results from an analysis that allows for immediate dose change effects on viral load.

Results

The 300 PLWH in our sample had a median age of 50 years; 73.7% were male; and 44.3% were Black, 43.0% White, and 10.7% Hispanic (Table 1). While all were prescribed opioids for at least 3 months between 2013 and 2015, the proportion receiving opioids varied by year, from a peak of 93.5% in 2014 to a nadir of 58% in 2019. Among those prescribed opioids in any given year, the mean dose ranged from 162 to 193 MME. Almost half had at least one urine drug screen positive for cocaine, amphetamines, or heroin (48.3%); 57.7% had a concerning behavior noted by a provider; and 57.0% had a substance use diagnosis or an emergency department visit for over-sedation from opioids. About two-fifths (41.3%) had at least one episode of disengagement from care and 51.7% had at least one viral load > 200 copies/ml during follow-up. Nearly three-quarters (74.0%) had a diagnosis of a mood/affective, psychotic, or anxiety disorder, 27.0% had a diagnosis of OUD, and 19.0% were on MOUD at some point. Most demographic and clinical characteristics were similar by outcomes, although a larger proportion of White compared to Black patients experienced disengagement from care, and a greater proportion of patients with virologic failure had urine drug screens positive for cocaine, amphetamines, or heroin, and substance use ICD diagnostic codes or emergency department visits due to opioid oversedation (Tables 2 and 3).

Table 1 Participant demographics and longitudinal measures (n = 300)
Table 2 Participant demographics among patients (n = 300) and longitudinal measures among patient-months (n = 16,309) by disengagement from care status
Table 3 Summary of measures preceding viral load tests included in virologic failure analysis (n = 4396 viral load tests among 300 patients)

In our main analyses controlling for both baseline and time-dependent confounding and differential loss to follow-up, discontinuation of prescribed opioids was associated with increased odds of disengagement from care 3 months (OR: 2.23 95% CI: 1.19–4.19), 6 months (OR: 3.67, 95% CI: 1.93–6.97) and 9 months (OR: 3.73, 95% CI: 1.77–7.86) following the discontinuation. Reductions or increases in opioid dose of 30% or more were not associated with disengagement from care (Table 4). There were no statistically significant associations between dose changes or discontinuation and experiencing virologic failure (Table 4).

Table 4 Associations between opioid dose changes and time to disengagement from care and virologic failure

Sensitivity analyses

The results of the sensitivity analyses are presented in Tables 5, 6, 7 and 8. Specifically, the results using trimmed IPTWs are presented in Table 5; the results using alternative covariate definitions (i.e., defining event-related covariates by their occurrence in the past three and nine months, as opposed to six months) are presented in Table 6; the results of the analysis assessing sensitivity of our results to our approach for estimating the exact date of disengagement from care are presented in Table 7; the results of the viral load analysis censoring patients at their date of disengagement from care as defined in the disengagement from care analysis are presented in Table 8; and the results of the viral load analysis allowing for an immediate dose change effect, as opposed an effect after 30 days, are presented in Table 9.

Table 5 Sensitivity analyses for disengagement and virologic failure, using trimmed weights
Table 6 Sensitivity analysis for disengagement and viral load, in which event-related covariates are defined as occurring in prior 3 months and 9 months
Table 7 Sensitivity analysis in which date of disengagement from care is randomly selected for each patient who experiences the outcome
Table 8 Sensitivity analyses for viral load in which patients are censored at the time of disengagement from carea
Table 9 Sensitivity analyses for allowing immediate dose change effect, without 30-day delay, on virologic failurea

For both the disengagement from care and viral load analyses, sensitivity analysis results were consistent with the main analysis results.

Discussion

The objective of our study was to examine the association of opioid dose changes with disengagement in care and HIV viral suppression. We followed a diverse population of PLWH throughout a period of substantial changes in opioid prescribing policies and practices. Most patients underwent either a decrease or discontinuation of their opioids during the study period. Discontinuation of opioids prescribed for chronic pain was associated with subsequent disengagement from HIV care, a significant concern for the health of PLWH.

Our findings highlight the importance of balancing opioid stewardship and retention in care for PLWH. Implementation of opioid prescribing guidelines has been challenging for healthcare systems, clinicians, and patients.[26] For example, while the CDC guidelines recommended opioid doses not be raised above 90 MMEs per day, many healthcare systems interpreted this as meaning that all patients on higher doses should be lowered to below 90 MMEs – and that most patients should not be on opioids long-term at all.[27] The CDC since clarified that those guidelines were intended for opioid naïve persons, and were not meant to be applied to those already on high doses, [27] and the US Food and Drug Administration warned against treating opioid-experienced patients the same as opioid-naïve patients.[28] To balance opioid stewardship and broader goals in clinical care, novel and patient-centered opioid management strategies are needed. Reassuringly, we did not find an association between dose reductions and disengagement from care. An increasing body of scientific literature supports patient-centered opioid management plans, [29] which include building a strong relationship with patients prior to attempting an opioid taper, giving patients the choice to select which medications might be tapered and at what rate, and ensuring low-barrier access to MOUD.[30].

The relationship between opioid prescribing, engagement in care, and virologic failure may be more complex. Research into the HIV care continuum [4] finds that engagement in care is essential for viral suppression, [4] and that disengagement has been associated with both increased viral load and mortality.[31] We did not find the expected association between opioid dose reductions or discontinuations and virologic failure. It is possible that engagement in care is not as essential as it previously was to maintain viral suppression, although other health outcomes we did not track may be adversely affected by disengagement from HIV care. Furthermore, as we could not track patients who had disengaged from care, we controlled for the possibility of informative censoring (i.e. that those patients were different from those who remained engaged in care) using inverse probability of retention weights. Although we observed a rich set of clinical covariates, it remains possible we could not fully account for all relevant differences between patients who were censored and those who remained under follow-up. Regardless, the belief voiced by providers that opioid prescribing affects HIV care outcomes is not without merit.[20].

There are now substantial data regarding the hazards of changing opioid prescribing, ranging from our findings of disengagement in HIV care to increased risk of opioid overdose and suicide mortality.[13,14,15,16] It is also possible that the impacts of changing opioid prescribing extend to other complex chronic diseases, such as diabetes, as untreated chronic pain has been previously associated with increased hemoglobin A1c levels.[32] Recognizing these hazards is essential to safely reforming opioid prescribing.

Limitations

Our study has limitations. First, all data were from medical records, which are not subject to systematic protocols and thus documentation may vary across both patients and providers. Our data did not include covariates such as income and housing status, which may impact outcomes of engagement in care and viral suppression. Second, our analyses were observational in nature and thus vulnerable to bias. However, under assumptions of correct model specification, no unmeasured confounding, and censoring that is noninformative conditional on covariates, our estimates can be interpreted as causal effects of opioid dose changes on each outcome. The complexity of the model does mean that we may have been underpowered to detect more subtle clinical effects. Additionally, our model looked only at 30% opioid dose changes and results may be different if a higher or lower percentage threshold was used. We utilized MOUD for a covariate, as a proxy for OUD, due to poor use of opioid use disorder diagnostic coding during both ICD-9 and ICD-10 eras.[33] Lastly, our sample consisted of patients in safety net primary care clinics, with high rates of substance use, followed from 2012 to 2019, and may not be generalizable to other patient populations, geographical regions, or time periods.

Conclusions

Discontinuation of opioids prescribed for chronic pain was associated with disengagement from HIV care. These results add to the growing evidence base of harms associated with shifting opioid prescribing policies and practices. While limiting opioid prescribing is necessary, it is critical to identify ways to simultaneously retain patients in care and avoid untoward clinical outcomes.