Skip to content

balabommablock-cpu/preauth-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pre-Auth Intelligence Engine

5-node AI system that transforms unstructured doctor's notes into TPA-ready insurance pre-authorization submissions.

Live Demo · Architecture


The Problem

Indian hospital insurance pre-authorization is broken:

  • 3-7 hours from patient arrival to insurance approval (IRDAI mandates 1 hour)
  • 40% of submissions get sent back for missing information
  • 15+ different TPA portals, each with different forms and rules

The bottleneck isn't the insurer. It's the 2-4 hours inside the hospital — reading handwritten notes, filling templates, gathering reports from departments.

What This Does

A 5-node AI pipeline that processes a patient case end-to-end:

Node Function Impact
1. Clinical Parser Reads doctor's notes (Hindi-English mixed), extracts structured data, assigns ICD-10 codes 30 min → 2 min
2. Completeness Checker Cross-checks documents against TPA-specific requirements, flags missing items 40% → 15% send-back rate
3. Approval Scorer Multi-factor approval probability with risk factors and mitigation Catches issues before submission
4. Form Generator Auto-generates the correct TPA-specific pre-auth form One system replaces 15+ templates
5. Query Drafter Reads TPA send-back queries, drafts responses from existing data 2-6 hrs → 15 min

Key Capabilities

  • Hindi-English mixed notes — "Patient ko 6 months se right knee mein pain hai" parsed natively
  • Never invents medical data — every finding traces to the original notes
  • TPA-specific rules — Medi Assist wants PAC for 55+, FHPL needs cost itemization, all checked automatically
  • Correct ICD-10 coding — right knee vs left knee = different code, cross-references for laterality
  • Pre-existing condition handling — flags, checks waiting periods, adjusts approval prediction

Tech Stack

Layer Technology
AI Engine Sarvam 105B (native Indian language support, 128K context)
Framework Next.js 15, App Router, React Server Components
Hosting Vercel Edge (global CDN, atomic rollbacks)
PDF Processing pdf-parse (server-side, magic byte validation, 20MB limit)
Security Rate limiting (10 req/min/IP), server-side API keys only
Type Safety TypeScript strict mode, JSON schema validation on LLM output

Architecture

Doctor's Notes (Hindi/English)
        |
  +-------------+
  | Node 1       |  Clinical Parser — ICD-10, structured summary
  +------+------+
         |
  +-------------+
  | Node 2       |  Completeness Checker — TPA-specific document audit
  +------+------+
         |
  +-------------+
  | Node 3       |  Approval Scorer — probability + risk factors
  +------+------+
         |
  +-------------+
  | Node 4       |  Form Generator — TPA-specific pre-auth form
  +------+------+
         |
  + - - - - - - +
  | Node 5       |  Query Drafter — handles TPA send-backs (if needed)
  + - - - - - - +

Run Locally

git clone https://github.com/balabommablock-cpu/preauth-ai.git
cd preauth-ai
npm install
cp .env.example .env.local  # Add your API keys
npm run dev

Open http://localhost:3000 for the architecture overview, or http://localhost:3000/demo for the interactive demo.

Live Demo

The demo runs 4 of 5 nodes live on a real Total Knee Replacement case:

  • Sample case pre-loaded (62M, severe OA right knee, KL Grade IV)
  • Upload your own clinical notes (PDF or text)
  • Each node processes sequentially with real AI inference

Try it live


Built by Rishabh Balabomma

About

5-node AI system for hospital insurance pre-authorization — Clinical Parser, Completeness Checker, Approval Scorer, Form Generator, Query Drafter

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages