From Free Text to Research-Ready Data: A Reproducible, Reverse-Audited Pipeline for Structuring Breast Mammography Reports.
Authors
Affiliations (6)
Affiliations (6)
- Department of Ultrasound, Hangzhou Xixi Hospital, No. 2 Hengbu Street, Xihu District, Hangzhou, Zhejiang, 310023, P. R. China.
- Department of Radiology, Hangzhou Xixi Hospital, No. 2 Hengbu Street, Xihu District, Hangzhou, Zhejiang, 310023, P. R. China.
- Department of Interventional Medicine, Zhejiang Provincial People's Hospital, Hangzhou, Zhejiang, P. R. China.
- Department of Radiology, Taihe County People's Hospital Affiliated to Wannan Medical University, No. 21 Jiankang Road, Taihe County, Fuyang City, Anhui Province, 236600, China. [email protected].
- Department of Hepatology, Hangzhou Xixi Hospital, Affiliated to Zhejiang Chinese Medical University (Hangzhou Sixth People's Hospital), Hangzhou, Zhejiang, 310023, China. [email protected].
- Department of Radiology, Hangzhou Red Cross Hospital, 208 Huan Cheng Dong Road, Gongshu District, Hangzhou, Zhejiang, 310003, China. [email protected].
Abstract
Exported PDF mammography and pathology reports contain rich phenotypic and molecular information, yet they remain underused for research because converting them into research-ready variables is labor-intensive and error-prone. We developed a rule-based pipeline (PyMuPDF text extraction with section-aware regular expressions) that structured 615 source PDF reports into a verified 299 patient cohort (mean age 52.4 years; 290 female, sex not recorded in 9) with molecular subtype available for 286. An independent, deterministic reverse audit re-extracted every field from the source PDFs and compared it with the structured table across four validation layers, observing no discrepancies and confirming internal reproducibility rather than absolute accuracy. As a secondary, hypothesis-generating analysis, we used LASSO logistic regression under nested cross-validation (preprocessing and regularization tuned within training folds) to test whether report-level descriptors predict tumor biology. Predictive performance was weak throughout: HER2-positive versus HER2-negative attained the highest out-of-fold AUC 0.614 (95% CI 0.526-0.710), the only endpoint whose interval excluded chance, whereas triple-negative (0.511), four-class subtype (macro-AUC 0.519), and axillary node metastasis (0.455) were at or below chance. Incremental value benchmarks showed no gain over age or BI-RADS alone, and calibration and decision curve analysis indicated no clinically meaningful net benefit. These exploratory findings are consistent with evidence that pixel-level radiomics is more informative than report text; finer-grained NLP- or LLM-derived features remain unexplored. Under compatible report templates, the pipeline yields a reproducible, auditable structured breast cohort from text-exportable PDFs, motivating image-based radiomics as a reusable asset for multicenter research.