Avatar

Manish Raj Moriche


Back to overview

MedFlow: A Privacy-Preserving AI Clinical Assistant

Follow the local AI care flow

MedFlow is a Semester 4 Software Engineering project developed at the University of Southern Denmark by a 6-student team. We created a local-first consultation support system for a potential local clinic in Sønderborg.

The primary implementation priorities were the local LLM integration and consultation transcription pipeline; UI/UX design was a lower-priority concern for this project.

To keep sensitive consultation data under local control, the system uses local AI models for audio transcription and clinical draft generation. It supports recording, doctor review and edits, PDF export, and patient follow-up communication while keeping a strict human-in-the-loop approval boundary. AI outputs are advisory and editable; final clinical content is only accepted after explicit doctor approval.

Tech Stack

Python JavaScript FastAPI MySQL MongoDB Docker Compose Faster-Whisper Ollama (Qwen3:8b) ReportLab SMTP / MailHog

Key Highlights

Main Workflow

MedFlow supports the consultation lifecycle from appointment context to patient communication:

Architecture Focus

The system uses component boundaries and replaceable adapters so major integrations can evolve independently. Core modules include authentication, appointments, consultations, transcription, LLM orchestration, suggestive review, PDF generation, email notifications, and auditability.

This design allows local AI services, storage adapters, and deployment integrations to be replaced without rewriting the full consultation pipeline.

MedFlow local runtime architecture

Local-first MedFlow runtime architecture

Local Model Selection

Qwen3:8b was selected for its reliable structured output and hallucination resistance within the local deployment hardware budget. Ollama keeps the model and consultation data inside the clinic environment.

MedFlow Ollama model comparison

Local model evaluation for the MedFlow pipeline

Validation and Outcomes

The project report documents a strong validation package with unit, integration, smoke, stress, and benchmark testing, plus manual UI checks. It also includes safeguards for LLM hallucination resistance and ASR robustness, with explicit limits and future-work directions for clinical-scale deployment.

MedFlow automated test distribution

Automated validation coverage across the project test suite

Project Report

For a detailed look at the problem analysis, design choices, and implementation details, please refer to the project report.

📄 Read the Full Report