๐ฅ MediCompareAI
AI-Powered Healthcare Cost Transparency Platform
๐ฅ Demo Video: Watch on YouTube
๐ Technical Design Document: View Design Doc
๐ก Inspiration
Healthcare costs in the U.S. are complex, opaque, and difficult for patients to interpret.
We wanted to empower patients to make better financial decisions about their care by building an AI-powered platform that explains medical costs in plain language.
๐ฌ โCompare knee replacement costs in Bostonโ
With MediCompareAI, users can ask natural questions like this and receive:
- Hospital cost comparisons
- AI-generated insights
- Transparent, data-driven explanations โ all powered by official Medicare data.
Design

๐ง What It Does
MediCompareAI transforms public CMS healthcare datasets into clear, patient-friendly insights.
Core Features
- Natural Language Understanding: Ask cost-related questions using everyday language.
- Hospital Comparison: Explore hospital prices, quality ratings, and cost variations.
- AI-Powered Explanations: Understand why costs differ across providers.
- Trusted Data:* Built on verified Medicare CMS inpatient datasets.
โ๏ธ How We Built It
Data Layer
- Created a custom Fivetran connector (Python) to fetch data from CMS APIs.
- Ingested and stored the data in Google BigQuery, defining schemas for:
cms_healthcare_data(DRG-level inpatient cost data)hospital_data(hospital ratings and attributes).
FiveTran custom connector code Link https://github.com/Darshpreet2000/healthcostcompare-connector
Backend (AI Engine)
- Built with FastAPI for handling API requests.
- Integrated Google Gemini AI Studio to:
- Parse natural language queries.
- Map user intent to DRG codes.
- Generate human-friendly insights explaining cost trends.
- Parse natural language queries.
- Queried BigQuery to retrieve procedure cost data and hospital-level statistics.
Backend API code link: https://github.com/Darshpreet2000/healthcostcompare-backend
Frontend (Web Interface)
- Developed with Next.js + TypeScript and styled using TailwindCSS.
- Includes:
- Hero search page with natural language input.
- AI insights and hospital comparison cards.
- Responsive and accessible design optimized for all devices.
- Hero search page with natural language input.
Frontend UI code link: https://github.com/Darshpreet2000/healthcostcompare-webapp
๐ง Challenges We Overcame
- Finding reliable datasets for specific medical procedures โ sourcing, understanding, and cleaning Medicare CMS data required extensive research and validation.
- Mapping natural language queries to standardized DRG codes for accurate matching.
- Handling incomplete and inconsistent dataset fields across hospitals.
- Ensuring AI-generated insights reflected accurate and verifiable data.
- Designing a patient-friendly UI for a traditionally data-heavy problem space.
๐ Accomplishments Weโre Proud Of
- Built a complete end-to-end AI solution โ from data ingestion to intelligent visualization.
- Implemented a Fivetran custom connector for CMS data synchronization.
- Successfully ingested and queried large-scale healthcare datasets in BigQuery.
- Integrated Gemini AI for contextual natural language understanding.
- Delivered a modern, intuitive frontend that simplifies healthcare decision-making.
๐ What We Learned
- Designing and maintaining a Fivetran connector with real-time API ingestion.
- Implementing BigQuery schema optimization for healthcare datasets.
- Leveraging Gemini AI Studio for structured query understanding and text generation.
- Creating transparent AI systems that prioritize data clarity and user trust.
๐ Whatโs Next for MediCompareAI
- ๐ Geolocation Awareness: Display hospitals nearest to the user.
- ๐งฌ Personalized Insights: Tailored recommendations based on patient profiles.
- ๐ Data Visualization Dashboards: Interactive graphs showing cost distributions and trends.
- ๐ฅ Expanded Data Sources: Add outpatient and specialty procedure datasets.
๐งฎ Judging Criteria Alignment
๐งฐ Technological Implementation
MediCompareAI demonstrates robust integration of Google Cloud and partner services:
- Fivetran SDK for custom CMS data ingestion.
- Google BigQuery for scalable, high-performance analytics.
- Gemini AI Studio for natural language understanding and insight generation.
- FastAPI + Next.js for an efficient, full-stack pipeline from backend to UI.
๐จ Design
- Intuitive, clean, and accessible Next.js frontend with TailwindCSS.
- Glassmorphic hero section for query input and dynamic comparison cards for results.
- Framer Motion animations to enhance usability without distraction.
- Responsive design ensures seamless use across devices.
๐ Potential Impact
MediCompareAI has the power to redefine price transparency in U.S. healthcare.
By translating complex datasets into understandable, personalized insights, it:
- Empowers patients to make data-informed healthcare choices.
- Encourages competition and accountability among hospitals.
- Promotes a more equitable and transparent healthcare system.
๐ก Quality of the Idea
MediCompareAI unites AI, data engineering, and UX design to address a real and urgent problem โ healthcare cost opacity.
It transforms open government data into a smart, accessible, and empathetic solution for patients, aligning innovation with social good.
โจ MediCompareAI โ Making healthcare costs transparent, understandable, and fair through AI.
Built With
- fastapi
- nextjs
- python
Log in or sign up for Devpost to join the conversation.