---
title: "NLP detection of endoscopy-related adverse events: transformer vs rule-based accuracy in Turkish t"
id: "bmj-open-5-natural-language-processing-for-detecting-endoscopy-related-adverse-events-in"
canonical_url: "https://medichelpline.com/clinical-feed/bmj-open-5-natural-language-processing-for-detecting-endoscopy-related-adverse-events-in"
content_type: "clinical_feed_article"
specialty: "Gastroenterology"
source_name: "BMJ Open"
source_url: "http://bmjopen.bmj.com/cgi/content/short/16/9/e118459?rss=1"
published_at: "2026-09-03T12:23:28.000Z"
evidence_level: "Journal Feed"
license: "CC-BY-NC-4.0 / Informational Use"
---
# NLP detection of endoscopy-related adverse events: transformer vs rule-based accuracy in Turkish t
## Provenance & Clinical Metadata
- **Canonical URL:** https://medichelpline.com/clinical-feed/bmj-open-5-natural-language-processing-for-detecting-endoscopy-related-adverse-events-in
- **Specialty:** [Gastroenterology](https://medichelpline.com/clinical-feed/gastroenterology.md)
- **Primary Source:** BMJ Open
- **Source URL:** [Original Journal Publication](http://bmjopen.bmj.com/cgi/content/short/16/9/e118459?rss=1)
- **Published At:** 2026-09-03T12:23:28.000Z
- **Evidence Rating:** Journal Feed
## Executive GIST (TL;DR)
- This retrospective diagnostic accuracy study evaluated automated detection of **endoscopy-related adverse events (AEs)** from non-English free-text procedure reports at a tertiary endoscopy unit in Türkiye from August 2015 to August 2025. It compared a **rule-based** natural language processing (NLP) approach with a **transformer-based** NLP model for classifying index procedure reports by 30-day clinician-adjudicated AE status. - The source cohort contained 140,385 procedure reports. All 1,512 lexicon-positive and 2,000 randomly sampled lexicon-negative reports were clinician-adjudicated, yielding 1,208 AE-positive reports overall. A 13,333-report corpus was allocated at the patient level to training (n=9,333), validation (n=2,000) and a locked, fully adjudicated test set (n=2,000; 180 AE-positive). - The primary outcome was confirmation of an attributable AE within 30 days. Models used only the index report for classification; adjudication used subsequent documentation as well. - Diagnostic accuracy measures included **sensitivity**, **specificity**, positive and negative predictive values, F1 score, and transformer precision–recall area under the curve (**PR-AUC**). - The rule-based model achieved 84.4% sensitivity (95% CI 78.4%–89.0%) and 99.5% specificity (95% CI 99.1%–99.7%). The transformer model achieved higher sensitivity (92.2%, 95% CI 87.4%–95.3%; McNemar p=0.01) and 98.4% specificity (95% CI 97.7%–98.9%). - Positive predictive values were 94.4% (rule-based) and 85.1% (transformer); negative predictive values were 98.5% and 99.2%, respectively. Both models had F1 scores of 0.89. Transformer PR-AUC was 0.91 (95% CI 0.87–0.94). - The transformer reduced false negatives from 28 to 14 but increased false positives from 9 to 29 compared with the rule-based model. - Because lexicon-negative reports were only partially verified, the study did not estimate cohort-wide AE incidence. - Authors conclude both approaches had high specificity; the transformer traded fewer missed AEs for more false positives. Results support clinician-supervised retrospective case identification and quality assurance, but do not support autonomous diagnosis, prospective prediction, or point-of-care deployment. External validation is required.
## Clinical Analysis & Structured Key Points
Objectives Automated surveillance of endoscopy-related adverse events (AEs) from non-English free-text reports remains insufficiently evaluated. We compared rule-based and transformer-based natural language processing (NLP) for classifying index procedure reports according to 30-day clinician-adjudicated AE status. Design Retrospective, single-centre diagnostic accuracy study. Setting Tertiary endoscopy unit in Tu&#x0308;rkiye, August 2015 to August 2025. Participants The source cohort comprised 140 385 reports. All 1512 lexicon-positive and 2000 randomly sampled lexicon-negative reports underwent clinician adjudication, identifying 1208 AE-positive reports. A 13 333-report corpus was allocated at patient level to training (n=9333), validation (n=2000) and a locked, fully adjudicated test set (n=2000; 180 AE-positive). Primary and secondary outcome measures The primary outcome was confirmation of an attributable AE within 30 days. Models analysed the index report only, whereas adjudication included subsequent documentation. Secondary outcomes were AE category and documentation timing. Diagnostic accuracy measures included sensitivity, specificity, predictive values, F1 score and transformer precision - recall area under the curve (PR-AUC). Results The rule-based model achieved 84.4% sensitivity (95% CI 78.4% to 89.0%) and 99.5% specificity (95% CI 99.1% to 99.7%). The transformer achieved higher sensitivity (92.2%, 95% CI 87.4% to 95.3%; McNemar's test, p=0.01) and 98.4% specificity (95% CI 97.7% to 98.9%). Positive predictive values were 94.4% and 85.1%, and negative predictive values were 98.5% and 99.2%, for the rule-based and transformer models, respectively; both had F1 scores of 0.89. Transformer PR-AUC was 0.91 (95% CI 0.87 to 0.94). The transformer reduced false negatives from 28 to 14 but increased false positives from 9 to 29. Cohort-wide AE incidence was not estimated because lexicon-negative reports were only partially verified. Conclusions Both approaches had high specificity. The transformer reduced false-negative classifications but increased false-positive classifications. These findings support clinician-supervised retrospective case identification and quality assurance, but not autonomous diagnosis, prospective prediction or point-of-care use. External validation is required.
## Related Clinical Research

- [Very low‑calorie diet reduces hepatic steatosis and remodels circulating metabolite–miRNA networks](https://medichelpline.com/clinical-feed/medrxiv-1-very-low-calorie-diet-reduces-hepatic-steatosis-and-remodels-circulating.md)
- [Gut microbiota alterations in flatulence point to Faecalibacterium prausnitzii as a clinical target](https://medichelpline.com/clinical-feed/pubmed-42689867.md) (DOI: 10.1080/19490976.2026.2728332)
- [Cholesterol and p53 drive senescence and multiorgan fibrosis in MASH](https://medichelpline.com/clinical-feed/biorxiv-1-cholesterol-and-p53-promote-senescence-and-systemic-fibrosis-in-metabolic.md)
- [RAR-modified SOFA score predicts 28-day mortality in acute pancreatitis: MIMIC‑IV retrospective st](https://medichelpline.com/clinical-feed/plos-one-3-correlation-of-red-cell-distribution-width-to-albumin-ratio-combined-with-sofa.md)
- [Housing-Based SES (HOUSES) and Geospatial Targeting to Improve Colorectal Cancer Screening in Rura](https://medichelpline.com/clinical-feed/medrxiv-9-from-housing-to-hotspots-integrating-a-housing-based-measure-of-individual.md)

## Navigation
- [← Back to Gastroenterology Feed](https://medichelpline.com/clinical-feed/gastroenterology.md)
- [← All Clinical Specialties](https://medichelpline.com/clinical-feed.md)
## Medical & Regulatory Disclaimer

> [!CAUTION]
> MedicHelpline content is structured for research, educational, and professional discovery purposes. It does not constitute individual medical advice, clinical diagnosis, or treatment recommendations.
> Always verify dosing, contraindications, and regulatory alerts against official product labeling and primary regulatory sources before clinical decision-making.