Efficient ICD-O Coding for Cancer Registries with Small, Locally Deployable LLMs
Abstract
Capturing and structuring cancer-related data from free-text clinical reports is essential to support cancer research, facilitate new treatments, and inform the public about the disease burden. This demonstration paper presents an LLM pipeline to perform cancer coding on topography and morphology in ICD-Oncology, two central elements in cancer reporting, using small-scale local models as the backbone. The system extracts key phrases from the pathology reports using codebook expressions, retrieves top ICD-O candidates with knowledge enhancement, reranks the candidate codes listwise in two settings, and recodes the site-morphology pair to resolve conflicts and to conform to registry coding rules. Our results show that this pipeline substantially outperforms prompting LLMs alone, either directly or with a codebook. Furthermore, the improvements cost only two additional LLM calls, and the LLMs used are compact enough to be deployed on consumer-level devices. Finally, compared to the rule-based, expert-curated system currently deployed in the cancer registry, the LLM-based pipeline produces better results with statistical significance across all metrics for the two challenging code fields, with lower variation across reports sourced from different laboratories.