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
Key Highlights
- Local AI pipeline for privacy-aware speech-to-text and draft generation.
- Doctor-first workflow with editable drafts, approval/rejection controls, and version history.
- Dual-database architecture: relational records in MySQL and flexible AI artifacts in MongoDB.
- End-to-end post-consultation flow: reviewed draft to downloadable PDF and email follow-up.
Main Workflow
MedFlow supports the consultation lifecycle from appointment context to patient communication:
- Appointment Context: schedule and consultation context are prepared for the doctor workflow.
- Recording & Transcription: consultation audio is captured and transcribed locally.
- AI Draft Generation: transcript and patient context are transformed into structured clinical draft material.
- Review & Approval: doctor edits, validates, approves, or rejects the draft.
- Export & Follow-up: approved reports are exported as PDF and can be sent via email.
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.
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.
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.
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.