# Accurate Clinical Entity Recognition and Code Mapping of Anatomopathological Reports Using BioClinicalBERT Enhanced by Retrieval-Augmented Generation: A Hybrid Deep Learning Approach

**Authors:** Hamida Abdaoui, Chamseddine Barki, Ismail Dergaa, Karima Tlili, Halil İbrahim Ceylan, Nicola Luigi Bragazzi, Andrea de Giorgio, Ridha Ben Salah, Hanene Boussi Rahmouni

PMC · DOI: 10.3390/bioengineering13010030 · Bioengineering · 2025-12-27

## TL;DR

This paper presents a hybrid AI system that accurately extracts and codes clinical information from unstructured anatomopathological reports using advanced language models and retrieval techniques.

## Contribution

A novel hybrid deep learning approach combining BioClinicalBERT with retrieval-augmented generation for clinical entity recognition and multi-ontology mapping.

## Key findings

- BioBERT achieved high extraction performance with F1-scores of 0.97, 0.98, and 0.93 for sample type, test performed, and finding, respectively.
- The combination of BioClinicalBERT and dense retrieval outperformed standalone and BM25-based approaches in terminology mapping.
- Cohen’s Kappa scores ranged from 0.7829 to 0.9773, indicating substantial to near-perfect agreement in entity mapping.

## Abstract

Background: Anatomopathological reports are largely unstructured, which limits automated data extraction, interoperability, and large-scale research. Manual extraction and standardization are costly and difficult to scale. Objective: We developed and evaluated an automated pipeline for entity extraction and multi-ontology normalization of anatomopathological reports. Methods: A corpus of 560 reports from the Military Hospital of Tunis, Tunisia, was manually annotated for three entity types: sample type, test performed, and finding. The entity extraction utilized BioBERT v1.1, while the normalization combined BioClinicalBERT multi-label classification with retrieval-augmented generation, incorporating both dense and BM25 sparse retrieval over SNOMED CT, LOINC, and ICD-11. The performance was measured using precision, recall, F1-score, and statistical tests. Results: BioBERT achieved high extraction performance (F1: 0.97 for the sample type, 0.98 for the test performed, and 0.93 for the finding; overall 0.963, 95% CI: 0.933–0.982), with low absolute errors. For terminology mapping, the combination of BioClinicalBERT and dense retrieval outperformed the standalone and BM25-based approaches (macro-F1: 0.6159 for SNOMED CT, 0.9294 for LOINC, and 0.7201 for ICD-11). Cohen’s Kappa ranged from 0.7829 to 0.9773, indicating substantial to near-perfect agreement. Conclusions: The pipeline provides robust automated extraction and multi-ontology coding of anatomopathological entities, supporting transformer-based named entity recognition with retrieval-augmented generation. However, given the limitations of this study, multi-institutional validation is needed before clinical deployment.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12838374/full.md

## Figures

1 figure with captions in the complete paper: https://tomesphere.com/paper/PMC12838374/full.md

## References

60 references — full list in the complete paper: https://tomesphere.com/paper/PMC12838374/full.md

---
Source: https://tomesphere.com/paper/PMC12838374