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.
