Back to Journals » Drug Design, Development and Therapy » Volume 19

Perioperative Ketamine Exposure and Postoperative Atrial Fibrillation/Flutter Risk After Video-Assisted Thoracoscopic Surgery: A Multi-Institutional Study

Authors Hung KC ORCID logo, Yu TS, Lai YC, Yu CH, Wu JY ORCID logo, Tsai WW, Chen IW ORCID logo

Received 21 September 2025

Accepted for publication 10 December 2025

Published 16 December 2025 Volume 2025:19 Pages 11173—11185

DOI https://doi.org/10.2147/DDDT.S569143

Checked for plagiarism Yes

Review by Single anonymous peer review

Peer reviewer comments 2

Editor who approved publication: Dr Solomon Tadesse Zeleke



Kuo-Chuan Hung,1,2 Ting-Sian Yu,3 Yi-Chen Lai,1,2 Chia-Hung Yu,1 Jheng-Yan Wu,4 Wen-Wen Tsai,5 I-Wen Chen6

1Department of Anesthesiology, Chi Mei Medical Center, Tainan, Taiwan; 2School of Medicine, College of Medicine, National Sun Yat-Sen University, Kaohsiung, Taiwan; 3Department of Anesthesiology, E-Da Hospital, I-Shou University, Kaohsiung, Taiwan; 4Department of Nutrition, Chi Mei Medical Center, Tainan, Taiwan; 5Department of Neurology, Chi-Mei Medical Center, Tainan, Taiwan; 6Department of Anesthesiology, Chi Mei Medical Center, Liouying, Tainan, Taiwan

Correspondence: I-Wen Chen, Department of Anesthesiology, Chi Mei Medical Center, Liouying, Tainan, Taiwan, Tel +886-6-281-2811, Fax +886-6-283-3806, Email [email protected]

Purpose: To investigate the association between perioperative ketamine exposure and postoperative atrial fibrillation/flutter (POAF) risk following video-assisted thoracoscopic surgery (VATS).
Patients and methods: A retrospective cohort study utilizing the TriNetX Research Network database analyzed adult patients aged ≥ 18 years who underwent elective VATS between January 2010 and April 2025. After excluding patients with pre-existing arrhythmias, critical illness, and emergency procedures, propensity score matching created 7,972 matched pairs comparing patients receiving perioperative ketamine/esketamine versus standard non-opioid analgesics (ketorolac/celecoxib). Primary outcome was 30-day POAF incidence. Secondary outcomes included other cardiac arrhythmias, pneumonia, mortality, and opioid use assessed at 30 days and 30– 90 day intervals.
Results: Ketamine exposure was significantly associated with an increased 30-day POAF risk (2.9% vs 2.2%; hazard ratio [HR] 1.33, 95% confidence interval [CI] 1.10– 1.62, p=0.004) and other cardiac arrhythmias (2.0% vs 1.3%; HR 1.60, 95% CI 1.25– 2.06, p< 0.001). Sensitivity analyses confirmed these findings, with POAF risk elevated in the medical center (HR 1.37, 95% CI 1.10– 1.71), contemporary (HR 1.32, 95% CI 1.07– 1.62), and non-malignant cohorts (HR 1.49, 95% CI 1.12– 1.98). No significant interaction effects were observed in the subgroup analyses. Delayed mortality between 30– 90 days was higher with ketamine (HR 1.54, 95% CI 1.07– 2.20, p=0.018). Multivariable analysis confirmed ketamine as an independent predictor of POAF (HR 1.25, 95% CI 1.07– 1.47, p=0.006).
Conclusion: Our findings suggest a potential association between perioperative ketamine exposure and POAF; however, given the retrospective design and substantial unmeasured confounding, prospective studies with detailed anesthetic and opioid dosing information are required to clarify this relationship.

Keywords: ketamine, video-assisted thoracoscopic surgery, mortality, perioperative care, thoracic surgery

Introduction

Thoracic surgery, particularly video-assisted thoracoscopic surgery (VATS), represents a significant advancement in minimally invasive surgical techniques; however, it continues to present considerable challenges in perioperative management.1–4 Despite its minimally invasive nature, VATS is associated with substantial postoperative pain arising from intercostal nerve irritation, chest tube placement, and tissue manipulation, which can impair respiratory function and delay recovery.5–8 Furthermore, thoracic surgery carries a notable risk of postoperative atrial fibrillation (POAF), a complication occurring in 3.1–11.4% of patients undergoing lung resection.9–11 In addition to patient-related cardiovascular comorbidities, previous literature has identified several procedure-specific contributors to POAF, including the extent of lung resection (eg, lobectomy vs wedge resection), the side of operation, and surgical manipulation near the pulmonary vein–left atrial junction.9,12,13 These factors are known to provoke local inflammation, autonomic disruption, and atrial stretch, thereby increasing arrhythmogenic susceptibility in the perioperative period. POAF not only prolongs hospital stays and increases healthcare costs but also increases the risk of stroke, heart failure, and mortality,14–16 making its prevention a critical component of perioperative care optimization.

The implementation of opioid-free anesthesia has emerged as an innovative approach for managing postoperative pain while potentially improving patient outcomes following surgery.17–20 Ketamine and its S-enantiomer, esketamine, are N-methyl-D-aspartate (NMDA) receptor antagonists that provide analgesia at sub-anesthetic doses.21–24 Increasingly, they are recognized as important components of opioid-sparing analgesic protocols because of their ability to reduce perioperative opioid requirements while maintaining effective pain control.25–28 Numerous studies have demonstrated the beneficial effects of ketamine in reducing postoperative opioid consumption, decreasing chronic postsurgical pain development, and potentially attenuating postoperative delirium.25–29 However, the pharmacological profile of ketamine includes significant sympathomimetic effects, leading to increased heart rate, elevated blood pressure, and enhanced myocardial oxygen consumption through catecholamine release and reuptake inhibition.30 These cardiovascular effects raise theoretical concerns about the potential of ketamine to trigger atrial arrhythmias, particularly in the vulnerable post-thoracotomy period when patients experience heightened sympathetic tone, electrolyte shifts, and inflammatory responses. Despite the widespread adoption of ketamine in enhanced recovery protocols for thoracic surgery, no study has systematically investigated whether perioperative ketamine exposure influences the risk of developing POAF.

We hypothesized that perioperative ketamine exposure would be associated with an increased incidence of POAF following VATS owing to its sympathomimetic properties. Therefore, our primary aim was to determine the association between perioperative ketamine exposure and the 30-day incidence of POAF in patients undergoing VATS using a large, multi-institutional database to provide evidence for clinical decision-making.

Methods

Study Design and Data Source

This retrospective cohort study utilized the TriNetX Research Network, a global federated health research platform that provides access to de-identified electronic health records from participating healthcare organizations. This real-world dataset enables access to comprehensive clinical data from over 140 healthcare organizations, encompassing millions of patients with longitudinal records, including demographics, diagnoses, procedures, medications, and laboratory values. The TriNetX platform ensures patient privacy through HIPAA-compliant de-identification processes, while maintaining the temporal relationships necessary for clinical research. This platform has been extensively validated and widely used for clinical research across multiple medical disciplines.31–33

As the data were fully de-identified and involved a retrospective analysis of existing medical records, informed consent was not required. The study protocol was approved by the Institutional Review Board of Chi Mei Medical Center (IRB number: 11406-E02), which granted a waiver for informed consent in compliance with observational research regulations. This study was conducted in accordance with the principles of the Declaration of Helsinki. All analyses adhered to the STROBE guidelines for observational research to ensure methodological rigor and transparent reporting.

Study Population and Inclusion Criteria

The study population consisted of adult patients aged ≥ 18 years who underwent elective VATS between January 1, 2010, and April 30, 2025. The index date was defined as the date of the thoracoscopic procedure. Patients were allocated to the ketamine group if they received ketamine or esketamine on the same index date, whereas the control group comprised patients who received ketorolac or celecoxib on the same index date, representing standard non-opioid analgesic approaches in thoracic surgery.

Patients were assigned to the ketamine group based on same-day ketamine/esketamine exposure irrespective of NSAID use, as NSAIDs are frequently co-administered as part of multimodal analgesia. Conversely, patients with any ketamine/esketamine exposure were excluded from the control group to avoid cross-contamination between exposure categories. Ketorolac or celecoxib were used as active comparators because they are not known to increase atrial arrhythmia risk and are commonly administered as part of standard multimodal analgesia in thoracic surgery. Existing evidence does not demonstrate pro-arrhythmic effects associated with NSAIDs; therefore, concomitant NSAID use in the ketamine group would not be expected to confound the relationship between ketamine exposure and postoperative arrhythmias.

Exclusion Criteria

To strengthen internal validity and minimize confounding bias, we applied a series of prespecified exclusion criteria. First, patients with any documented diagnosis of sepsis, acute respiratory failure, or critical care service utilization within one month prior to the index date were excluded, as these acute conditions independently increase perioperative arrhythmia risk. Second, individuals with a documented history of arrhythmias (including atrial fibrillation, flutter, and other cardiac arrhythmias), cardiac surgery, pacemaker implantation, or heart transplantation at any time prior to the index date were excluded to eliminate patients with pre-existing arrhythmogenic substrates. Third, to exclude patients undergoing emergency procedures, we excluded those who had visited the emergency department within three days prior to surgery. Additionally, we excluded patients who received ketamine or esketamine within one year prior to the index date to eliminate potential confounding from chronic exposure. Finally, patients who required immediate postoperative admission to the intensive care unit were excluded, as this likely reflects intraoperative complications or clinical instability, both of which could independently affect the risk of arrhythmia.

Data Collection and Variable Definitions

For every patient, we obtained detailed demographic and clinical information from electronic health records extending back two years prior to the index date. Demographic variables included age, sex, race, and body mass index. Comorbidity data encompassed cardiovascular diseases known to influence perioperative arrhythmia risk, such as ischemic heart disease, heart failure, chronic kidney disease, cerebrovascular disease, and non-rheumatic mitral valve disorders. Pulmonary diseases relevant to thoracic surgery populations were recorded, including chronic obstructive pulmonary disease, obstructive sleep apnea, and COVID-19 history. Additional factors include nicotine dependence, alcohol-related disorders, depressive episodes, anemia, vitamin D deficiency, malnutrition, and factors influencing health status and contact with health services.

The laboratory parameters collected included hemoglobin, serum albumin, and hemoglobin A1c levels. Medication data focused on cardiovascular or anti-diabetic drugs that could modify arrhythmia risk, including autonomic medications, beta-blockers, ACE inhibitors, angiotensin II receptor blockers, insulins and analogs, GLP-1 analogs, and SGLT2 inhibitors.

Propensity Score Matching

To minimize the effects of selection bias and confounding by indication, we performed propensity score matching in a 1:1 ratio using a greedy nearest-neighbor algorithm without replacement. Propensity scores were calculated based on a comprehensive set of covariates, including demographic factors (age, sex, race, and BMI), comorbidities, and laboratory results. Particular attention was paid to variables known to influence the risk of postoperative atrial fibrillation, such as older age, male sex, hypertension, heart failure, obesity, mitral valve disorders, and chronic pulmonary disease. In TriNetX database, only variables available before the index date can be used for propensity score matching. Although procedure-specific characteristics such as the type and side of lung resection are established contributors to POAF risk, these operative details are not available within the TriNetX dataset and therefore could not be incorporated into our matching algorithm. We assessed the adequacy of matching by examining standardized mean differences (SMD) for all covariates, considering an SMD below 0.1 as evidence of acceptable balance. To further verify the matching quality, we visually inspected propensity score distributions using density plots, ensuring greater overlap between the matched cohorts.

Outcome Definitions

The primary outcome was postoperative POAF within 30 days of the index surgical procedure. The secondary outcomes included other cardiac arrhythmias, pneumonia, mortality, and opioid use. Other cardiac arrhythmias were operationally defined by ICD-10 codes corresponding to supraventricular tachycardia, premature atrial and ventricular contractions, atrioventricular conduction abnormalities, ventricular arrhythmias, and other clinically recognized rhythm disturbances. To examine temporal patterns and assess whether the effects of ketamine persist beyond the immediate postoperative period, we also followed the outcomes at 30- and 90-day intervals to examine both acute and delayed complications.

Sensitivity Analyses

We performed three predefined sensitivity analyses to test the stability of our findings. The first sensitivity analysis focused on patients who underwent surgery in medical centers to eliminate variations in surgical expertise and perioperative protocols between different facility types. The second sensitivity analysis focused on patients receiving surgery between 2018–2025 to provide updated evidence reflecting contemporary surgical techniques and anesthetic practices. The third sensitivity analysis focused on patients who did not have malignant lung or thoracic tumors, as malignancy and its treatments may independently influence cardiovascular risk and complicate the interpretation of ketamine’s effects.

Statistical Analysis

Descriptive statistics were used to summarize the baseline characteristics of the study population, with continuous data reported as means and standard deviations, and categorical data as counts and percentages. Propensity score matching performance was assessed using standardized mean differences between the matched groups. Time-to-event outcomes were evaluated using Cox proportional hazards models, which estimated hazard ratios (HRs) and their 95% confidence intervals. Survival differences between groups were assessed based on these Cox model estimates. To determine the independent predictors of 30-day POAF, multivariable Cox regression analyses were performed, adjusting for key demographic and clinical variables. Subgroup analyses were conducted to investigate whether age (18–65 vs >65 years) and sex (male vs female) modified the observed effects. All analyses utilized standard analytical tools available on the TriNetX research platform, supporting methodological consistency and reproducibility.

Results

Patient Selection and Baseline Characteristics

Patients who underwent VATS between January 2010 and April 2025 were identified from the TriNetX Research Network database (Figure 1). Following the application of inclusion and exclusion criteria, the initial cohort comprised 8,004 patients in the ketamine group and 19,064 patients in the control group who received standard non-opioid analgesics (Figure 1). After propensity score matching, each group contained 7,972 patients. The matched cohorts demonstrated excellent balance across all measured covariates, with standardized mean differences below 0.1 for all variables, indicating successful mitigation of confounding bias (Table 1). The mean age was comparable between the groups at approximately 58 years, with a slight female predominance. Cardiovascular comorbidities, which are recognized risk factors for arrhythmias, were evenly distributed between the matched groups. Essential hypertension was present in approximately 41% of the patients, while ischemic heart disease affected approximately 16%. The prevalence of mitral valve disorders and heart failure was similar in both groups, affecting approximately 3.3% of the patients. The propensity score density distributions showed a substantial improvement in overlap after matching, confirming the effectiveness of the matching process in creating comparable groups (Supplemental Figure 1).

Table 1 Baseline Characteristics of Patients Before and After Propensity Score Matching

Figure 1 Patient selection flowchart from the TriNetX database. The flowchart illustrates the exclusion process applied to identify eligible patients using ketamine/esketamine (ketamine group) or control group.

Abbreviations: HCOs, Healthcare Organizations; VATS, video-assisted thoracoscopic surgery.

Association Between Ketamine Exposure and 30-Day Outcomes

Analysis of short-term postoperative outcomes revealed significant differences in arrhythmia incidence between the ketamine and control groups (Table 2). Postoperative POAF occurred in 231 patients (2.9%) in the ketamine group compared to 174 patients (2.2%) in the control group, indicating a statistically significant 33% increased risk (HR 1.33, 95% CI 1.10–1.62, p=0.004). This increased arrhythmogenic risk extended beyond atrial arrhythmias, as other cardiac arrhythmias showed an even more pronounced difference, affecting 159 patients (2.0%) in the ketamine group versus 100 patients (1.3%) in the control group, with a 60% increased risk (HR 1.60, 95% CI 1.25–2.06, p<0.001).

Table 2 Association Between Ketamine Exposure and 30-Day Outcomes Following Thoracic Surgery

Regarding other outcomes, pneumonia rates were nearly identical between groups, occurring in 3.7% of ketamine patients and 3.9% of control patients (HR 0.95, 95% CI 0.81–1.11, p=0.506), suggesting that ketamine did not affect respiratory complications. Similarly, 30-day mortality showed no significant difference, with rates of 0.41% and 0.35%, respectively (HR 1.19, 95% CI 0.72–1.96, p=0.504). However, opioid utilization was significantly higher in the ketamine group, with 93.7% of patients receiving opioids compared to 91.0% in the control group (HR 1.13, 95% CI 1.09–1.17, p<0.001), potentially reflecting unmeasured confounding factors that were not fully controlled in the analysis.

Association Between Ketamine Exposure and Outcomes Between 30- and 90-Day Follow-up

During the 30- to 90-day postoperative follow-up, new patterns in outcome associations emerged, suggesting that the long-term effects of ketamine exposure may differ from those observed in the early postoperative period (Table 3). The risk of POAF observed in the late postoperative period showed a trend toward increased risk that did not reach statistical significance (HR 1.25, 95% CI 0.95–1.64, p=0.106). Similarly, the risk of other cardiac arrhythmias was comparable between the groups during this period, with nearly identical incidence rates (0.75% vs 0.77%; HR 1.00, 95% CI 0.71–1.44, p=0.971).

Table 3 Association Between Ketamine Exposure and Outcomes Following Thoracic Surgery Between 30- and 90-Day Follow-up Postoperatively

Notably, while the risk of cardiac arrhythmia diminished over time, mortality emerged as a concerning outcome. Between days 30 and 90, mortality was significantly higher in the ketamine group (0.94%) than in the controls (0.63%) (HR 1.54, 95% CI 1.07–2.20, p=0.018). This delayed mortality risk warrants careful consideration, although the absolute risk difference remained small. Conversely, opioid utilization patterns reversed during this period, with lower usage in the ketamine group (19.6% vs 22.1%, HR 0.89, 95% CI 0.84–0.96, p=0.001), possibly suggesting improved long-term pain control or reduced chronic pain development.

Sensitivity Analyses

The 30-day outcomes observed in the three sensitivity analyses showed both consistency and deviation from the primary results (Table 4). The primary analysis revealed a 33% increased risk of POAF, which was even higher in the medical center cohort (HR 1.37, p=0.005) and most pronounced in the non-malignant cohort (HR 1.49, p=0.006), whereas the contemporary cohort’s risk remained similar at 32%. The risk of other cardiac arrhythmias was also elevated across all sensitivity analyses, with increases ranging from 41% to 57%. Although pneumonia risk was similar between the groups in the primary analysis, the non-malignant cohort demonstrated a significant protective effect (HR 0.82, p=0.037), suggesting that ketamine’s respiratory effects may differ based on cancer status. Mortality remained non-significant in all analyses, which is consistent with the primary findings. Opioid utilization patterns were comparable to those in the primary analysis, with increased use observed across all subgroups.

Table 4 Sensitivity Analysis on Postoperative Outcomes

Notable differences emerged in the 30- to 90-day follow-up periods. The risk of POAF was significant in the medical center cohort (HR 1.49, p=0.007), indicating that extended monitoring in tertiary care settings may capture delayed arrhythmias missed in broader analyses. The non-malignant cohort continued to show a protective effect against pneumonia (HR 0.69, p=0.006), diverging from the overall cohort. While the primary analysis showed increased delayed mortality and reduced opioid use, these findings were not consistent across the sensitivity analyses. Only the medical center cohort maintained reduced opioid utilization, suggesting that delayed effects may be population-specific rather than universally related to ketamine exposure.

Subgroup Analyses

Subgroup analyses examined whether the association between ketamine exposure and postoperative arrhythmias varied according to patient demographics (Supplemental Table 1). Importantly, despite some numerical differences in hazard ratios across subgroups, all interaction tests yielded non-significant p-values, indicating that the arrhythmogenic effects of ketamine were consistent regardless of patient age or sex. These findings indicate that ketamine uniformly increases arrhythmia risk across all patient demographics, supporting a direct pharmacological mechanism that operates independently of age or sex.

Multivariable Analyses

Multivariable Cox regression analysis confirmed ketamine exposure as an independent risk factor for 30-day POAF after comprehensive adjustment for confounders (Table 5). The final model identified ketamine exposure (HR 1.25, 95% CI 1.07–1.47, p=0.006) alongside traditional risk factors, including male sex (HR 1.56, 95% CI 1.34–1.81, p<0.001) and advancing age (HR 1.06 per year, 95% CI 1.05–1.07, p<0.001) as significant predictors. The presence of neoplasms also emerged as a modest risk factor (HR 1.24, 95% CI 1.04–1.49, p=0.016), while traditional cardiovascular risk factors, such as hypertension, heart failure, and ischemic heart disease, showed no independent association with POAF risk in this surgical population, highlighting the unique perioperative factors that drive postoperative arrhythmias in thoracic surgery patients.

Table 5 Variables for 30-Day Postoperative Atrial Fibrillation and Flutter (POAF) Risk Prediction

Discussion

Our multi-institutional retrospective cohort study of 15,944 matched patients undergoing VATS revealed that perioperative ketamine exposure was independently associated with a 33% increased risk of postoperative atrial fibrillation within 30 days. This elevated arrhythmogenic risk extends to other cardiac arrhythmias, demonstrating an even more pronounced 60% increase. The association remained robust across multiple sensitivity analyses, including examinations of medical center populations, contemporary surgical cohorts, and non-oncologic patients. Importantly, while ketamine exposure did not influence pneumonia rates or immediate postoperative mortality, we observed an increased mortality risk during the 30–90 day follow-up period, alongside an unexpected reduction in long-term opioid utilization that may reflect improved chronic pain management.

The pathophysiology of POAF involves multiple converging mechanisms that are unique to thoracic procedures. Surgical manipulation causes direct atrial trauma and pericardial inflammation, while one-lung ventilation creates hypoxemia and pulmonary vascular changes that increase the right atrial pressure.34–36 Mediastinal dissection disrupts cardiac autonomic innervation, creating an arrhythmogenic substrate through sympathovagal imbalance. Additionally, the inflammatory cascade triggered by lung resection releases pro-inflammatory cytokines that directly affect atrial electrophysiology, while postoperative pain and stress further amplify sympathetic activation.34–36 These multifactorial insults collectively lower the threshold for atrial ectopy and reentry circuits. The clinical consequences extend well beyond arrhythmia itself. Recent meta-analytic evidence further demonstrated that POAF after noncardiac surgery is linked to an approximately three-fold increase in short-term stroke risk, a four-fold increase in long-term stroke risk, a significant rise in myocardial infarction, and a three-fold increase in all-cause mortality at 30 days.37

Our finding of increased postoperative atrial fibrillation risk represents a novel contribution to the perioperative literature, as this is the first large-scale study to systematically evaluate the association between ketamine exposure and POAF in thoracic surgery. The clinical implications are substantial, as POAF significantly increases healthcare resource utilization by necessitating prolonged cardiac monitoring, complex anticoagulation management, and extended hospital stay. Furthermore, the persistence of this association across different surgical eras and practice settings suggests that contemporary monitoring and management strategies have not adequately mitigated the arrhythmogenic potential of ketamine. Although the benefits of ketamine in multimodal analgesia have been widely reported, our findings underscore the need for individualized risk-benefit assessments, particularly in patients with pre-existing risk factors for POAF, such as advanced age, male sex, or structural heart disease, as these benefits may not universally extend to cardiovascular outcomes.

The even more pronounced increase in other cardiac arrhythmias deserves particular attention, as these encompass potentially life-threatening ventricular arrhythmias alongside more benign conduction disturbances. The 60% increased risk observed in our study suggests that the electrophysiological effects of ketamine extend beyond the atrial myocardium, possibly through direct effects on ventricular repolarization or indirect effects mediated by sympathetic overstimulation. The temporal pattern of these arrhythmias, predominantly occurring within the first 30 days with subsequent normalization, aligns with the gradual resolution of postoperative inflammatory responses. This observation has important implications for postoperative monitoring protocols, suggesting that patients receiving ketamine may benefit from extended cardiac surveillance beyond standard recovery room observation periods, particularly during the vulnerable first postoperative week when arrhythmia risk peaks.

The absence of any protective effect against pneumonia contradicts theoretical expectations based on the immunomodulatory properties of ketamine. Several studies have demonstrated that ketamine can suppress pro-inflammatory cytokine production, enhance neutrophil function, and preserve cellular immunity during stress responses,38–40 effects that should theoretically reduce postoperative infectious complications. However, our primary analysis found nearly identical pneumonia rates between the ketamine and control groups, indicating no protective benefit in the overall thoracic surgery population. This neutral finding persisted across medical centers and contemporary cohorts, suggesting that the lack of pneumonia protection is not attributable to variations in clinical settings or temporal practice changes. However, when we examined the non-malignant cohort separately, ketamine demonstrated significant protective effects against pneumonia both at 30 days and during the 30–90 day period. This divergent pattern suggests that the immunomodulatory effects of ketamine may be masked or negated in oncologic populations, possibly due to tumor-related immunosuppression, chemotherapy effects, or the more extensive inflammatory response associated with cancer resection. The protective effect observed exclusively in non-cancer patients aligns more closely with ketamine’s theoretical immunological benefits, indicating that the drug’s immune-preserving properties may translate to clinical protection but only in patients whose immune systems are not already compromised by malignancy.

While 30-day mortality showed no significant difference between the groups, the emergence of increased mortality risk during the 30–90 day interval aligns with established literature demonstrating that postoperative atrial fibrillation independently elevates mortality risk.14–16 We suggest that the observed delayed mortality may not represent a direct ketamine effect, but rather the downstream consequence of increased POAF incidence in the ketamine group. The delayed manifestation of mortality aligns with the pathophysiology of POAF, which initiates a cascade of subclinical cardiac dysfunction (eg, atrial remodeling, reduced cardiac reserve, and increased thromboembolic risk) that collectively heightens vulnerability to fatal events in the weeks following resolution of the initial arrhythmia. However, this interpretation requires cautious consideration given the inconsistent mortality patterns across our sensitivity analyses. This inconsistency suggests that delayed mortality may be influenced by unmeasured factors. Future prospective studies with standardized long-term cardiac monitoring and detailed cause-of-death adjudication are essential to definitively establish whether ketamine’s arrhythmogenic effects translate into increased mortality risk or whether the observed association represents residual confounding from patient selection or healthcare delivery factors that our propensity matching could not fully address.

Although ketamine is typically used as an opioid-sparing adjunct, we deliberately selected ketorolac or celecoxib as an active comparator rather than patients receiving no additional non-opioid analgesia. In routine thoracic surgery practice, both ketamine and NSAIDs are added when clinicians judge that opioids alone are insufficient for adequate pain control, usually reflecting a higher and broadly comparable perceived pain burden. By restricting our analysis to patients who received either ketamine/esketamine or ketorolac/celecoxib, we aimed to compare two multimodal analgesic strategies used in similar clinical contexts, thereby reducing systematic differences in pain severity, sympathetic activation, operative complexity, and underlying illness that might otherwise bias the association with POAF. Nonetheless, we acknowledge that TriNetX does not provide granular data on ketamine dose, opioid dose, or postoperative pain scores, and we cannot exclude confounding by indication whereby patients with more severe pain might be more prone to arrhythmias regardless of ketamine exposure. Accordingly, our findings should be interpreted as hypothesis-generating rather than definitive evidence of causality.

Detailed opioid dosing (including morphine milligram equivalents) was not available in the TriNetX database. The inability to quantify opioid exposure represents a major limitation and may contribute to residual confounding in current study. In addition, upon further examination of the dataset, we found that the vast majority of patients in both groups received intraoperative opioids, leaving too few opioid-free cases to allow for a meaningful subgroup analysis restricted to patients who did not receive opioids. In addition, ketamine may have both opioid- and NSAID-sparing effects; however, TriNetX does not reliably capture NSAID-related complications such as acute kidney injury or gastrointestinal bleeding in relation to perioperative medication dosing. Therefore, we were unable to determine whether ketamine influenced the incidence of these NSAID-associated adverse events. Future investigations incorporating detailed perioperative analgesic regimens, medication dosing, and accurate tracking of NSAID-related complications will be essential to clarify these potential relationships.

Several limitations merit consideration when interpreting our findings. First, the retrospective observational design precludes definitive causal inference despite our propensity matching methodology that balances measured confounders. Second, the database lacks granular information about ketamine dosing, timing of administration, and duration of exposure, preventing dose-response analyses that could strengthen causal arguments. Third, we could not assess important clinical variables such as intraoperative hemodynamics, fluid balance, or echocardiographic parameters that might mediate or modify the ketamine-arrhythmia relationship. Additionally, several important confounders known to influence POAF, such as the type and side of lung resection, the overall extent of operation, intraoperative opioid dosing, and objective measures of preoperative illness severity, were not available in the TriNetX dataset and therefore could not be incorporated into our matching strategy. The absence of these clinically relevant variables may contribute to residual confounding despite the rigorous adjustments applied in our analysis. Although ketamine and NSAIDs are typically administered when opioids alone are judged insufficient for analgesia, suggesting broadly similar perioperative pain expectations and potentially comparable surgical complexity between groups, we cannot exclude residual confounding from unmeasured differences in resection extent or operative techniques. Therefore, subgroup analyses by resection type could not be performed and represent an important limitation of the study. Fourth, the definition of ketamine exposure as same-day administration may not capture the full spectrum of perioperative use patterns, potentially including patients with minimal exposure. Finally, detection bias might have influenced our results if patients in ketamine group received more intensive cardiac monitoring due to recognized hemodynamic effects, leading to increased arrhythmia detection.

In conclusion, this large-scale analysis demonstrated that perioperative ketamine exposure was associated with increased risk of POAF and other cardiac arrhythmias following VATS. Given the retrospective design and the absence of key exposure details, including ketamine dosing, opioid dosing, and overall extent of operation, the observed association should be interpreted as a potential signal rather than evidence of a causal relationship. These limitations may predispose the findings to residual confounding, and therefore the conclusions of this study must be viewed as hypothesis-generating rather than definitive.

Data Sharing Statement

The data that support the findings of this study are available from the TriNetX Research Network, but restrictions apply to the availability of these data, which were used under a collaboration agreement for the current study and so are not publicly available. Data are however available from the author (I-Wen Chen) upon reasonable request and with permission of TriNetX. Access to the de-identified data requires either TriNetX network membership or establishment of a collaborative agreement with TriNetX.

Ethics Approval Statement

The study protocol was approved by the Institutional Review Board of Chi Mei Medical Center, which granted a waiver of informed consent in compliance with observational research regulations (IRB number: 11406-E02).

Patient Consent Statement

Informed consent was not required for this retrospective study, as it involved secondary analysis of pre-existing data without any interventions or direct participant interaction.

Funding

There is no funding to report.

Disclosure

The authors declare no conflict of interest.

References

1. Dinic VD, Stojanovic MD, Markovic D, Cvetanovic V, Vukovic AZ, Jankovic RJ. Enhanced recovery in thoracic surgery: a review. Front Med Lausanne. 2018;5:14. doi:10.3389/fmed.2018.00014

2. Jones NL, Edmonds L, Ghosh S, Klein AA. A review of enhanced recovery for thoracic anaesthesia and surgery. Anaesthesia. 2013;68(2):179–189. doi:10.1111/anae.12067

3. Imperatori A, Rotolo N, Gatti M, et al. Peri-operative complications of video-assisted thoracoscopic surgery (VATS). Int J Surg. 2008;6(1):S78–81.

4. Napolitano MA, Sparks AD, Werba G, Rosenfeld ES, Antevil JL, Trachiotis GD. Video-assisted thoracoscopic surgery lung resection in United States veterans: trends and outcomes versus thoracotomy. Thorac Cardiovasc Surg. 2022;70(04):346–354. doi:10.1055/s-0041-1728707

5. Feray S, Lubach J, Joshi GP, Bonnet F, Van de Velde M. PROSPECT guidelines for video-assisted thoracoscopic surgery: a systematic review and procedure-specific postoperative pain management recommendations. Anaesthesia. 2022;77(3):311–325. doi:10.1111/anae.15609

6. Chen JQ, Yang XL, Gu H, Chai XQ, Wang D. The role of serratus anterior plane block during in video-assisted thoracoscopic surgery. Pain Ther. 2021;10(2):1051–1066. doi:10.1007/s40122-021-00322-4

7. Hoogma DF, Brullot L, Coppens S. Get your 7-point golden medal for pain management in video-assisted thoracoscopic surgery. Curr Opin Anaesthesiol. 2024;37(1):64–68. doi:10.1097/ACO.0000000000001325

8. Sun K, Liu D, Chen J, et al. Moderate-severe postoperative pain in patients undergoing video-assisted thoracoscopic surgery: a retrospective study. Sci Rep. 2020;10(1):795. doi:10.1038/s41598-020-57620-8

9. Crispi V, Isaac E, Abah U, et al. Surgical factors associated with new-onset postoperative atrial fibrillation after lung resection: the EPAFT multicentre study. Postgrad Med J. 2022;98(1157):177–182. doi:10.1136/postgradmedj-2020-138904

10. Halloran SJ, Martin S, Jiang B, et al. Risk factors for chronic atrial fibrillation following lung lobectomy. J Surg Res. 2024;295:350–356. doi:10.1016/j.jss.2023.11.031

11. Veiga Oliveira P, Cabral D, Antunes M, et al. Postoperative atrial fibrillation - video-assisted thoracoscopic surgery versus open surgery. Port J Card Thorac Vasc Surg. 2021;28(3):33–37. doi:10.48729/pjctvs.192

12. Ueda T, Suzuki K, Matsunaga T, Takamochi K, Oh S. Postoperative atrial fibrillation is less frequent in pulmonary segmentectomy compared with lobectomy. Gen Thorac Cardiovasc Surg. 2018;66(2):95–100. doi:10.1007/s11748-017-0858-x

13. Ivanovic J, Maziak DE, Ramzan S, et al. Incidence, severity and perioperative risk factors for atrial fibrillation following pulmonary resection. Interact Cardiovasc Thorac Surg. 2014;18(3):340–346. doi:10.1093/icvts/ivt520

14. Gaudino M, Di Franco A, Rong LQ, Piccini J, Mack M. Postoperative atrial fibrillation: from mechanisms to treatment. Eur Heart J. 2023;44(12):1020–1039. doi:10.1093/eurheartj/ehad019

15. Bjerrum E, Wahlstroem KL, Gögenur I, Burcharth J, Ekeloef S. Postoperative atrial fibrillation following emergency noncardiothoracic surgery: a systematic review. Eur J Anaesthesiol. 2020;37(8):671–679. doi:10.1097/EJA.0000000000001265

16. Wang MK, Meyre PB, Heo R, et al. Short-term and long-term risk of stroke in patients with perioperative atrial fibrillation after cardiac surgery: systematic review and meta-analysis. CJC Open. 2022;4(1):85–96. doi:10.1016/j.cjco.2021.09.011

17. Blum KA, Liew LY, Dutia AR, et al. Opioid-free anesthesia: a practical guide for teaching and implementation. Minerva Anestesiol. 2024;90(4):300–310. doi:10.23736/S0375-9393.23.17824-2

18. Hung KC, Chiu CC, Hsu CW, et al. Impact of opioid-free anesthesia on analgesia and recovery following bariatric surgery: a meta-analysis of randomized controlled studies. Obes Surg. 2022;32(9):3113–3124. doi:10.1007/s11695-022-06213-7

19. D’Amico F, Barucco G, Licheri M, et al. Opioid free anesthesia in thoracic surgery: a systematic review and meta analysis. J Clin Med. 2022;12(1):11. doi:10.3390/jcm12010011

20. Ao Y, Ma J, Zheng X, Zeng J, Wei K. Opioid-Sparing anesthesia versus opioid-free anesthesia for the prevention of postoperative nausea and vomiting after laparoscopic bariatric surgery: a systematic review and network meta-analysis. Anesth Analg. 2025;140(2):385–396. doi:10.1213/ANE.0000000000006942

21. Feeney A, Papakostas GI. Pharmacotherapy: ketamine and Esketamine. Psychiatr Clin North Am. 2023;46(2):277–290. doi:10.1016/j.psc.2023.02.003

22. Wang X, Lin C, Lan L, Liu J. Perioperative intravenous S-ketamine for acute postoperative pain in adults: a systematic review and meta-analysis. J Clin Anesth. 2021;68:110071. doi:10.1016/j.jclinane.2020.110071

23. Sun X, Li C, Xu L, et al. Effect and safety of perioperative ketamine/esketamine administration on postoperative pain and depression after breast cancer surgery: a systematic review and meta-analysis. Front Pharmacol. 2025;16:1532524. doi:10.3389/fphar.2025.1532524

24. Hung KC, Kao CL, Ho CN, et al. The impact of perioperative ketamine or esketamine on the subjective quality of recovery after surgery: a meta-analysis of randomised controlled trials. Br J Anaesth. 2024;132(6):1293–1303. doi:10.1016/j.bja.2024.03.012

25. Yan H, Gao H, Fan Y, et al. Opioid-free versus opioid-based anesthesia on postoperative pain after thoracoscopic surgery: the use of intravenous and epidural esketamine. Anesth Analg. 2023;137(2):399–408. doi:10.1213/ANE.0000000000006547

26. Vishnuraj KR, Singh K, Sahay N, Sinha C, Kumar A, Kumar N. Opioid-free anesthesia using a combination of ketamine and dexmedetomidine in patients undergoing laparoscopic cholecystectomy: a randomized controlled trial. Anesth Pain Med. 2024;19(2):109–116. doi:10.17085/apm.23097

27. Choi H, Huh J, Kim M, Moon SW, Kim KS, Hwang W. Opioid-free using ketamine versus opioid-sparing anesthesia during the intraoperative period in video-assisted thoracoscopic surgery: a randomized controlled trial. J Pers Med. 2024;14.

28. Hung KC, Wu SC, Chang PC, et al. Impact of intraoperative ketamine on postoperative analgesic requirement following bariatric surgery: a meta-analysis of randomized controlled trials. Obes Surg. 2021;31(12):5446–5457. doi:10.1007/s11695-021-05753-8

29. Hung KC, Kao CL, Ho CN, et al. Efficacy and safety of esketamine in preventing perioperative neurocognitive disorders: a meta-analysis of randomized controlled studies. Syst Rev. 2025;14(1):68. doi:10.1186/s13643-025-02807-1

30. Kohtala S. Ketamine-50 years in use: from anesthesia to rapid antidepressant effects and neurobiological mechanisms. Pharmacol Rep. 2021;73(2):323–345. doi:10.1007/s43440-021-00232-4

31. Ho CN, Chung WC, Kao CL, et al. Impact of preoperative QTc interval prolongation on short-term postoperative outcomes: a retrospective study. J Clin Anesth. 2024;98:111574. doi:10.1016/j.jclinane.2024.111574

32. Chen IW, Chang LC, Ho CN, et al. Association between COVID-19 and the development of chronic kidney disease in patients without initial acute kidney injury. Sci Rep. 2025;15(1):10924. doi:10.1038/s41598-025-96032-4

33. Huang YJ, Kao CL, Hung KC, Lai YC, Wu JY, Chen IW. Impact of preoperative COVID-19 on postoperative outcomes in patients undergoing bariatric/metabolic surgery: an updated analysis of TrinetX databases. Obes Surg. 2025;35(5):1808–1817. doi:10.1007/s11695-025-07850-4

34. Shelley B, Glass A, Keast T, et al. Perioperative cardiovascular pathophysiology in patients undergoing lung resection surgery: a narrative review. Br J Anaesth. 2023;130(1):e66–e79. doi:10.1016/j.bja.2022.06.035

35. Liu J, Huang Y, Ma W, Liu H, Cao Y, Wu C. Prediction, prevention and management of new onset perioperative atrial fibrillation and flutter in patients undergoing non-cardiac thoracic surgery. Minerva Anestesiol. 2022;88(6):490–498. doi:10.23736/S0375-9393.21.16034-1

36. Jiang S, Liao X, Chen Y, Li B. Exploring postoperative atrial fibrillation after non-cardiac surgery: mechanisms, risk factors, and prevention strategies. Front Cardiovasc Med. 2023;10:1273547. doi:10.3389/fcvm.2023.1273547

37. AlTurki A, Marafi M, Proietti R, et al. Major adverse cardiovascular events associated with postoperative atrial fibrillation after noncardiac surgery: a systematic review and meta-analysis. Circ Arrhythm Electrophysiol. 2020;13:e007437.

38. Mastrodonato A, Cohensedgh O, LaGamma CT, McGowan JC, Hunsberger HC, Denny CA. Prophylactic (R, S)-ketamine selectively protects against inflammatory stressors. Behav Brain Res. 2020;378:112238. doi:10.1016/j.bbr.2019.112238

39. Xiao S, Zhou Y, Wang Q, Yang D. Ketamine attenuates airway inflammation via inducing inflammatory cells apoptosis and activating Nrf2 pathway in a mixed-granulocytic murine asthma model. Drug Des Devel Ther. 2022;16:4411–4428. doi:10.2147/DDDT.S391010

40. Dale O, Somogyi AA, Li Y, Sullivan T, Shavit Y. Does intraoperative ketamine attenuate inflammatory reactivity following surgery? A systematic review and meta-analysis. Anesth Analg. 2012;115(4):934–943. doi:10.1213/ANE.0b013e3182662e30

Creative Commons License © 2025 The Author(s). This work is published and licensed by Dove Medical Press Limited. The full terms of this license are available at https://www.dovepress.com/terms and incorporate the Creative Commons Attribution - Non Commercial (unported, 4.0) License. By accessing the work you hereby accept the Terms. Non-commercial uses of the work are permitted without any further permission from Dove Medical Press Limited, provided the work is properly attributed. For permission for commercial use of this work, please see paragraphs 4.2 and 5 of our Terms.