Objective:The clinical value of ultrasound assessment of diaphragm function in guiding the weaning of ventilator for patients undergoing cardiac surgery.Methods:A total of 103 patients who underwent cardiac surgery in the Department of Cardiac Surgery,Beijing Anzhen Hospital from January 2023 to November 2023 and underwent diaphragm ultrasound monitoring were selected and divided into weaning success group and weaning failure group according to the results of weaning.Logistic regression analysis was performed to analyze the risk factors of weaning failure,diaphragm thickening fraction(DTF)and diaphragmatic excursion(DE)were measured by ultrasound,and receiver operating characteristic curve(ROC)curve was used to evaluate DTF and DE for predicting ventilator weaning outcomes.Results:A total of 103 patients were included,with an in-hospital mortality rate of 2.9%(n=3).There were 12 cases in the weaning failure group and 91 cases in the weaning group,and the incidence of pulmonary infection(41.7%vs.2.2%,P<0.001),liver insufficiency(25%vs.4.4%,P=0.008)and renal insufficiency(25%vs.1.1%,P=0.005)in the weaning failure group were significantly higher than those in the weaning group.Compared with the weaning group,the operation time,mechanical ventilation time and ICU stay time were longer in the weaning failure group(operation time:7 h vs.4 h,P=0.001;mechanical ventilation time:47 h vs.20h,P=0.019;ICU stay time:7 days vs.2 days,P=0.001).The incidence of diaphragmatic dysfunction was 45.6%(n=47).Logistic regression analysis showed that decreased diaphragm mobility and diaphragm thickening rate were independent risk factors for weaning failure.ROC curve analysis showed that diaphragm thickening rate had a sensitivity of 71.1%and a specificity of 75%in predicting weaning failure.The sensitivity and specificity of diaphragm mobility were 78.9%and 83.3%.Conclusions:Both DE and DTF have good clinical predictive value for weaning in patients undergoing cardiac surgery.