Abstract
BACKGROUND: Current classifications of anal fistula provide limited detail on tract morphology and offer little guidance for prognostic risk stratification after surgery. This study aims to evaluate the impact of deeper anatomical invasions (e.g., anal sphincter and perianal spaces) and disease origins on postoperative outcomes and develops a predictive model to enhance risk stratification. METHODS: This retrospective cohort study analysed patients who underwent anal fistula surgery between January 2020 and May 2024. Prognosis at 12 months was categorized into good prognosis when clinical healing was achieved and poor prognosis when healing criteria were not met or residual fistula was seen on imaging. Clinical, surgical, and imaging variables were analysed using univariate and multivariate logistic regression. Independent risk factors were incorporated into a predictive nomogram model, and its performance was assessed using receiver operating characteristic (ROC) curves, calibration plots, and decision curve analysis (DCA). RESULTS: Of the 480 patients, 73 (15.2%) had poor outcomes. Suprasphincteric (56.25%) and extrasphincteric (50.00%) fistulas had more poor outcomes; complex fistulas (37.64%) had more poor outcomes. Six independent risk factors were identified: history of perianal abscess and fistula surgery (OR = 5.15), number of invaded spaces (OR = 1.63), deep posterior anal space involvement (OR = 7.30), deep anterior anal space involvement (OR = 7.16), Crohn’s disease (OR = 10.61), and deep external anal sphincter invaded (OR = 5.08). The nomogram model demonstrated excellent predictive capability (AUC = 0.965), with high accuracy in calibration and clinical utility demonstrated by the DCA. CONCLUSION: This study developed a robust predictive model that emphasises extrasphincteric anatomical involvement, especially invasion of the deep spaces and the overall number of invaded perianal and rectal spaces. The identified risk factors improve postoperative risk stratification and guide individualised surgical management while complementing existing classifications. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1186/s12893-025-03395-6.