home / 02 — projects / medcase
MedCase
AI patients that let med students practise diagnosis out loud.
- status
- archived
- when
- 2025
- took
- 24 hours (hackathon)
- team
- team project

about
MedCase is a medical training platform designed to bridge the gap between textbook knowledge and real-world clinical decision-making. The system simulates patient diagnosis scenarios through AI-powered clinical interviews, enabling medical students to practice diagnostic workflows in a low-stakes, interactive environment.
The platform integrates OpenAI's LLM to generate realistic patient responses and Deepgram's text-to-speech API via a FastAPI microservice to provide voice output, creating an immersive clinical training experience. The system features two distinct modes: learning mode, which allows retry attempts with feedback, and testing mode, which enforces single-attempt diagnosis. Both modes implement adaptive difficulty levels (easy, medium, hard) with corresponding time limits (5, 7, and 10 minutes respectively), determined by the average number of follow-up questions required for correct diagnosis.
The architecture includes an in-memory session management system to handle concurrent user simulations, tracking conversation history, diagnostic attempts, and scenario progression state. Users can toggle between listening and reading comprehension modes, with the system providing real-time feedback on question efficiency and diagnostic accuracy.
stack
react · typescript · node.js · express · fastapi · openai api · deepgram api · html · css · javascript
what I learned
- Architected a full-stack application with React frontend, Express.js backend, and FastAPI microservice for AI integration
- Integrated OpenAI's LLM and Deepgram text-to-speech API to create realistic patient simulation with voice output
- Engineered in-memory session management system to handle concurrent user simulations and track conversation state
- Implemented adaptive difficulty system with time-based constraints and feedback mechanisms for learning optimization
- Gained experience with rapid prototyping, API integration, and full-stack development under time constraints
what was hard
- Integrating Deepgram's text-to-speech API with proper error handling and managing voice synthesis latency issues
- Designing an in-memory session management system that efficiently tracks conversation history and diagnostic state
- Balancing feature scope with time constraints during a 24-hour hackathon while maintaining code quality
- Coordinating frontend-backend communication for real-time voice interactions and state synchronization
- Implementing adaptive difficulty algorithms that accurately reflect question complexity based on diagnostic efficiency