Zing Forum

Reading

MedSynapse EHR: An Automated Summarization Platform for Electronic Health Records Based on Domain-Fine-Tuned Large Language Models

A fully functional Flask full-stack application that supports uploading electronic health records (EHRs), extracts content from PDFs or plain text, and generates structured clinical summaries with eight standard sections. The system includes role-separated end-user and admin consoles, optional support for Hugging Face Flan-T5 fine-tuning, and a heuristic fallback solution that runs without a GPU.

EHR电子健康记录医疗AI文本摘要Flan-T5Flask大语言模型领域微调临床决策支持
Published 2026-05-29 14:45Recent activity 2026-05-29 14:49Estimated read 5 min
MedSynapse EHR: An Automated Summarization Platform for Electronic Health Records Based on Domain-Fine-Tuned Large Language Models
1

Section 01

MedSynapse EHR: Open-Source EHR Auto-Summary Platform with Domain-Tuned LLM

MedSynapse EHR is an open-source Flask-based full-stack application for automated summarization of electronic health records (EHR). It supports PDF/text uploads, extracts content, and generates structured clinical summaries with 8 standard chapters. Key features include role-separated user/admin consoles, optional Hugging Face Flan-T5 domain fine-tuning, and a heuristic fallback for GPU-less environments. The project aims to help medical professionals quickly access critical patient info, improving diagnostic and treatment efficiency.

2

Section 02

Background & Problem It Solves

Medical documents often contain large amounts of unstructured text, requiring doctors to spend significant time reading and understanding. This project addresses this pain point by automating EHR summarization, converting complex docs into structured, easy-to-read formats to boost clinical workflow efficiency.

3

Section 03

Core Features Breakdown

End User Functions: Register accounts (with email uniqueness check and password hashing), manage patients (add/edit/delete), upload PDF/text EHRs (16MB limit, pypdf for PDF extraction), view extracted text and generate summaries.

Admin Functions: System metrics monitoring (user/patient/EHR counts), user management (create/edit/ban users), patient info oversight.

Structured Summary: Generates 8 chapters: Patient Info, Symptoms, Diagnosis, Drugs, Lab Reports, Treatment Plan, Doctor Notes, Follow-up Arrangements.

4

Section 04

Technical Architecture & Stack

Tech Stack: Backend (Flask/Python), Frontend (HTML/CSS), PDF processing (pypdf), ML (Hugging Face Transformers Flan-T5), Data Storage (SQLite for dev).

Project Structure: Clear layers (app/, static/, templates/, training/, config.py, run.py etc.).

Deployment: Supports local and cloud deployment; configurable via .env file (DB connection, model path, upload limits).

5

Section 05

Model Options & Adaptability

The platform offers two summary modes:

  1. ML Mode: Uses domain-fine-tuned Flan-T5 for high-quality summaries (requires GPU).
  2. Heuristic Mode: Rule-based, no GPU needed (for resource-limited environments).

The fine-tuning enhances accuracy and medical term understanding, while the fallback ensures usability across diverse setups.

6

Section 06

Compliance & Important Warnings

This project is a demo and should not be used for real patient care or PHI handling without proper legal review, security controls, and compliance (e.g., HIPAA). Production deployment requires: data encryption (transit/storage), access control & audit logs, patient privacy protection, regulatory compliance checks, and security vulnerability fixes.

7

Section 07

Summary & Value Proposition

MedSynapse EHR provides a complete, practical solution for EHR automation, covering from upload to structured output, user/admin roles, and adaptive model options. It's a valuable reference for developers/researchers exploring LLM applications in healthcare, showcasing how to integrate domain-tuned models with real-world workflows.