Inspiration

The seed of Prognosis was planted not in a classroom, but in a moment of quiet desperation. Growing up in Kolkata, I've seen firsthand the immense pressure on medical students – the relentless hours, the mountain of knowledge, and the sheer terror of making a mistake. I vividly remember my cousin, a brilliant aspiring doctor, crumbling under the weight of it all. He'd spend sleepless nights poring over textbooks, but the real-world application, the art of diagnosis, remained elusive. His anxiety wasn't about knowing facts, but about the terrifying responsibility of a human life. He once told me, with tears in his eyes, "I know the symptoms, but when a patient looks at me, my mind just goes blank. What if I miss something?" That raw vulnerability, the fear of failing a patient, resonated deeply. I wanted to build something that could offer a safe space to practice, to fail without consequence, and to build confidence before facing real lives. Prognosis isn't just an app; it's an answer to that whispered fear, a virtual mentor for those who carry the heaviest of responsibilities.

What it does

Prognosis is an AI-powered medical simulation platform designed to bridge the gap between theoretical knowledge and practical diagnostic skills. It presents aspiring medical professionals with realistic patient cases, each featuring a unique chief complaint, vital signs, and medical history. Users can interact with an AI patient, asking questions, gathering more information, and formulating a diagnosis and treatment plan. The AI responds dynamically, guided by a detailed system instruction that dictates the patient's persona, emotional state, and the specific medical condition they represent. It's a risk-free environment where students can refine their clinical reasoning, test hypotheses, and learn from their mistakes. Beyond the interactive chat, the platform also incorporates visual diagnostic aids like X-rays to mimic real-world clinical data, and a leaderboard to foster healthy competition and track skill progression. It's a digital clinic where confidence is built, one successful diagnosis at a time.

How I built it

Building Prognosis was an act of passion, driven by the desire to create real impact. I started with a robust Next.js frontend for a dynamic and responsive user interface, providing a smooth experience for medical students. For the backend, I chose Express.js, building a powerful and flexible API to handle case data, AI interactions, and user management. The heart of the simulation lies in the integration with Google's Gemini Flash 2.5 API, a marvel of AI engineering. This is where the magic happens – taking my system_instruction and crafting realistic, empathetic patient responses.

For data persistence, I utilized Firebase Firestore, a NoSQL database that offers real-time synchronization and effortless scalability, perfect for storing my rich patient case data and user profiles. To ensure seamless deployment and efficient operation, I opted for Vercel for both my frontend and backend (deployed as separate projects), leveraging its serverless capabilities and global CDN for speed. User authentication was handled securely through Firebase Authentication, supporting email/password as well as convenient social logins via Google and GitHub. The entire process was meticulously managed using Git for version control, hosted on GitHub for collaborative development.

Challenges I ran into

The journey was fraught with challenges, each one a test of my resolve. The most significant hurdle was undoubtedly CORS (Cross-Origin Resource Sharing). For days, my frontend and backend, though deployed, refused to speak to each other, throwing cryptic browser errors. It was a maddening puzzle of preflight requests and blocked origins, nearly derailing my progress. I spent countless hours debugging, configuring Express.js middleware, and learning the intricate dance of cross-domain communication.

Another major challenge was managing API rate limits for the Gemini Flash 2.5 model, especially during development. Frequent testing would often hit limits, forcing me to optimize my prompts and responses to be more efficient. Integrating Firebase Authentication's social logins also presented its own set of unique puzzles, from configuring callback URLs to ensuring secure token exchange. Finally, integrating a truly dynamic and believable AI that could realistically role-play diverse patient personas while maintaining medical accuracy was an ongoing iterative process of prompt engineering and fine-tuning.

Accomplishments that I'm proud of

Despite the hurdles, I emerged with accomplishments that fill me with immense pride. I successfully built a fully functional, AI-powered medical simulator from the ground up, a testament to my perseverance. I'm particularly proud of the dynamic patient interaction – the AI's ability to convincingly role-play various medical conditions and emotional states, making the learning experience truly immersive. The seamless integration of Firebase Authentication with social logins provides a smooth and modern user experience. I also successfully implemented a leaderboard system to foster healthy competition, and a robust feedback mechanism to guide students to better diagnoses. Overcoming the persistent CORS issues was a monumental victory, validating my understanding of web security and networking.

What I learned

This project was a crucible of learning. I gained invaluable, hands-on experience with full-stack development, mastering the synergy between Next.js and Express.js. I delved deep into API design and integration, particularly with advanced AI models like Gemini. The CORS debacle, while frustrating, transformed into a profound lesson in web security and network protocols. I honed my skills in database management with Firestore, learning about data structuring and real-time updates. Perhaps most importantly, I learned the art of problem-solving under pressure, how to break down complex issues, and the sheer power of persistence in the face of daunting technical challenges. It solidified my belief that every bug is an opportunity to learn something new.

What's next for Prognosis

The journey for Prognosis is just beginning. My immediate plans include:

Advanced Simulations: Implementing more advanced simulations using Three.js and GSAP to provide a real feel for virtual environments. I will also explore the possibility of integrating AR/VR to offer an even more immersive and lifelike clinical experience.

Expanded Case Library: Developing a much larger and more diverse set of patient cases, covering a wider range of medical specialties and complexities.

Voice Interaction: Investigating Text-to-Speech (TTS) for the AI patient, and Speech-to-Text (STT) for user input, to create a more natural conversational experience.

Prognosis aims to become an indispensable tool for medical education, empowering the next generation of doctors with the confidence and skills to save lives.

Built With

Share this project:

Updates

posted an update

Note on Medical Data & Login/Signup

  • Some queries came in about medical data not being shown.

    • Not all tests require medical images.
    • Also, I couldn’t push everything to GitHub earlier due to time constraints, but no worries — I’ve now pushed it in a new branch.
  • For a smoother experience, please use Gmail or GitHub for login/signup.

    • The email-based setup isn’t fully complete yet — you can log in, but the profile section won’t fetch properly.

Log in or sign up for Devpost to join the conversation.