PreAuth system for HMOs in Nigeria
# PreAuth (backend)
AI-powered pre-authorization automation for Health Maintenance Organizations (HMOs) in Nigeria.
The companion **operations dashboard** lives in its own repo:
`SaaSProX/preauth-intake-dashboard`.
## Overview
PreAuth is an intelligent agent that automates the pre-authorization workflow for health insurance claims. It evaluates requests against plan rules, patient eligibility, and utilization limits to deliver instant approve/deny/escalate decisions — reducing processing time from hours to seconds.
```
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ HMO System │ ───▶ │ Webhook API │ ───▶ │ AI Agent │
│ (Pre-Auth Req) │ │ (FastAPI) │ │ (Decision) │
└─────────────────┘ └─────────────────┘ └────────┬────────┘
│
┌──────────────────────────────────────┼──────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌─────────────────┐ ┌──────────────┐
│ HMO DB │ │ Dashboard DB │ │ Notification │
│ (MySQL) │ │ (PostgreSQL) │ │ Service │
└───────────────┘ └─────────────────┘ └──────────────┘
```
## How It Works
1. **Receive** — Webhook receives pre-auth request from HMO's existing system
2. **Fetch** — Agent retrieves patient data, plan details, and utilization history
3. **Evaluate** — Agent applies plan-specific rules from the knowledge base
4. **Decide** — Returns `approved`, `denied`, or `escalated` with clear reasoning
5. **Notify** — Sends notification to the healthcare provider
6. **Log** — Records all steps for audit trail and analytics
## Features
- **Instant Decisions** — Sub-minute processing vs hours of manual review
- **Configurable Rules** — Each HMO defines their own plans, limits, and exclusions
- **Full Audit Trail** — Every decision logged with reasoning for co …