Introduction

Venous thromboembolism (VTE), comprising deep vein thrombosis (DVT) and pulmonary embolism (PE), is the third leading cause of vascular-related mortality worldwide, following myocardial infarction and stroke1. It also remains one of the most common and potentially fatal postoperative complications2,3. Both hospitalization and surgical procedures are established risk factors for VTE, especially major operations, which increase thrombosis risk due to prolonged immobilization, endothelial injury, and surgery-induced hypercoagulable states4,5. Among VTE events, DVT is the predominant clinical manifestation. Although often asymptomatic, DVT can lead to PE in approximately one-third of patients, posing a significant threat to survival6. Therefore, early identification of high-risk individuals during the perioperative period is critical.

Current clinical guidelines recommend pharmacologic and/or mechanical thromboprophylaxis for patients at high risk7,8. However, indiscriminate use of anticoagulants without proper risk stratification may increase the incidence of bleeding complications, particularly in patients with low baseline thrombotic risk9. Thus, achieving personalized perioperative risk stratification is essential for optimizing preventive strategies.

Traditional risk assessment tools such as the Caprini score are widely used in surgical populations10, but they mainly rely on static preoperative variables and fail to capture dynamic physiological changes after surgery. Moreover, some studies have questioned the empirical basis of these scores, noting inconsistencies between the assigned weights and actual risk estimates11. These models also lack integration of time-varying biomarkers, such as coagulation and inflammatory indicators, which may provide important insights into thrombosis risk.

D-dimer, a fibrin degradation product, is a well-established biomarker of coagulation and fibrinolytic activity, and is commonly elevated in patients with acute or active DVT12. However, in the early postoperative phase, D-dimer levels can be confounded by surgical inflammation, reducing their specificity. Therefore, in clinical practice, D-dimer is primarily used as a rule-out rather than a confirmatory test for DVT13.

Emerging evidence suggests that cumulative exposure to biomarkers over time, rather than single time-point measurements, may offer superior predictive power in risk models. For example, cumulative exposure to low-density lipoprotein cholesterol (LDL-C) has been shown to be significantly associated with peripheral artery disease and offers better predictive value than LDL-C levels at any single time point14. Similarly, cumulative LDL-C exposure from age 18 to 60 has been independently linked to subsequent coronary heart disease, beyond midlife LDL-C levels15. While these findings support the utility of time-integrated biomarkers in chronic disease contexts, whether this concept can be meaningfully extended to dynamic, acutely fluctuating perioperative markers such as D-dimer remains uncertain. Therefore, caution is warranted when extrapolating from chronic risk paradigms to acute care settings, and further studies are needed to clarify the clinical relevance of cumulative D-dimer exposure in this context.

Inspired by this concept, we introduced a cumulative indicator termed 7-day D-dimer exposure (7dDDE) to quantify coagulation burden after gastrointestinal surgery. This index was calculated using the trapezoidal rule based on D-dimer levels collected preoperatively and on postoperative days 1, 3, 5, and 716, thereby capturing both the intensity and duration of the hypercoagulable state. We hypothesized that 7dDDE would serve as an independent predictor of postoperative DVT. To test this, we conducted a retrospective cohort study in a Chinese surgical population, aiming to establish a predictive model incorporating 7dDDE for improved DVT risk stratification and individualized thromboprophylaxis.

Materials and methods

Data collection

Between January 2023 and January 2024, we retrospectively collected data from patients who underwent gastrointestinal surgery at The First Hospital of Putian, Fujian Province, China. The study protocol was approved by the Ethics Committee of The First Hospital of Putian (Approval No: 2023-121). All procedures were conducted in accordance with the Declaration of Helsinki and relevant guidelines for research involving human participants. Due to the retrospective nature of the study, informed consent was waived by the Ethics Committee of The First Hospital of Putian.

Patients were included if they met all of the following criteria: (1) aged between 18 and 80 years; (2) no evidence of preoperative DVT based on duplex ultrasonography, with available postoperative ultrasound data within 7 days after surgery; (3) complete D-dimer measurements at baseline and on postoperative days 1, 3, 5, and 7, as well as no missing values in other key clinical variables; (4) no recent use of medications known to affect coagulation or anticoagulation function. After applying the inclusion and exclusion criteria, a total of 525 patients were included in the final study cohort (Fig. 1).

Fig. 1
Fig. 1
Full size image

Study flowchart.

DVT in patients under gastrointestinal surgery assessment

The assessment of preoperative and postoperative DVT was performed using lower extremity venous ultrasonography. All examinations were independently conducted by two qualified attending sonographers from the Department of Ultrasound at The First Hospital of Putian. In cases of disagreement between the two assessors, the final diagnosis was determined by a senior ultrasound specialist with an associate chief physician title or above.

All patients underwent standardized bilateral lower limb venous ultrasound prior to surgery to exclude pre-existing DVT. Within 7 days postoperatively, repeat ultrasound was performed to identify newly developed DVT. The diagnostic criteria for DVT were based on the international consensus on ultrasound evaluation17, including the following three key imaging findings: (1) Incomplete venous compressibility under probe pressure; (2) The presence of abnormal hyperechoic intraluminal structures suggestive of thrombus; and (3) Absence or marked reduction of blood flow signals on color Doppler imaging at the suspected thrombus site. The occurrence of DVT within 7 days after surgery served as the primary outcome in this study and was used for model construction and risk prediction analysis.

Clinical features

A total of 44 potential clinical variables available at admission were included in this study as candidate predictors for subsequent modeling, excluding DVT status. Based on D-dimer levels measured preoperatively and on postoperative days 1, 3, 5, and 7, we constructed a composite variable to reflect the dynamic thrombotic burden during the early postoperative period to 7-day D-dimer exposure. 7dDDE was defined as the area under the D-dimer concentration–time curve from preoperative to postoperative day 7. This area was approximated using the trapezoidal rule, allowing integration of serial measurements across multiple time points to represent the total cumulative D-dimer exposure during the early postoperative phase, as illustrated by the following formula:

$$7{\text{dDDE}} = \mathop \sum \limits_{{{\text{i}} = 1}}^{{\text{n}}} \frac{{\left( {{\text{D}}_{{\text{i}}} + {\text{D}}_{{{\text{i}} - 1}} } \right){*}({\text{T}}_{{\text{i}}} - {\text{T}}_{{{\text{i}} - 1}} )}}{2}$$

Here, D₀ refers to the preoperative D-dimer level, and Dₙ represents the D-dimer level on postoperative day 7. The corresponding time points are denoted as T₀ (preoperative) and Tₙ (postoperative day 7), respectively. The remaining Di and Ti represent D-dimer levels and time points on postoperative days 1, 3, and 5.

During feature engineering, we first excluded variables with strong multicollinearity based on pairwise correlation coefficients greater than 70% and variance inflation factors exceeding 5. Subsequently, numerical variables were subjected to feature selection using both the Boruta algorithm and Lasso regression, and the intersection of the two methods was used to define the final feature set. Details of the feature selection and engineering process are shown in Supplementary Fig. 1 and Supplementary Table 1. A total of 15 variables were ultimately included in the modeling analysis, comprising 5 numerical variables and 10 categorical variables.

Given the imbalance in sample size between the DVT and non-DVT groups and the overall limited cohort size, we transformed age and BMI into ordered categorical variables—age groups and BMI groups—to improve the feasibility and quality of subsequent propensity score matching and modeling.

Statistical analysis

All statistical analyses were performed using R software (version 4.3.0). The normality of continuous variables was assessed using the Shapiro–Wilk test, and none of the variables followed a normal distribution. Therefore, continuous variables were expressed as median (interquartile range) and compared between groups using the Mann–Whitney U test. Categorical variables were presented as counts and percentages, and compared using the chi-square test or Fisher’s exact test, as appropriate.

To control for potential confounding in the assessment of DVT occurrence, a propensity score matching (PSM) model was constructed based on sex, age group, and BMI group. Nearest-neighbor matching was applied with a 1:1 ratio and a caliper of 0.01. Covariate balance before and after matching was evaluated using standardized mean differences (SMDs), and visualized using a Love plot.

The matched dataset was used for both univariate and multivariate logistic regression analyses to examine the independent association between 7dDDE and postoperative DVT, with adjustment for relevant preoperative covariates. Subgroup analyses and interaction tests were conducted to evaluate the consistency and potential effect modification of 7dDDE across different populations.

For model development, the original dataset was randomly split into a training set and a testing set in a 7:3 ratio. A multivariable logistic regression model was built on the training set, with hyperparameter tuning performed via tenfold cross-validation. The model was validated on the testing set, where the receiver operating characteristic (ROC) curve was plotted, and the area under the curve (AUC), sensitivity, specificity, and optimal cutoff point (based on the Youden index) were calculated.

Model performance was further evaluated using decision curve analysis (DCA), clinical impact curves (CIC), and calibration plots. Model interpretability was assessed using SHAP values to rank feature importance. Finally, a nomogram was constructed based on the top five predictors to facilitate individualized risk prediction. All statistical tests were two-tailed, and a P value < 0.05 was considered statistically significant.

Additionally, to evaluate the dynamic trends of D-dimer levels over time and their interaction with DVT status, we performed a linear mixed-effects model (LMM) using the lmerTest package. The model included repeated D-dimer measurements at five timepoints (preoperative, postoperative days 1, 3, 5, and 7) as the dependent variable, with fixed effects of timepoint, DVT group, and their interaction, while adjusting for age, BMI, gender, and log-transformed CRP. Patient ID was specified as a random effect to account for intra-individual variability. Type III ANOVA was applied to assess the significance of fixed effects, and group-specific D-dimer trajectories were visualized using ggplot2.

Results

Baseline characteristics

A total of 525 patients were ultimately included in this study, comprising 112 patients with DVT and 413 without DVT. Baseline analysis revealed significant differences between the two groups in terms of age, hemoglobin level, preoperative triglycerides, postoperative C-reactive protein (CRP), postoperative estimated glomerular filtration rate, as well as D-dimer levels measured preoperatively and on postoperative days 1, 3, 5, and 7 (Table 1). Density plots of all continuous variables are presented in Supplementary Fig. 2.

Table 1 Comparison of clinical characteristics between the DVT and non-DVT groups.

Analysis based on propensity score matching

To minimize confounding effects, PSM was performed between the DVT and non-DVT groups, resulting in 111 matched patients in each group. The matching was effective, as several covariates exhibited SMD greater than 0.1 before matching, whereas after matching, all covariates except for history of malignancy and history of fracture had SMDs below 0.1 (Table 2). The improved balance between groups was also visually confirmed using a Love plot (Supplementary Fig. 3).

Table 2 Comparison of baseline characteristics between DVT and non-DVT groups before and after propensity score matching.

Univariate and multivariate logistic regression analyses were conducted on the matched dataset (Table 3). The results showed that 7dDDE remained significantly associated with postoperative DVT after adjusting for covariates (P < 0.05), indicating that it is an independent predictor of DVT. Subgroup analyses (Fig.  and Supplementary Table 2 ) revealed that the association between 7dDDE and DVT risk was consistently positive across most subgroups, suggesting a robust effect. The association was not statistically significant only in patients with a history of cardiovascular disease. Further interaction analysis showed no significant interaction between 7dDDE and cardiovascular disease history (OR = 0.97, 95% CI 0.87–1.08, P = 0.563).

Table 3 Logistic regression analysis of feature-engineered continuous variables associated with postoperative DVT risk.
Fig. 2
Fig. 2
Full size image

Forestplot of subgroup analysis for the association between 7dDDE and DVT.

It is worth noting that although the post-matching SMDs for history of malignancy and history of fracture remained slightly above 0.1, their prevalence in the cohort was relatively low (7.2% and 6.4%, respectively). These variables were included as covariates in the subsequent regression models to control for potential residual confounding. Additionally, in some subgroups such as patients aged < 50 years, those with a smoking history, or those with malignancy, the 95% confidence intervals for the odds ratios did not include 1. However, the P values did not reach statistical significance, which may be attributed to limited sample sizes in these subpopulations.

Development and evaluation of the predictive model

To evaluate the predictive ability for postoperative DVT, a multivariable logistic regression model was developed using the training set and validated in the testing set. The model achieved an area under the receiver operating characteristic curve of 0.73 in the testing set, indicating good discriminative performance. Based on the maximum Youden index, the optimal probability threshold was determined to be 0.154, yielding a sensitivity of 87.9% and a specificity of 51.2%. This cutoff point was marked with a red dot on the ROC curve (Fig. 3a), and incorporation of 7dDDE improved overall model performance in terms of AUC, sensitivity, balanced accuracy, and F1 score, with a statistically significant improvement in AUC (Supplementary Table 3).

Fig. 3
Fig. 3
Full size image

Model performance evaluation and interpretation in the testing set. (a) ROC curve of the logistic regression model incorporating 7dDDE. (b) Decision Curve Analysis showing the net clinical benefit of the model across a range of high-risk thresholds compared to “treat-all” and “treat-none” strategies. (c) Clinical Impact Curve displaying the number of individuals identified as high-risk and the number of true positives across different thresholds. (d) Calibration curve generated via 100 bootstrap resamples. (e) SHAP plot ranking feature importance. (f) Nomogram constructed based on the top five variables.

DCA demonstrated that the model provided a greater net clinical benefit than the “treat-all” or “treat-none” strategies across a wide range of risk thresholds (Fig. 3b). The CIC further showed that the number of high-risk individuals predicted by the model closely matched the actual number of DVT cases at various threshold levels (Fig. 3c), supporting its potential clinical value for early postoperative risk stratification.

The model also exhibited good calibration. The calibration curve generated using 100 bootstrap resamples showed strong agreement between predicted and observed probabilities, with a mean absolute error of 0.027 (Fig. 3d). In the model interpretation analysis, SHAP value evaluation revealed that the five most influential variables were: 7dDDE, preoperative triglycerides, postoperative CRP, BMI group, and preoperative D-dimer (Fig. 3e). Based on these five predictors, a nomogram was constructed to facilitate individualized risk prediction and support clinical application (Fig. 3f).

Longitudinal trend analysis of D-dimer by DVT status

To further explore the dynamic profile of D-dimer levels between the DVT and non-DVT groups, we fitted a linear mixed-effects model incorporating all five D-dimer timepoints (preoperative and postoperative days 1, 3, 5, and 7). After adjusting for age, BMI, gender, and log-transformed CRP, the interaction term between timepoint and DVT status was statistically significant (Supplementary Table 4), indicating that D-dimer levels followed distinct temporal trajectories in the two groups.

As shown in Supplementary Fig. 4, the DVT group exhibited persistently higher D-dimer levels at each postoperative timepoint compared to the non-DVT group. The model also identified age and CRP as independent predictors of elevated D-dimer. These findings suggest that the time-varying pattern of D-dimer, particularly in the early postoperative phase, differs substantially between patients with and without DVT, supporting the relevance of 7dDDE as a predictive metric.

Discussion

DVT remains one of the most common and potentially fatal complications following gastrointestinal surgery, with the potential to cause pulmonary embolism and significantly increase perioperative morbidity and mortality. Although thromboprophylaxis strategies are widely implemented, timely identification of high-risk individuals remains challenging. D-dimer, despite its high sensitivity, has limited specificity18, and is commonly used as an auxiliary diagnostic indicator rather than a stand-alone predictor for DVT, particularly in postoperative settings19,20. While some non-surgical studies suggest that D-dimer may independently predict DVT and reduce the need for imaging21, its predictive value in the postoperative context remains suboptimal.

To address this gap, our team introduced a novel dynamic biomarker, termed 7dDDE, designed to quantify the cumulative coagulation burden in the early postoperative period. Unlike conventional models relying on single-time-point laboratory values or static baseline features, 7dDDE uses a time-weighted area under the curve approach to integrate both the magnitude and duration of D-dimer elevation, thereby reflecting the evolving coagulative status following surgery. This comprehensive metric potentially offers improved insight into the progression of postoperative hypercoagulability. In our study, 7dDDE was confirmed as an independent predictor of postoperative DVT, remaining statistically significant even after adjusting for confounders via PSM, and demonstrating consistent associations across most patient subgroups.

Furthermore, we constructed a logistic regression prediction model incorporating 7dDDE and validated its performance in an independent test cohort. The model exhibited good discriminative ability; during ROC analysis, we identified an optimal cutoff probability, above which patients can be classified as high-risk for postoperative DVT. For such individuals, intensified thromboprophylactic monitoring—such as dynamic D-dimer trend tracking, lower extremity Doppler ultrasound, or extended anticoagulation—may be considered. DCA and CIC supported its potential clinical utility. The model may serve as a clinical decision-support tool that can be embedded into perioperative care pathways, enabling individualized DVT risk prediction and helping clinicians optimize screening and intervention strategies in resource-limited settings. SHAP-based interpretability analysis identified 7dDDE as the most influential variable, followed by postoperative CRP, preoperative triglycerides, BMI group, and baseline D-dimer. These findings not only underscore the value of D-dimer kinetics but also highlight the complementary roles of inflammation, metabolic status, and individual physiological reserve in thrombotic risk prediction22,23,24.

In addition to the cumulative D-dimer exposure, our supplementary longitudinal analysis demonstrated that D-dimer trajectories were significantly different between patients with and without DVT. Even after adjusting for age, BMI, gender, and CRP, DVT patients exhibited consistently higher D-dimer levels across all postoperative timepoints. This reinforces the importance of capturing not only the absolute magnitude but also the temporal dynamics of coagulation biomarkers. Such findings lend further support to the validity of 7dDDE as a clinically meaningful and biologically plausible metric for thrombotic risk assessment in surgical populations.

From a pathophysiological perspective, the association between sustained D-dimer elevation and thrombosis risk is biologically plausible. D-dimer is a fibrin degradation product generated through a cascade involving thrombin formation, fibrin polymerization, and plasmin-mediated fibrinolysis. Elevated and prolonged D-dimer levels reflect ongoing thrombin activity and impaired fibrin clot resolution, both of which are hallmarks of a prothrombotic state25. Previous studies have demonstrated that postoperative D-dimer trajectories may offer more predictive value than single measurements. For instance, Palareti et al. reported that persistently elevated D-dimer after anticoagulation discontinuation was significantly associated with VTE recurrence26. Our study applies this concept to the immediate postoperative period by introducing 7dDDE, a quantifiable metric that reflects the dynamic coagulative burden. CRP, another key predictor in our model, serves as a surrogate marker for systemic inflammation and has been associated with endothelial dysfunction and thrombogenesis. Several epidemiologic studies have confirmed the link between elevated CRP and increased DVT risk27,28. Likewise, elevated triglycerides29 and higher BMI30 are well-established prothrombotic factors. The inclusion of these variables in our model, and their ranking in SHAP analysis, further supports the biological plausibility of the selected predictors. Importantly, our modeling approach also aimed to bridge statistical robustness and clinical usability. By translating the final model into a nomogram based on the top five predictors, we provide a simplified yet interpretable bedside tool for individualized DVT risk assessment, facilitating personalized perioperative management strategies.

Despite the innovative nature and clinical potential of this study, several limitations should be acknowledged. First, this was a single-center retrospective study conducted at a tertiary medical institution, which may limit the generalizability of our findings. Although we employed propensity score matching to control for key confounding variables and validated the model in an independent testing set, further external validation in multicenter or prospective cohorts is necessary to assess its robustness and applicability across broader populations. While multiple coagulation-related biomarkers were initially considered, they were not retained in the final model after feature selection. This does not imply a lack of clinical relevance but may reflect their relatively limited predictive contribution within our dataset. Additionally, although we used the fastshap method to enhance model interpretability and quantify the association between individual predictors and DVT risk, this approach is inherently correlational and does not infer causality. Moreover, although our model exhibited acceptable discrimination and calibration, the number of DVT events was relatively limited. Given the class imbalance and moderate sample size, potential overfitting cannot be entirely ruled out. While we explored SMOTE-based data augmentation, it did not significantly improve model performance. Therefore, the current findings should be regarded as preliminary, requiring validation in larger-scale datasets. Lastly, although comparing our model with established clinical tools such as the Caprini score would have provided meaningful clinical context, the retrospective nature of our dataset and the absence of key variables precluded this analysis. Future studies incorporating prospectively collected Caprini scores are warranted to better contextualize the added value of the proposed model.

Conclusion

In this study, we introduced a novel cumulative biomarker, 7-day D-dimer exposure (7dDDE), to capture perioperative coagulation burden in gastrointestinal surgery patients. Our results demonstrated that 7dDDE is an independent predictor of postoperative DVT and the top contributor in a validated predictive model. Supplementary longitudinal analysis using a linear mixed-effects model further confirmed that D-dimer levels followed significantly different temporal patterns between DVT and non-DVT groups, even after adjusting for age, BMI, gender, and inflammation (CRP). This underscores the value of considering both the cumulative magnitude and dynamic trends of D-dimer when assessing thrombotic risk. Together, these findings support the integration of 7dDDE into perioperative risk assessment frameworks and highlight the need for further prospective studies to validate its predictive and mechanistic roles.