Introduction

Endocarditis is characterized by life-threatening inflammation of the inner lining of the heart and valves with high morbidity and prolonged hospital stay [1]. The incidence of endocarditis is increasing driven in part by the rise in intravenous drug use, particularly opioids and stimulants (cocaine and methamphetamine) [2]. COVID-19 can have long-term effects on multiple organ systems including the heart [3]. Recent reports have documented that individuals with COVID-19 are at increased risk for cardiovascular disease [4]. A few cases of endocarditis during the acute phase of covid infection have been reported [5]. A prior national study in France reported an increase in hospitalizations for endocarditis in 2020 compared to previous years, suggesting a possible link between endocarditis and the COVID-19 pandemic [6]. Recent studies have shown that individuals with cocaine or opioid use disorder are at increased risk for COVID-19 infections and severe outcomes [7, 8]. Taken together, existing evidence suggests multiplex interactions among cocaine and opioid misuse, COVID-19, cardiovascular systems, inflammation, and endocarditis. Currently it remains unknown whether COVID-19 is associated with increased risk for endocarditis and clinical outcomes of COVID-19-associated endocarditis in patients with opioid or cocaine use disorders.

Methods

Database description

We used the TriNetX Analytics Network platform that contains a nation-wide database of de-identified electronic health records (EHRs) of 109 million unique patients from 77 health care organizations, mostly large academic medical institutions with both inpatient and outpatient facilities at multiple locations across 50 states in the US [9], covering diverse geographic locations, age groups, racial and ethnic groups, income levels and insurance types. Built-in statistical functions within TriNetX Analytics Platform perform statistical analyses on patient-level data and reports population level data and results without including protected health information (PHI) identifiers. MetroHealth System, Cleveland OH, Institutional Review Board (IRB) has determined that any research using TriNetX is not Human Subject Research and therefore exempt from IRB review (more details in eMethod). We previously used TriNetX Analytics network platform to conduct retrospective cohort studies [10,11,12,13,14,15,16,17,18,19,20], including examining breakthrough infections and clinical outcomes among vaccinated patients with substance use disorders [8].

Study population

For examining time trend of incidence rate of endocarditis during 2011–2022 among patients with and without opioid use disorder (OUD) or cocaine use disorder (CocaineUD), the study population comprised 736,502 patients with a diagnosis of OUD, 379,623 patients with a diagnosis of CocaineUD, and 105,817,030 patients without a diagnosis of OUD or CocaineUD. Note that because methamphetamine use disorder is not coded ICD-10 code we were unable to assess its involvement in endocarditis.

For examining the association of COVID-19 with endocarditis among patients with OUD, the study population comprised 49,331 patients with OUD who contracted COVID-19 during 1/2020-4/2022 (“COVID-19 (+) cohort”) and 405,959 patients with OUD who had no documented COVID-19 but had medical encounters with healthcare organizations during the same time period (“COVID-19 (−) cohort”). For examining the association of COVID-19 with endocarditis among patients with CocaineUD, the study population comprised 23,687 patients with CocaineUD who contracted COVID-19 during 1/2020-4/2022 (“COVID-19 (+) cohort”) and 192,335 patients with CocaineUD who had no documented COVID-19 but had medical encounters with healthcare organizations during the same time period (“COVID-19 (−) cohort”).

The status of COVID-19 was based on lab-test confirmed presence of “SARS coronavirus 2 and related RNA” (TNX:LAB:9088) or the International Classification of Diseases (ICD-10) diagnosis code of “COVID-19” (U07.1). The status of CocaineUD was based on ICD diagnosis code F14 “Cocaine related disorders” and OUD on F11 “Opioid related disorders” respectively. The outcome measure of endocarditis was determined by the presence of ICD-10 code I38 (“Endocarditis, valve unspecified”) or ICD-10 code I33 “Acute and subacute endocarditis”. Infective endocarditis (I33) was examined separately.

Statistical analysis

The covariates are listed in Tables 1 and 2 and described in detail in eMethod. The status of OUD was matched when examining the association of COVID-19 with endocarditis in patients with CocaineUD. The status of CocaineUD was matched when examining the association of COVID-19 with endocarditis in patients with OUD

  1. (1)

    We examined incidence rate of first-time diagnosis of endocarditis (new cases per 1,000,000 persons per day) from 2011 through August 2022 in patients with OUD, in patients with CocaineUD and in patients without OUD or CocaineUD. Chi-squared test was performed to examine whether there was a linear trend in the incidence rates from 2011 to August 2022, with significance set at P-value < 0.05 (two-sided).

  2. (2)

    We examined the association between COVID-19 and new diagnosis of endocarditis in patients with CocaineUD and in patients with OUD by comparing the COVID-19 (+) and COVID-19 (−) cohorts. Cohorts were propensity-score matched (1:1 using a nearest neighbor greedy matching with a caliper of 0.25 times the standard deviation) for covariates listed in Tables 1 and 2. First-time diagnosis of endocarditis in the matched cohorts was followed in the 180-day time window starting after COVID-19 diagnosed during 1/2020-4/2022 for the COVID-19 (+) cohort and the first medical encounter during 1/2020-4/2022 for the COVID-19 (−) cohort. Kaplan−Meier analysis was used to estimate the probability of endocarditis. Cox’s proportional hazards model was used to compare the two matched cohorts with the proportional hazard assumption being tested with the generalized Schoenfeld approach. Hazard ratio (HR) and 95% confidence intervals was used to describe the relative hazard of endocarditis based on comparison of time to event rates. Separate analyses were performed for all patients and 3 age groups: 0–44, 45–64, ≥65. Separate analyses were performed for all endocarditis and for infective endocarditis.

  3. (3)

    We then investigated how COVID-19 diagnosis (clinical diagnosed COVID-19 vs lab test confirmed COVID-19), vaccination (presence vs absence of EHR-recorded vaccination status), and hospitalization (within 2 weeks following COVID-19) further affected the risk of new diagnosis of endocarditis following COVID-19 infection among patients with OUD and among patients with CocaineUD. The risk for new diagnosis of endocarditis within 180 day following COVID-19 was compared between propensity-score matched patients who had clinically diagnosed COVID-19 (presence of ICD-10 code U07.1) and those who had only lab-test confirmed COVID-19 (presence of the lab-test code 9088 but absence of ICD-10 code U07.1), between matched patients who had EHR-recorded vaccination and those who did not, and between matched patients who were hospitalized within 2 weeks after COVID-19 and those who were not. “Not Hospitalized” cohort – Not hospitalized within 2 weeks after COVID-19. Cohorts were propensity-score matched for demographics, adverse socioeconomic determinants of health, comorbidities, medications, and medical procedures. Separate analyses were performed for OUD and CocaineUD. The HRs and 95% CIs were calculated as described above.

  4. (4)

    We examined how the risk of new diagnosis of endocarditis in patients with CocaineUD or OUD differed based on gender, race and ethnicity. The risk for new diagnosis of endocarditis in the 180-day time window after COVID-19 diagnosis were compared between women and men, between black and white people and between Hispanic and non-Hispanic people, after propensity-score matching for other demographics adverse socioeconomic determinants of health (education, employment, occupational exposure, physical, social and psychosocial environment, and housing), comorbidities that are related to the risks of both COVID-19 and endocarditis, medications that are associated with risks and outcomes of COVID-19 including dexamethasone, corticosteroids and antidepressants, medical procedures and EHR-recorded vaccination status. Separate analyses were performed for CocaineUD and OUD. The HRs and 95% CIs were calculated as described above.

  5. (5)

    The 180-day hospitalization and mortality risk after the diagnosis of endocarditis in patients with CocaineUD or OUD was compared between propensity-score matched cohorts with and without COVID-19. The HRs and 95% CIs were calculated as described above.

Table 1 Characteristics of the cohorts of patients with OUD before and after propensity-score matching performed on all listed variables.
Table 2 Characteristics of the cohorts of patients with CocaineUD before and after propensity-score matching performed on all listed variables.

All statistical tests were conducted within the TriNetX Advanced Analytics Platform. The TriNetX platform calculates HRs and associated CIs using R’s Survival package, version 3.2-3. Details of the TriNetX database, study population, and statistical methods are in eMethods.

Results

Incidence rate of new diagnosis of endocarditis among patients with and without opioid or cocaine use disorder between 2011 and 2022

The incidence rate of endocarditis (as measured by new cases per 1,000,000 person per day) among patients with OUD increased from 3.7 in 2011 to 30.1 in 2022 (trend test, P < 0.001). There was a plateau period between 2017 and 2020 followed by acceleration during the COVID-19 pandemic period. The incidence rate of endocarditis among patients with CocaineUD followed a similar time trend as that for patients with OUD (trend test, P < 0.001). The incidence rate of endocarditis among patients without OUD or Cocaine did not increase significantly between 2011 and 2022 (trend test, P = 0.07) (Fig. 1). The incidence rate of endocarditis among patients with OUD or CocaineUD was 3-8 times of that in patients without, indicating that endocarditis is a significant health concern for patients using opioid or cocaine. The acceleration in the incidence rate of endocarditis during the pandemic period compared to pre-pandemic period suggests that COVID-19 infection might have further increased the risk of endocarditis among patients with OUD or CocaineUD.

Fig. 1
figure 1

Incidence rate of endocarditis (measured as new cases per 1,000,000 person per day) between 2011 and 2022 among patients with and without opioid use disorder (OUD) or cocaine use disorder (CocaineUD).

COVID-19 is associated with increased risk for new diagnosis of endocarditis in patients with cocaine use disorder and in patients with opioid use disorder

We then examined if COVID-19 was associated with increased risk of new diagnosis of endocarditis among patients with OUD and among patients with CocaineUD by comparing propensity-score matched COVID-19 (+) and COVID-19 (−) cohorts. For examining the association of COVID-19 and new diagnosis of endocarditis among patients with OUD, the study population comprised 455,290 patients with OUD including 49,331 who contracted COVID-19 during 1/2020-4/2022 (“COVID-19 (+) cohort”) and 405,959 patients who had no documented COVID-19 but had medical encounters with healthcare organizations during the same time period (“COVID-19 (−) cohort”). For examining the association of COVID-19 and new diagnosis of endocarditis among patients with CocaineUD, the study population comprised 216,022 patients with CocaineUD including 23,687 who contracted COVID-19 during 1/2020-4/2022 (“COVID-19 (+) cohort”) and 192,335 patients who had no documented COVID-19 but had medical encounters with healthcare organizations during the same time period (“COVID-19 (−) cohort”). For OUD, the COVID-19 (+) cohort was older, comprised more women, and had higher prevalence of adverse socioeconomic determinants of health, comorbidities, medication use, medical procedures, and EHR-documented COVID-19 vaccination than the COVID-19 (−) cohort. After propensity-score matching, the two cohorts were balanced (Table 1). For CocaineUD, the COVID-19 (+) cohort had higher prevalence of adverse socioeconomic determinants of health, comorbidities, medication use, medical procedures, and EHR-documented COVID-19 vaccination than the COVID-19 (−) cohort. After propensity-score matching, the two cohorts were balanced (Table 2).

Among patients with OUD, the overall risk for new diagnosis of endocarditis was 1.18% for the COVID-19 (+) cohort, higher than the 0.55% for the propensity-score matched COVID-19 (−) cohort (HR: 2.23, 95% CI: 1.92–2.60). Increased risks were observed in three age-stratified patient groups (0–44, 45–64, ≥65) and for infective endocarditis (Fig. 2A). Among patients with CocaineUD, the risk for new diagnosis of endocarditis was 1.14% for the COVID-19 (+) cohort, higher than the 0.52% in propensity-score matched COVID-19 (−) cohort (HR: 2.24, 95% CI: 1.79–2.80). Increased risks were observed in three age-stratified patient groups (0–44, 45–64, ≥65) and for infective endocarditis (Fig. 2B).

Fig. 2: 180-day risk for new diagnosis of endocarditis among patients with OUD or CocaineUD.
figure 2

A Comparison of 180-day risk for a new diagnosis of endocarditis and infective endocarditis in patients with OUD in all populations and in three age groups (0–44, 45–64, ≥65). B Comparison of 180-day risk for a new diagnosis of endocarditis and infective endocarditis in patients with CocaineUD in all populations and in three age groups (0–44, 45–64, ≥65). COVID-19 (+) cohort – patients who contracted COVID-19 between 1/1/2020-4/18/2022 as documented in their EHRs in the TriNetX database. COVID-19 (−) cohort – who had no documented COVID-19 but had medical encounters with healthcare organizations between 1/1/2020-4/18/2022. COVID-19 (+) and COVID-19 (−) cohorts were propensity-score matched for demographics (actual age at index event, gender, race, ethnicity), adverse socioeconomic determinants of health, comorbidities, medical procedures, medications, and EHR-documented vaccination status. The outcomes (first-time diagnosis of endocarditis or acute or subacute infective endocarditis) were followed within 180-day time frame starting from the index event (COVID-19 infection for the COVID-19 (+) cohort and a recent medical encounter for the COVID-19 (−) cohort).

Effects of COVID-19 diagnosis, vaccination, and hospitalization on 180-day risk of new onset endocarditis among patients with COVID-19 and opioid or cocaine use disorder

We then investigated how COVID-19 diagnosis criteria (clinical diagnosis vs lab test confirmed cases only), vaccination (presence vs absence of EHR-recorded vaccination status), and hospitalization (within 2 weeks following COVID-19) further affected the risk of new diagnosis of endocarditis following COVID-19 infection among patients with OUD and patients with CocaineUD. Among patients with OUD, those who had a clinical diagnosis of COVID-19 (presence of ICD-10 code U07.1) had significantly higher risk for endocarditis following COVID-19 than matched patients with lab-test confirmed COVID-19 but no clinical diagnosis (HR: 6.06, 95% CI: 3.86–9.50). Similar finding was observed for CocaineUD (Fig. 3). These results suggest that patients with clinical diagnosis of COVID-19 might have more severe COVID-19 (e.g., manifestations of COVID-19 symptoms) than those only with lab test confirmed COVID-19.

Fig. 3: Effects of COVID-19 diagnosis, vaccination and hospitalization on 180-day risk for new diagnosis of endocarditis among patients with COVID-19 and opioid or cocaine use disorder.
figure 3

“Clinical diagnosis” cohort – had COVID-19 based on ICD-10 clinical diagnosis code U07.1. “Lab-test only” cohort – had COVID-19 based on lab test confirmed COVID-19 (code 9088). “EHR-recorded vaccination” cohort – presence of COVID-19 vaccination in EHRs. “No EHR-recorded vaccination” cohort – absence of COVID-19 vaccination status in EHRs. “Hospitalized” cohort – hospitalized within 2 weeks after COVID-19. “Not Hospitalized” cohort – Not hospitalized within 2 weeks after COVID-19. Cohorts were propensity-score matched for demographics, adverse socioeconomic determinants of health, comorbidities, medications, and medical procedures.

Hospitalization within 2 weeks following COVID-19 infection was also associated with increased risk of new diagnosis of endocarditis among patients with OUD (HR: 4.85, 95% CI: 3.58–6.57) and among patients with CocaineUD (HR: 4.37, 95% CI: 2.91–6.56) (Fig. 3). The risk of new diagnosis of endocarditis following COVID-19 did not differ between patients who had documented COVID-19 vaccination in their EHRs and those who did not (Fig. 3). Patients without EHR-documented COVID-19 vaccination might have been vaccinated outside of healthcare organizations, therefore we cannot conclude that vaccination had no effect on the risk of endocarditis among patients with COVID-19.

Gender, racial and ethnic differences in the risk for COVID-19-associated endocarditis in patients with opioid or cocaine use disorders

Among patients with both OUD and COVID-19, there were significant racial and ethnic differences in the risk for new diagnosis of endocarditis following COVID-19 after propensity-score matching for age, gender, socioeconomical determinants of health, comorbidities, medical procedures, medication use and EHR-documented vaccination status. The risk for new diagnosis of endocarditis was lower in Black than in White people (HR: 0.59, 95% CI: 0.43–0.80), and lower in Hispanic than in non-Hispanic people (HR: 0.36, 95% CI: 0.22–0.60) (Fig. 4). No substantial gender difference was observed. Among patients with CocaineUD and COVID-19, there were significant racial and ethnic differences in the risk for new diagnosis of endocarditis following COVID-19. The risk for new diagnosis of endocarditis was lower in Black than in White people (HR: 0.59, 95% CI: 0.41–0.84), and lower in Hispanic than in non-Hispanic people (HR: 0.38, 95% CI: 0.19–0.77) (Fig. 4).

Fig. 4: Comparison of 180-day risk for new diagnosis of endocarditis after COVID-19 diagnosis in patients with opioid or cocaine use disorder between propensity-score matched women vs men, Black vs White, Hispanic vs non-Hispanic patients, respectively.
figure 4

Gender, race, and ethnicity cohorts were propensity-score matched for other demographics, adverse socioeconomic determinants of health, comorbidities, medications, medical procedures, and EHR-documented COVID-19 vaccination status.

180-day mortality and hospitalization risk following new diagnosis of endocarditis in patients with COVID-19 and opioid or cocaine use disorder

Among patients with opioid or cocaine use disorders, the 180-day hospitalization risk following a new diagnosis of endocarditis was 67.5% in patients with COVID-19, compared to 58.7% in matched patients without COVID-19 (HR: 1.21, 95% CI: 1.07–1.35) (Fig. 5A). The 180-day mortality risk following the new diagnosis of endocarditis was 9.2% in patients with COVID-19, compared to 8.0% in matched patients without COVID-19 (HR: 1.16, 95% CI: 0.83–1.61) (Fig. 5B). Separate analyses were not performed for opioid or cocaine use disorders due to small sample sizes.

Fig. 5: 180-day risk for hospitalization or death following endocarditis among patients with OUD or CocaineUD.
figure 5

A Kaplan–Meier curves for 180-day hospitalization risk following a new diagnosis of endocarditis in patients with opioid or cocaine use disorder who had COVID-19 vs those who did not have COVID-19, after propensity-score matched for demographics, adverse socioeconomic determinants of health, comorbidities, medications, medical procedures, and EHR-documented COVID-19 vaccination status. B Kaplan–Meier curves for 180-day mortality risk following a new diagnosis of endocarditis in patients with opioid or cocaine use disorder who had COVID-19 vs those who did not have COVID-19, after propensity-score matched for demographics, adverse socioeconomic determinants of health, comorbidities, medications, medical procedures, and EHR-documented COVID-19 vaccination status.

Discussion

This study shows that COVID-19 is associated with increased risk for new diagnosis of endocarditis in patients with cocaine or opioid use disorder. By comparing COVID-19 (+) and COVID-19 (−) cohorts from the same period that were extensively matched for demographics, adverse socioeconomic determinants including education, employment, occupational exposure, physical, social and psychosocial environment, and housing, comorbidities that are related to the risks of both COVID-19 and endocarditis, medications that are associated with risks and outcomes of COVID-19 including dexamethasone, corticosteroids and antidepressants, medical procedures and EHR-recorded vaccination status, our data suggests that in addition to the major social disruption from the pandemic including disrupted access to healthcare, COVID-19 infection itself is a significantly risk factor for new diagnosis of endocarditis in drug using populations. Drug using populations particularly those who use cocaine or opioids have some of the highest risk for endocarditis and here we show that having a COVID-19 diagnoses further increases this risk. The mechanisms of how SARS-CoV-2 viral infection exacerbates the risk for endocarditis in individuals with cocaine or opioid use disorders warrants further investigation. The EHR data did not contain information of injection drug use in the OUD and CocaineUD cohorts so we cannot determine what proportion of them had a history of injection drug use (IDU), which is likely to be high based on the high prevalence of Hepatitis C virus infection, considering that IDU is the main risk factor for transmission [21]. Among drugs that are misused, cocaine and heroin are the ones that are most commonly injected [22]. Though in this analysis we separated cocaine and opioid use disorder cohorts, the risk for endocarditis between them did not differ, suggesting that the use of contaminated syringes and other injection paraphernalia may partially account for the increased risk of endocarditis in these patients. The use of contaminated syringes or of injection practices in non-sterile setups increase the entry of bacteria into the blood stream that then circulates throughout the various organs and in the endocardium can result in endocarditis. Though our data cannot inform the mechanisms by which COVID-19 increased the risk for endocarditis, we speculate that COVID-19 induced inflammation and vascular pathology [4, 23,24,25] rendered the endocardium more vulnerable to the risks associated with injection drug use or even with drug use itself. Indeed both bacteremia and endothelial damage underlie endocarditis [26] and the use of drugs like cocaine and opioids through their pharmacological effects can damage blood vessels [27,28,29]. Methamphetamine can also be injected and whose use has been rising. However, we could not examine methamphetamine due the lack of specific ICD-10 diagnosis codes in the TriNeX database for methamphetamine or amphetamine abuse or dependence.

We showed that there were significant racial/ethnic differences in the risk for new diagnosis for endocarditis following COVID-19 diagnosis in patients with opioid or cocaine use disorders. The risk was significantly lower in Black than White people and lower in Hispanic than non-Hispanic people, after propensity-score matching for other demographics, socioeconomic factors, comorbidities, and medical procedures. Since the risk of developing infective endocarditis is higher in injection drug use (IDU) patients [30] our findings are consistent with the higher prevalence of IDU in whites than in blacks or Hispanics [31].

Endocarditis following COVID-19 infection was associated with substantial hospitalization and mortality risk in patients with cocaine or opioid use disorder, with significantly higher hospitalization risk among patients with COVID-19 than in those without COVID-19. Though the mortality risk was higher in patients with COVID-19 than in those without, the difference was not statistically significant, which may be due to small sample sizes. Studies showed that patients with bacterial sepsis accompanying COVID-19 have substantially higher mortality than those without sepsis [32] and bacterial endocarditis is an ominous prognostic sign [33]. There is debate about the appropriateness of antibiotic prophylaxis during severe COVID-19. Based on our observations, patients with opioid or cocaine use disorder who contract COVID-19 might be among the ones that benefit the most from such prophylaxis.

Our study has several limitations: First, this is a retrospective observational study, so no causal inferences can be drawn. Second, there may be over/mis/under-diagnosis of endocarditis and other diseases in patient EHR. However, we compared the risk for endocarditis between cohort populations that were drawn from the same TriNetX dataset, therefore these issues should not substantially affect the comparative risk analyses. Third, the vaccination information documented in patient EHRs is not complete since the majority of vaccinations likely occurred outside of healthcare organizations. Therefore, we could not accurately assess how vaccination affected the endocarditis risk following COVID-19 infection. Fourth, patients in the TriNetX database are those who had medical encounters with healthcare systems contributing to the TriNetX Platform. Even though they represent 28% of US population, they do not necessarily represent the entire US population. Therefore, results from the TriNetX platform need to be validated in other populations. Fifth, social determinants of health (SDoH) are important to understanding patient health. The EHR data that we used captured substantial information of SDoH of the study population. As shown in Tables 1 and 2, the percentage of the study population with the ICD-10 codes Z55-Z65 (“Persons with potential health hazards related to socioeconomic and psychosocial circumstances”) was 22.4% and 12.6% for COVID-19 (+) and COVID-19 (−) cohorts for the OUD population. The numbers were higher for CocaineUD population: 31.7% vs 25.6% for COVID-19 (+) and COVID-19 (−) cohorts respectively. However, it remains unknown how complete and accurate these EHR-derived structured data elements capture SDoH. Currently, commercial EHR vendors are actively developing products to facilitate the collection and integration of SDoH data into the standard of health care [34].

Conclusion

We conclude that COVID-19 is a significant risk factor for endocarditis in patients with cocaine or opioid use disorder and that the 180-day risk for mortality following COVID-19-associated endocarditis in patients with cocaine or opioid use disorder was substantial.