Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Wednesday, July 01, 2020 at 8:00 PM to 10:00 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Accepted for/Published in: JMIR Formative Research

Date Submitted: Jan 21, 2025
Date Accepted: Dec 11, 2025

The final, peer-reviewed published version of this preprint can be found here:

Personalized Diabetes Treatment Support Using Large Language Models Fine-Tuned on Electronic Health Records: Development and Evaluation Study

Li J, he s, liu j

Personalized Diabetes Treatment Support Using Large Language Models Fine-Tuned on Electronic Health Records: Development and Evaluation Study

JMIR Form Res 2026;10:e71541

DOI: 10.2196/71541

PMID: 41662664

PMCID: 12885450

Personalized Diabetes Treatment Support Using Fine-Tuned Large Language Models: Evaluation Study of Electronic Health Records

  • Jiaxi Li; 
  • shenyang he; 
  • jialin liu

ABSTRACT

Background:

Diabetes management requires personalized treatment strategies that integrate complex patient data, including medical history, lifestyle, and diagnostic results. The use of large language models (LLMs) in healthcare offers a novel approach to augmenting decision-making by providing data-driven insights

Objective:

This study aims to explore the application of a fine-tuned model-based outpatient treatment support system for the treatment of patients with diabetes and evaluate its effectiveness and potential value

Methods:

The ChatGLM model was selected as the subject of investigation and trained using the P-tuning and LoRA fine-tuning methods. Subsequently, the fine-tuned model was successfully integrated into the Hospital Information System (HIS). The system generates personalized treatment recommendations, laboratory test suggestions, and medication prompts based on patients' basic information, chief complaints, medical history, and diagnosis data.

Results:

Experimental testing revealed that the fine-tuned ChatGLM model is capable of generating accurate treatment recommendations based on patient information, while providing appropriate laboratory test suggestions and medication prompts. However, for patients with complex medical records, the model's outputs may carry certain risks and cannot fully substitute outpatient physicians' clinical judgment and decision-making abilities. The model's input data is confined to electronic health record (EHR), limiting the ability to comprehensively reconstruct the patient's treatment process and occasionally leading to misjudgments of the patient's treatment goals.

Conclusions:

This study demonstrates the potential of the fine-tuned ChatGLM model in assisting the treatment of patients with diabetes, providing reference recommendations to healthcare professionals to enhance work efficiency and quality. However, further improvements and optimizations are still required, particularly regarding medication therapy and the model's adaptability.


 Citation

Please cite as:

Li J, he s, liu j

Personalized Diabetes Treatment Support Using Large Language Models Fine-Tuned on Electronic Health Records: Development and Evaluation Study

JMIR Form Res 2026;10:e71541

DOI: 10.2196/71541

PMID: 41662664

PMCID: 12885450

Download PDF


Request queued. Please wait while the file is being generated. It may take some time.

© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.