Automatic Generation Framework Research on Electronic Medical Records Based on Large Language Models and Doctor-patient Dialogues
(1.Information Center, Affiliated Hospital of North Sichuan Medical College, Nanchong 637000, China; 2.School of Management, North Sichuan Medical College, Nanchong 637000, China)
Abstract
In outpatient settings, Electronic Medical Records (EMRs) are still mainly documented manually, which is time-consuming and error-prone. This research proposes an automatic EMR generation framework based on Large Language Models and doctor-patient dialogues. Based on audio recordings of doctor-patient conversations, the Whisper model is employed for speech-to-text transcription followed by manual proofreading and the text content is structured and annotated based on fields such as chief complaint and current medical history. Subsequently, QLoRA is used to fine-tune Llama3-8B, generating structured electronic medical records via predefined templates. The fine-tuned medical-llama3-lora model achieves an accuracy of 0.498, precision of 0.719, recall of 0.498 and an F1-score of 0.472 for field extraction, outperforming the baseline Llama3 and other compared models. This research effectively enhances medical record writing efficiency and standardization while reducing the data entry burden on physicians, demonstrating promising practical applications in clinical settings.
Keywords
Large Language Model; electronic medical record; doctor-patient dialogue; Natural Language Processing
References
- [1] HEGSELMANN S,BUENDIA A,LANG H,et al. TabLLM: Few-shot Classification of Tabular data with Large Language Models [J/OL].arXiv:2210.10723 [cs.CL].(2022-10-19).https://arxiv.org/abs/2210.10723.
- [2] DA R F,DI G L,KEVIN R,et al. Supporting Fair and Efficient Emergency Medical Services in a Large Heterogeneous Region [J].Journal of Healthcare Informatics Research,2024,8(2):400-437.
- [3] Li Yang, Jin Changxiao, Xia Zhiwei, etc The role of electronic medical record disease template control in medical record quality management [J]. Chinese Hospital Management, 2012, 32 (3): 30-32
- [4] Yao Guolan Implementation and Improvement of Outpatient Electronic Medical Records [J]. Chinese Medical Records, 2023, 24 (12): 4-6
- [5] Che Yingxia, Yan Lixia, Qin Xihu, etc Research and Application of Smart Medical Record System under the Background of Smart Healthcare [J]. China Medical Equipment, 2022, 37 (12): 105-108
- [6] Yin Siyi, Pang Xiaoyan, Cai Xiujun, etc Research and Application of Intelligent Quality Control System for Medical Records Based on Natural Language Processing [J]. Chinese Journal of Medical Sciences, 2021, 11 (16): 1-4
- [7] Wang Weixiao, Fei Xiaolu, Lu Hairong, etc Research on high-precision extraction method of medical record information based on natural language processing and structured algorithms [J]. China Digital Medicine, 2024, 19 (5): 40-48
- [8] Sun Guoqiang, Zhao Congpu, Zhu Wen, etc Exploration and Practice of Intelligent Speech Recognition Technology in Hospital Applications [J]. China Digital Medicine, 2016, 11 (9): 35-37
- [9] Yang Jinfeng, Yu Qiubin, Guan Yi, etc A review of research on named entity recognition and entity relationship extraction in electronic medical records [J]. Journal of Automation, 2014, 40 (8): 1537-1562
- [10] Wang Pengcheng, Yang Ye, Zhang Yingfan The application of voice electronic medical records in dental hospitals [J]. Medical Information, 2020, 33 (19): 19-20
- [11] Jiang Huizhen, Hu Haiyang, Ma Lian, etc Research on automatic generation technology of medical records based on doctor-patient dialogue [J]. China Digital Medicine, 2021, 16 (10): 36-40
- [12] Bai Peifa, Huang Zonghao, Wang Yi A review of the application research of large models in smart hospitals [J]. Computer Applications and Software, 2024, 41 (7): 1-5, 19
- [13] HUI Y O Y E,SAMAAN J S,NG W H,et al. Assessing the Performance of ChatGPT in Answering Questions Regarding Cirrhosis and Hepatocellular Carcinoma [J].Clinical and Molecular Hepatology,2023,29(3):721-732.
- [14] Liu Shaokun, He Zhonglian, Li Bin, etc Design and Application Exploration of Electronic Medical Record Automatic Generation System Based on Large Model [J]. China Digital Medicine, 2024, 19 (8): 8-13
- [15] PANAGOULIAS D P,VIRVOU M,TSIHRINTZIS G A. Evaluating LLM——Generated Multimodal Diagnosis from Medical Images and Symptom Analysis [J/OL].arXiv:2402.01730 [cs.CL].(2024-01-28).https://arxiv.org/abs/2402.01730.
- [16] CHUNG P,FONG C T,WALTERS A M,et al. Large Language Model Capabilities in Perioperative Risk Prediction and Prognostication [J].JAMA Surgery,2024,159(8):928-937.
- [17] RADFORD A,KIM J W,XU T,et al. Robust Speech Recognition via Large-scale Weak Supervision [C]//40th International Conference on Machine Learning.Honolulu:PMLR,2023:28492-28518.
- [18] Zheng Qiaoyue, Duan Youxiang, Sun Qifeng Hierarchical Interactive Answer Selection Model Based on Transformer and Dual Attention Fusion [J]. Computer Application Research, 2022, 39 (11): 3320-3326
- [19] Liu Yinpeng, Lu Wei, Shi Xiang, etc Large Model Driven Academic Text Mining: Research on Efficient Parameter Fine tuning Strategies for Optimization [J]. Journal of Intelligence, 2025, 44 (9): 1159-1172
Funding
Sichuan Provincial Natural Science Foundation Project (2023NSFSC1015)
About the authors
Wang Xueyan (May 1995-), female, Han ethnicity, from Huainan, Anhui Province, assistant engineer, master's student, research direction: medical information construction, intelligent medicine; Corresponding author: Luo Lanjun (January 1996-), male, Han ethnicity, from Nanchong, Sichuan, associate professor, doctoral student, research direction: explainable machine learning driven risk analysis.