Digital Registrar: A Schema-First Framework for Multi-Cancer Privacy-Preserving Pathology Abstraction via Local LLMs
Background/Objectives: Free-text surgical pathology reports hinder automated cancer registry entry and secondary analytics. This study introduces a clinically governed schema layer for interoperability, testing whether a locally-deployable Large Language Model (LLM) pipeline can deliver robust registry-grade extraction across institutions. Methods: We developed a College of American Pathologists (CAP)-aligned clinical ontology encompassing 10 cancer types, 192 per-organ scalar fields, key biomarkers, and nested structures for lymph nodes and margins. Encoded via Declarative Self-improving Python (DSPy) signatures with grammar-constrained decoding using DSPy v3.2.1, this model-agnostic pipeline was benchmarked on 893 internal reports against a pathologist-adjudicated gold standard. External validation utilized 242 The Cancer Genome Atlas (TCGA) reports. Hardware feasibility was confirmed on a single 48-gigabyte (GB) Graphics Processing Unit (GPU), ensuring suitability for privacy-preserving on-premises deployment. Results: Using the gpt-oss-20b model, the framework achieved 92.0% macro-mean exact-match accuracy on internal data, demonstrating near-perfect run-to-run reliability. Critical prognostic indicators, including breast estrogen receptor/progesterone receptor (ER/PR) (98.7%) and margin positivity (>93%), maintained high fidelity. On the external TCGA cohort, accuracy was 77.5%, rising to 88.0% after excluding structurally silent fields absent in older narratives. Operationally, the model processed reports in 40–70 s, optimally balancing speed and accuracy. Conclusions: This schema-first abstraction layer successfully decouples clinical logic from specific Artificial Intelligence (AI) models. By reliably transforming narrative reports into machine-readable structures, it establishes a portable privacy-preserving foundation for automated cancer surveillance, institutional data reuse, and future multimodal clinical systems.
Authors
- Li-Ju Shiu
- Yen-Wei Chu (ORCID: https://orcid.org/0000-0002-5525-4011)
- Hung-Kai Chen (ORCID: https://orcid.org/0000-0002-2169-4924)
- Pau‐Choo Chung (ORCID: https://orcid.org/0000-0002-8660-570X)
- Ying-Lung Liu
- H-C Chang
- Kai-Po Chang (ORCID: https://orcid.org/0000-0003-1730-9728)
- Po‐Yen Tseng
- Nan-Haw Chow (ORCID: https://orcid.org/0000-0002-0277-1947)
- Chen-Yuan Lin
Institutions
- National Taiwan University of Science and Technology (TW)
- National Chung Hsing University (TW)
- China Medical University (TW)
- National Chi Nan University (TW)
- AUG Signals (Canada) (CA)
- China Medical University Hospital (TW)
- National Cheng Kung University (TW)
Publication Details
- Journal
- Diagnostics
- Published
- 2026-05-27
- DOI
- https://doi.org/10.3390/diagnostics16111644
- Primary Topic
- AI in cancer detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Science and Technology Council
- China Medical University Hospital