Clinical characteristics and prognostic factors for Crohn's disease relapses using natural language processing and machine learning: a pilot study

Eur J Gastroenterol Hepatol. 2022 Apr 1;34(4):389-397. doi: 10.1097/MEG.0000000000002317.


Background: The impact of relapses on disease burden in Crohn's disease (CD) warrants searching for predictive factors to anticipate relapses. This requires analysis of large datasets, including elusive free-text annotations from electronic health records. This study aims to describe clinical characteristics and treatment with biologics of CD patients and generate a data-driven predictive model for relapse using natural language processing (NLP) and machine learning (ML).

Methods: We performed a multicenter, retrospective study using a previously validated corpus of CD patient data from eight hospitals of the Spanish National Healthcare Network from 1 January 2014 to 31 December 2018 using NLP. Predictive models were created with ML algorithms, namely, logistic regression, decision trees, and random forests.

Results: CD phenotype, analyzed in 5938 CD patients, was predominantly inflammatory, and tobacco smoking appeared as a risk factor, confirming previous clinical studies. We also documented treatments, treatment switches, and time to discontinuation in biologics-treated CD patients. We found correlations between CD and patient family history of gastrointestinal neoplasms. Our predictive model ranked 25 000 variables for their potential as risk factors for CD relapse. Of highest relative importance were past relapses and patients' age, as well as leukocyte, hemoglobin, and fibrinogen levels.

Conclusion: Through NLP, we identified variables such as smoking as a risk factor and described treatment patterns with biologics in CD patients. CD relapse prediction highlighted the importance of patients' age and some biochemistry values, though it proved highly challenging and merits the assessment of risk factors for relapse in a clinical setting.

Trial registration: NCT03668249.

Publication types

  • Multicenter Study

MeSH terms

  • Biological Products* / therapeutic use
  • Crohn Disease* / diagnosis
  • Crohn Disease* / drug therapy
  • Humans
  • Machine Learning
  • Natural Language Processing
  • Pilot Projects
  • Prognosis
  • Recurrence
  • Retrospective Studies


  • Biological Products

Associated data