๐Ÿฅ 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

System Design Diagram

๐Ÿง  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.
  • 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.

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

Share this project:

Updates