FormalPara Key Points

Medication changes are frequent in relation to both cancer diagnosis and death, and despite a cancer diagnosis, most patients use preventive medications until their death.

When anchoring analyses on a clinical event, e.g., cancer diagnosis, medication changes are less clear as they are averaged across patients with different lengths of survival.

When anchoring analyses on death, changes to medication are more uniform yet of limited clinical relevance as the analyses leverage information unavailable to the treating clinician.

1 Introduction

Older patients should have their medications continuously reassessed to ensure appropriateness according to their clinical situation. This is particularly true during major clinical transitions that reduce life expectancy, such as receiving a cancer diagnosis or being admitted to a nursing home [1]. In these situations, reassessing and even discontinuing medications such as lipid-lowering or antihypertensive medications might be relevant as their beneficial effects often need years of treatment to accrue [2, 3]. However, there are barriers to discontinuing medications in this patient group, such as lack of communication, overconfidence in the treatment benefits [4, 5], and challenges in predicting life expectancy [6, 7].

Descriptions of these medication changes can help improve clinical decision making or understanding of medication and disease trajectories. However, they are methodologically challenging as the data needs to be analyzed either prospectively, i.e., anchoring the timeline to a clinical event [8, 9], or retrospectively, i.e., anchoring the timeline at death [10].

In this study, we explore the various anchoring methods by describing medication changes in Danish patients with type 2 diabetes and incident cancer, from diagnosis to death. We aim to demonstrate these methods’ inherent challenges and limitations, which may result in misinterpretation due to patients having different clinical courses and survival lengths. The population was chosen as their treatment often includes medications with preventive cardiovascular effects, such as glucose-lowering [11, 12], lipid-lowering [13, 14], and antihypertensive medications [15].

2 Methods

We identified all prevalent and incident Danish patients ≥ 50 years with type 2 diabetes who died during 2000–2021. Within this cohort, we matched every patient with an incident cancer diagnosis (except non-melanoma skin cancer) with four non-cancer patients using propensity scores.

2.1 Population

Diabetes was defined by ever having redeemed a glucose-lowering medication [Anatomical Therapeutic Chemical (ATC) code A10B] [16] or having a diagnosis of type 2 diabetes [International Classification of Diseases (ICD)-10 code E11] [17]. We excluded women who used metformin before age 40 without ever redeeming other glucose-lowering medications or having a type 2 diabetes diagnosis, as this indicates treatment for polycystic ovarian syndrome and not type 2 diabetes. Similarly, we excluded patients who only used glucagon-like peptide-1 receptor agonists (GLP-1RA) approved solely for bodyweight reduction (liraglutide tradename Saxenda®). Cancer was identified by ICD-10 codes [18].

2.2 Matching

We used propensity score matching with replacement and a caliper width of 0.01. A propensity score for cancer was calculated for each patient and year, ranging from the date of diabetes diagnosis until censoring, using baseline data on sex, country of birth, age, duration of type 2 diabetes, comorbidities, and socioeconomic status. The baseline data was retrieved 6 months prior to cancer diagnosis. Covariate balance was evaluated using standardized mean differences. The date of the cancer diagnosis was used as the cohort entry date for the matched pairs.

2.3 Medications and Covariates

We limited the medications in the analyses to two categories: (1) predominantly preventive medications (i.e., medications with long-term cardiovascular benefits), and (2) predominantly symptomatic medications (i.e., primarily symptom-relieving medications). The preventative medications were exemplified by glucose-lowering medications, antihypertensives, and statins, while the symptomatic medications were exemplified by opioids, benzodiazepines, antiemetics, and proton-pump inhibitors. The medications were identified by ATC codes, and precise definitions are provided in Supplementary Table 1. Other medications were categorized using the ATC system (fourth level). Duration of diabetes was calculated from the time first fulfilling any inclusion criteria. The number of comorbidities was calculated from a list of comorbidities provided in Supplementary Table 2. Gross-household income was categorized in quartiles per year. Country of birth was categorized according to Statistics Denmark’s official classification.

2.4 Outcomes and Analyses

Within the matched cohort, we analyzed (a) the rate of incident (new) medications, and (b) the proportion of prevalent medication users for each month in a 5-year time window. Incident medications described the initiation of new treatment and were defined as not being used by a patient in the past 3 years. The rate was calculated as the number of incident medications per 100 patients per month. A prevalent user was defined as having redeemed a medication in the past 3 months. The proportion was calculated as the number of prevalent users per 100 patients alive.

The analyses were either prospective, i.e., timeline anchored at cohort entry, or retrospective, i.e., timeline anchored at death. The 5-year time window either spanned from 1 year prior to cohort entry to 4 years after or 5 years preceding death. The analyses were stratified on observed years of survival (< 1, 1 to < 2, 2 to < 3, 3 to < 4, or ≥ 4). While this stratification leverages future data (on time of death) and thus violates usual epidemiological practice, it was intentionally done to illustrate the challenges of analyzing medication changes. The analyses were also stratified on age (over or under 75) and year of treatment (before or after 2010) as sensitivity analyses. Data management and statistical analyses were performed in R version 4.1.3 [19].

3 Results

The final cohorts comprised 41,745 patients with cancer and 166,994 patients without cancer. The cohorts were well balanced on all covariates included in the propensity score model. Most patients were male (60%), and the median age at cohort entry was 74 years (interquartile range 59–89). Full patient characteristics are presented in Table 1. The 1- and 5-year mortality was 51% and 86% in the cancer group and 13% and 59% in the non-cancer group, respectively.

Table 1. Patient characteristics of matched cohorts

3.1 Anchored Analyses

When the analyses were performed prospectively (anchored at cancer diagnosis), the overall proportions of prevalent symptomatic and preventive medication users (Fig. 1a, c—black lines) and overall rates of incident medications (Fig. 2a, c—black lines) increased from 1 year before the diagnosis to the date of diagnosis, whereafter they decreased. In the non-cancer group, the overall medication usage was near constant around cohort entry (Figs. 1b, d and 2b, d—black lines). When anchored at death, the observed peaks around the cancer diagnosis were blotted out, and the overall proportions and rates appeared more similar between the groups (Figs. 1e–h and 2e–h—black lines). However, the cancer group used symptomatic medications more frequently in the months before death than the non-cancer group.

Fig. 1
figure 1

The proportion of prevalent users, anchored at either cohort entry (ad) or death (eh). The black line represents the full (unstratified) population. The blue lines represent the population stratified by observed length of survival. Lighter shades illustrate shorter observed survival length. A user was prevalent if they had redeemed a medication from that category in the past 3 months. ATC codes and definitions are provided in Supplementary Table 1

Fig. 2
figure 2

Rate of incident medications anchored at either cohort entry (ad) or death (eh). The black line represents the full (unstratified) population. The blue lines represent the population stratified by observed length of survival. Lighter shades illustrate shorter observed survival length. A medication was incident if the patient had not redeemed a medication from the same category in the past 3 years. ATC codes and definitions are provided in Supplementary Table 1

3.2 Stratifying on Length of Survival

Stratifying on length of survival revealed three key findings. First, the overall (unstratified) medication changes in relation to cancer diagnosis were driven by patients with shorter lengths of survival (Figs. 1a, c and 2a, c—blue lines). Second, when anchored at cohort entry, an increase in symptomatic medication users and a decrease in preventive medication users were observed in the last year of all survival strata (Fig. 1a, c—blue lines). The opposite was observed for the overall (unstratified) proportion of users, where symptomatic users seemed to decrease over time, and preventive medication users seemed to increase from 6 months after the cancer diagnosis (Fig. 1a, c—black lines). This dilution of the overall (unstratified) results was not seen when the analyses were anchored at death (Fig. 1e, g). Finally, stratifying while anchoring at cohort entry introduced a phenomenon with varying proportions and rates at the end of each stratum due to few people with very short life expectancies being alive (Figs. 1a–d and 2a–d).

3.3 Stratifying on Age and Year of Treatment

The stratified analyses are available in the Supplementary Material. Stratifying on age revealed that there were no differences in medication usage between younger (< 75) and older (≥ 75) patients when survival length was accounted for. In contrast, stratifying of treatment before or after 2010 showed that fewer patients were treated with preventive medication in their last year alive after 2010 compared with before 2010.

The two medication classes (fourth level ATC) with the largest absolute difference in the proportion of users (3 months before to 6 months after the cohort entry) between the groups were: opioids (N02AA) (40% versus 10%, difference 30%) and proton pump inhibitors (A02BC) (49% versus 30%, difference 19%).

4 Discussion

We showed that a cancer diagnosis and an approaching death were both associated with increased use of symptomatic medications and decreased use of preventive medications. We further illustrated the pharmacoepidemiologic challenges in analyzing and interpreting medication changes at specific timepoints. Analyzing prospectively (i.e., anchoring at cancer diagnosis) and stratifying on length of survival illustrated that the changes in relation to a cancer diagnosis were mainly driven by patients who died within 2 years. In addition, analyzing retrospectively (i.e., anchoring at death) showed that medication usage near death was less dependent on the length of survival and presence of a cancer diagnosis.

The study’s main limitation is that medication adherence is not fully accounted for. However, the data stems from redeemed prescriptions, which increases the likelihood of actual consumption compared with using issued prescriptions [20]. Another limitation is that although cancer types have different prognoses, we do not stratify by individual cancer type, thus limiting the clinical inference and interpretability of our findings. However, such stratification was considered out of scope for this study.

The increase in medication usage prior to a cancer diagnosis is expected to, at least in part, be explained by reverse causation, i.e. early symptoms of the cancer diagnosis triggering new medical treatment [21]. As for medication usage after the cancer diagnosis, a shorter length of survival was correlated to lower use of preventive medication and more use of symptomatic medication.

Our results could be interpreted as physicians, to some extent, were able to predict the life expectancy of patients with cancer and revisit their medication accordingly, i.e., discontinue preventive medication while initiating symptomatic medication to patients with shorter life expectancies. However, it is noteworthy that our analyses were aggregated, and individual patient trajectories were not considered.

A clinical key point from our results is that 60–80% of all patients were treated with preventive medication right up until their death. This might seem excessive considering that these medications should be minimized in patients with limited life expectancy. On a positive note, our results show that these numbers were lower in patients treated after 2010. Measures such as increased education on the often limited beneficial effects and potential side effects of preventive medications might help physicians further accommodate the current guidelines and overcome some barriers related to discontinuing medications near end-of-life. However, predicting life expectancy is challenging. Thus, the clinical usefulness of these retrospective analyses remains limited.

For pharmacoepidemiologists, our findings highlight the need for carefully considering the aim of describing medication changes near end-of-life. If the aim is to inform clinical decision making, a prospective approach is appropriate, i.e., anchoring on an event such as cancer diagnosis or other clinical transitions. In contrast, a retrospective approach, i.e., anchoring on death, would be preferred if the aim is to describe care trajectories up to death. However, as we have shown, researchers need to acknowledge the drawbacks of both methods. Whereas the prospective analysis in the aggregate dilutes marked medication changes among some individuals, the retrospective analysis complicates the clinical inference as it leverages information unavailable to clinicians treating the patients.

5 Conclusion

Medication changes in relation to a cancer diagnosis were frequent and correlated to the length of survival. While many patients’ pharmacotherapy got revised in their last year alive, a majority were treated with preventive medications until their death, irrespective of the length of survival and the presence of a cancer diagnosis. The results showcase the methodological challenges and limited clinical utility of describing medication use near end-of-life.