Demo: Watch Demo
An AI-powered insurance claim adjudication platform that automates OPD claim processing using Large Language Models, rule-based policy validation, confidence scoring, and manual review workflows.
The system extracts information from prescriptions, medical bills, pharmacy bills, and diagnostic reports, evaluates them against insurance policies, and generates automated claim decisions.
- Upload prescriptions, medical bills, pharmacy bills, and diagnostic reports
- PDF and image support
- Gemini 2.5 Flash powered extraction
- Structured JSON generation
- Confidence scoring
- Policy rule validation
- Coverage verification
- Medical necessity checks
- Limit validation
- Manual review routing
- Partial approval support
- Claim history tracking
- Detailed audit trail
- Decision explanations
- Confidence score reporting
- Admin policy configuration dashboard
- Appeals and re-review workflow
- Automated policy management
- Analytics dashboard
- Next.js
- TypeScript
- Tailwind CSS
- FastAPI
- SQLAlchemy 2.0
- Pydantic
- PostgreSQL
- Supabase
- Supabase Storage
- Gemini 2.5 Flash
┌────────────────────┐
│ Next.js │
│ Frontend UI │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ FastAPI │
│ Backend │
└─────────┬──────────┘
│
┌───────────────────┼───────────────────┐
│ │ │
▼ ▼ ▼
┌────────────────┐ ┌────────────────┐ ┌────────────────┐
│ Supabase │ │ Gemini 2.5 │ │ Rule Engine │
│ Storage │ │ Flash │ │ │
└────────┬───────┘ └────────┬───────┘ └────────┬───────┘
│ │ │
└───────────────────┼───────────────────┘
│
▼
┌────────────────────┐
│ PostgreSQL │
│ Supabase Database │
└────────────────────┘
Upload Documents
│
▼
Store in Supabase Storage
│
▼
Gemini Extraction
│
▼
Structured JSON
│
▼
Rule Engine Evaluation
│
▼
Decision Generation
│
▼
Store Results
│
▼
Display Outcome
| Field | Description |
|---|---|
| id | Claim ID |
| status | APPROVED / REJECTED / PARTIAL_APPROVAL / MANUAL_REVIEW |
| claimed_amount | Submitted claim amount |
| approved_amount | Final approved amount |
| confidence_score | AI confidence score |
| decision_reason | Decision explanation |
| created_at | Creation timestamp |
| Field | Description |
|---|---|
| id | Document ID |
| claim_id | Associated claim |
| document_type | Prescription / Bill / Report |
| storage_url | Supabase Storage URL |
| Field | Description |
|---|---|
| id | Record ID |
| claim_id | Associated claim |
| extracted_json | Gemini extracted data |
insurance-ai-adjudicator/
├── frontend/
│
│ ├── app/
│ │ ├── page.tsx
│ │ ├── upload/
│ │ ├── claims/
│ │ └── claims/[id]/
│ │
│ ├── components/
│ │ ├── UploadForm.tsx
│ │ ├── ClaimCard.tsx
│ │ ├── DecisionCard.tsx
│ │ └── LoadingSpinner.tsx
│ │
│ ├── lib/
│ └── types/
│
├── backend/
│
│ ├── app/
│ │ ├── routes/
│ │ ├── services/
│ │ ├── models/
│ │ ├── schemas/
│ │ ├── utils/
│ │ └── core/
│ │
│ ├── requirements.txt
│ └── Dockerfile
│
└── README.md
A claim is approved only if all validations pass successfully.
Reject when claim amount exceeds ₹5000.
Reject when claim amount is below ₹500.
Reject when doctor registration is missing or invalid.
Valid Examples:
MH/12345/2020
KA/56789/2019
DL/99999/2022
Required documents:
- Prescription
- Medical Bill
Examples:
- Teeth Whitening
- Hair Transplant
- Weight Loss Treatment
Reject when submitted more than 30 days after treatment.
Reject when treatment dates across documents do not match.
Claims are routed to manual review when:
Confidence Score < 0.80
Claims are routed to manual review when:
Claim Amount > ₹25,000
Example:
Root Canal ₹2200
Teeth Whitening ₹1800
Decision:
PARTIAL_APPROVAL
Approved Amount: ₹2200
Rejected Amount: ₹1800
confidence =
(extraction_confidence × 0.7)
+
(document_completeness × 0.3)
Claims with confidence below 0.80 are automatically routed for manual review.
POST /api/claims/uploadPOST /api/claims/processGET /api/claimsGET /api/claims/{id}cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reloadBackend:
http://localhost:8000
Swagger Documentation:
http://localhost:8000/docs
cd frontend
npm install
npm run devFrontend:
http://localhost:3000
DATABASE_URL=
SUPABASE_URL=
SUPABASE_KEY=
GEMINI_API_KEY=The application supports a sandbox mode for development without API keys.
Sandbox mode:
- Saves files locally
- Generates mock extraction responses
- Simulates adjudication results
- Enables end-to-end testing without external services
- AI-powered document extraction
- Confidence score based decision making
- Manual review workflow
- Partial approval workflow
- Appeals and re-review workflow
- Admin policy configuration dashboard
- Analytics dashboard
- Automated policy management
- Detailed audit trail
- Claim history tracking
- Fraud Detection Engine
- Multi-Policy Support
Vedant Kasar
Built using FastAPI, Next.js, Gemini 2.5 Flash, PostgreSQL, Supabase Storage, and SQLAlchemy.