Abstract
Discharge summaries are critical for patient care continuity, clinical decision-making, and legal documentation, yet their creation is labor-intensive. This study introduces a novel framework to automate discharge summary generation using advanced natural language processing (NLP) techniques. We combine the Decomposed Low-Rank Adaptation (DoRA) fine-tuning method with a novel self-evaluation mechanism to enhance large language models (LLMs) for medical text generation. DoRA efficiently adapts pre-trained LLMs to the specialized medical domain, while the self-evaluation mechanism iteratively re-feeds generated summaries together with segmented clinical data into the model to detect and correct omissions. Extensive experiments show that self-evaluation improves BERTScore by 6.9% and increases ROUGE-L by 69.6% relative to few-shot baselines. Our results demonstrate substantial enhancements in the quality and consistency of generated discharge summaries while reducing the time required for their creation.
Introduction
Discharge summaries serve as the primary communication tool between hospital clinicians and outpatient providers, ensuring continuity of care. However, the manual synthesis of fragmented data—ranging from lab results and pathology reports to physician progress notes—is a time-consuming and error-prone process. Under the pressure of high patient volumes, these summaries are often delayed or incomplete.
While Large Language Models (LLMs) offer potential for automation, they frequently struggle with specialized medical terminology and are prone to "hallucinations" or omissions when processing complex clinical records. This research addresses these challenges by making LLMs more domain-aware through specialized fine-tuning and more rigorous through an iterative self-evaluation process.
Methodology
The proposed framework enhances LLM performance through a dual approach: fine-tuning for domain expertise and a "System 2" reasoning loop for accuracy.
Decomposed Low-Rank Adaptation (DoRA)
To adapt general-purpose LLMs (such as Qwen2-7B, Mistral-7B, and Llama3-8B) to the medical domain, the researchers employed Decomposed Low-Rank Adaptation (DoRA). Unlike standard LoRA, DoRA decomposes weight matrices into magnitude and direction components. This approach more closely approximates full-parameter fine-tuning, allowing the model to better capture the nuances of Chinese medical jargon and structured clinical reporting.
Self-Evaluation Mechanism
Inspired by the "System 1 vs. System 2" cognitive model, the framework implements an iterative refinement loop. Standard LLM generation is often "System 1"—fast and intuitive but prone to oversight. The "System 2" loop forces the model to be its own critic:
- Generation: The model produces an initial summary.
- Segmentation: The original input data is decomposed into distinct clinical entities and events.
- Verification: The model iteratively checks the summary against each data segment. If a detail is missing or incorrect, the summary is updated.
- Final Evaluation: A final pass ensures the refined summary comprehensively represents the input.
Data and Preprocessing
The study utilized a retrospective dataset of 6,214 patient records from the Thyroid Surgery Department of a major tertiary hospital, spanning five years (2018–2022). The source data was entirely unstructured, pulled from various Hospital Information System (HIS) tables.
To prepare this data, the team developed a robust preprocessing pipeline. This included using the MinHash algorithm for deduplication across fragmented records and regular expression matching for privacy filtering to remove Personally Identifiable Information (PII).
Results and Discussion
The framework was evaluated using both automated NLP metrics and qualitative assessments by clinical experts.
Quantitative Performance
The combination of DoRA fine-tuning and self-evaluation yielded significant improvements. The self-evaluation method improved BERTScore by 6.9% and ROUGE-L by 69.6% compared to few-shot prompting baselines. Among the models tested, Qwen2-7B demonstrated the strongest performance, likely due to its extensive pre-training on Chinese medical corpora.
Clinical Utility and Efficiency
The practical impact on clinician workload is substantial. The AI-driven system generated complete summaries in approximately 83 seconds, whereas manual preparation by senior clinicians typically requires 30–50 minutes. In a blind review, human experts rated 94% of the AI-generated summaries as clinically acceptable, requiring only minor verification before inclusion in electronic health records.
Conclusion
This research demonstrates that combining specialized fine-tuning with iterative self-evaluation can bridge the gap between general AI capabilities and the high-stakes requirements of clinical documentation. While the current study focused on thyroid and breast surgery, the "System 2" approach provides a scalable blueprint for other medical specialties. Future work will explore the integration of multimodal data, such as medical imaging, to further enhance the comprehensiveness of automated discharge summaries.
Summary updated