Synthetic Medical Document Generation Pipeline for OCR: Development and Validation on Korean Clinical Documents (Preprint)
Abstract
BACKGROUND The development of structured optical character recognition (OCR) systems for Korean medical documents is hindered by strict privacy regulations that limit access to real clinical data. Existing synthetic document frameworks are primarily designed for generic layouts and Western languages, and fail to capture the complex formatting, bilingual terminology, and hierarchical field semantics required for clinical OCR and document-understanding tasks in hospital environments. OBJECTIVE To develop and validate a privacy-preserving, template-driven pipeline for generating realistic syn- thetic Korean medical documents with structured XML annotations, enabling OCR and document-understanding model training in settings where access to real clinical data is restricted. METHODS We designed a seven-stage synthetic document generation pipeline that reconstructs authentic medical document layouts from publicly available references, incorporates clinician-guided template selection, and employs a structured placeholder system encoding 17 medical datatypes. Human-curated templates were populated with exemplar content and tagged using a delimiter-based scheme, after which GPT-4o-mini generated diverse synthetic values for each field. The pipeline produced 1,000 fully synthetic DOCX documents with corresponding XML annotations encoding hierarchical structure, title–answer relationships, and datatype metadata. We evaluated text fidelity, lexical diversity (TTR, MTLD, n-grams, Pareto), and compared the system with existing synthetic document pipelines. A Qwen2.5-VL model was fine-tuned exclusively on the synthetic dataset and evaluated on 50 real-world Korean clinical documents to assess OCR accuracy, information extraction, and table reconstruction. RESULTS The pipeline achieved 100% placeholder coverage, 99.68% format correctness, and 91.56% semantic accuracy. Lexical diversity analysis demonstrated high variability in free-text fields (MTLD ≈ 456) and expected repetitiveness in structured datatypes. Compared with existing pipelines (SynthText, SynthTiger, DocSynth), the proposed system uniquely supports complex clinical forms, bilingual content, and structured XML annotations. When trained solely on the synthetic data, Qwen2.5-VL achieved the highest real-world performance, with a character accuracy of 86.01%, word accuracy of 78.25%, field accuracy of 67.18%, datatype accuracy of 64.14%, and table reconstruction TEDS score of 71.09%. Models without fine-tuning performed substantially worse. CONCLUSIONS We present the first synthetic data generation pipeline specifically tailored to Korean medical documents, enabling the creation of realistic, richly annotated datasets for structured OCR without exposing patient information. The synthetic data significantly improves OCR performance on real clinical documents, demonstrating the pipeline’s practical utility for hospital deployment and its potential extensibility to other languages and healthcare systems. CLINICALTRIAL -
Fields of Study & Subjects
Handwritten Text Recognition Techniques
Artificial Intelligence in Healthcare and Education
Electronic Health Records Systems
Publication details
- Publication date
- 28 January 2026
- Document type
- Preprint