Developing and Validating an Automatic Support System for Tumor Coding in Pathology Reports in Spanish - Fabián Villena; Pablo Báez; Sergio Peñafiel; Matías Rojas; Inti Paredes; Jocelyn Dunstan (American Society of Clinical Oncology (ASCO), 2025)
Purpose Pathology reports provide valuable information for cancer registries to understand, plan, and implement strategies to mitigate the impact of cancer. However, coding essential information from unstructured reports is performed by experts in a time-consuming manual process. We developed and validated a novel two-step automatic coding system that first recognizes tumor morphology and topography mentions from free text and then suggests codes from the International Classification of Diseases for Oncology (ICD-O) in Spanish. Materials and Methods We created an annotated corpus of tumor morphology and topography mentions consisting of 1,101 documents. We combined it with the CANTEMIST corpus (Cancer Text Mining Shared Task). Specifically, we implemented a named entity recognition (NER) model using the bidirectional long short-term memory network-conditional random field architecture enhanced with a stacked embedding layer. We applied transfer learning from state-of-the-art pretrained language models to obtain high-quality contextual representations, thus improving the detection of entities. The mentions found using this model were subsequently oded using a search engine tailored to the ICD-O codes. Results Our NER models achieved an F1 score of 0.86 and 0.90 for tumor morphology and topography, respectively. The overall performance of our automatic coding system achieved an accuracy at five suggestions of 0.72 and 0.65 for tumor morphology and topography, respectively. Conclusion These results demonstrate the feasibility of implementing natural language processing tools in the routine of a cancer center to extract and code valuable information from pathology reports. Our recommender system allows reliable and transparent coding at the moment of consultation. This publication shares the annotated corpus in Spanish, annotation guidelines, and source code to reproduce our experiments.
Keywords: algorithms; clinical coding; data mining; electronic health records; humans; international classification of diseases; natural language processing; neoplasms; spain; article; automation; cancer morphology; cancer registry; coding; data accuracy; human; international classification of diseases for oncology; language model; long short term memory network; search engine; transfer of learning; tumor classification; validation study; algorithm; coding; data mining; diagnosis; electronic health record; international classification of diseases; natural language processing; neoplasm; pathology; procedures; spain