The Problem

Walk into any healthcare organization, and you'll see the same chaos. Clinicians spend two hours on paperwork for every one hour with patients. Risk adjustment errors quietly drain half a billion dollars a year from the system. Care coordinators juggle spreadsheets, sticky notes, and a maze of logins just to figure out who actually needs help.

I built Ketu Health to change that. One clear window into operations. Six AI assistants. All working from the same data. All speaking the same language. No digging through charts.


What It Does

Ketu Health is an AI-powered orchestration layer for healthcare operations. Six specialized copilots handle different pieces of the puzzle.

Risk Adjustment Copilot Reads clinical notes through GPT-4o. Spots undocumented diagnosis codes that affect reimbursement. Calculates financial impact using CMS-HCC weights. Shows the exact sentence where it found each gap.

Quality & Stars Copilot Tracks HEDIS and STARS quality measures. Flags patients falling through the cracks. Projects Star ratings a full year ahead.

Pharmacy Adherence Copilot Measures medication adherence (PDC scores). Pinpoints patients who have stopped taking critical meds. Spots gaps in therapy timelines. Generates outreach call lists.

Provider Network Copilot Scores providers on gap closure and risk capture rates. Identifies costly out-of-network leakage. Auto-generates practice meeting agendas.

Care Management Copilot Ingests real-time admission, discharge, and transfer data. Provides a drag-and-drop Kanban board that remembers your workflow. Supports team notes. Prevents duplicate work with ownership locking.

AI Analyst Copilot Your data person on demand. Ask questions in plain English. Search patients semantically. Translates questions into SQL and runs them live against your database.

Every copilot queries the same Aurora PostgreSQL database. No mocked data. No stale caches. No contradictions.


How We Built It

Frontend Next.js 16 with React Server Components. Tailwind CSS. shadcn/ui for clean components. Each copilot page streams data independently. No waiting for one big spinner.

Backend Amazon Aurora PostgreSQL as our source of truth. 15 custom tables covering patients, providers, claims, medication fills, care notes, risk gaps, and audit logs. Raw SQL via pg pool. Drizzle ORM plus Better Auth for authentication.

AI Vercel AI SDK with GPT-4o. Five core functions handle KPI analysis, health gap detection, risk prediction, natural language to SQL, and structured analysis. Each pulls real database context. Each streams back actionable insights.

Deployment Hosted on Vercel. Aurora connected through Vercel Marketplace integration. 33 server actions using 'use server'. All execute parameterized queries directly against the database.

The Flow Browser to Vercel (Next.js SSG/SSR). Server Actions to pg Pool. pg Pool to Aurora PostgreSQL. AI layer sits alongside for intelligent processing.


Challenges We Faced

Healthcare data modeling was painful. Health data doesn't fit neatly into a handful of tables. We needed patients, providers, claims, care gaps, risk adjustments, medication adherence, ADT events, audit logs, and care notes. All interconnected. Getting the schema right took many iterations. Queries had to stay fast without over-normalizing.

AI plus databases is tricky territory. Text-to-SQL pushed us hardest. We had to feed GPT-4o the full schema. Parse its generated SQL safely. Execute against production data. Format the results. Handle malformed queries and permissions. The textToSQL() function now includes schema injection, SQL sanitization, and error recovery.


What We Learned

Healthcare is a data integration problem first. AI problem second.

The most valuable thing we built wasn't the chat interface. It was the unified schema. Every copilot references the same patients, providers, and gaps. Once you nail the data layer, AI insights almost write themselves.

Server actions plus Suspense boundaries are powerful for data-heavy dashboards. Each section stands alone. Failed queries don't bring down the page. Users see content as soon as it arrives.


What's Next (After the Hackathon)

  1. Connect live EHR data via FHIR API
  2. Deploy scheduled ETL pipelines for continuous ingestion
  3. Add provider portal for secure messaging
  4. Build PWA support for care team mobile workflows
  5. Scale with multi-region Aurora Global Database

Built With

Amazon Aurora PostgreSQL Next.js 16 Vercel AI SDK (GPT-4o) TypeScript Tailwind CSS shadcn/ui Better Auth Drizzle ORM pg (node-postgres) Lucide React

Built With

Share this project:

Updates

Submission history