Autonomous medical billing automation using Amazon Nova AI
An intelligent system that automatically detects and corrects medical billing errors (upcoding and unbundling), then submits corrected claims to insurance portals without human intervention.
- Nova Pro for multimodal document parsing (scanned images → structured data)
- Processes scanned medical documents in JPG and PNG formats
- Extracts structured billing data from unstructured visual sources
- Medical terminology recognition (ICD-10, CPT codes)
- 100% success rate on test images (4/4 parsed correctly)
- Nova Act for autonomous browser automation
- Navigates insurance portals without human guidance
- Fills forms, submits claims, extracts confirmation numbers
- Intelligent retry logic with exponential backoff
- Uses AWS IAM authentication via
@workflowdecorator
- 100% Autonomous Operation — No human intervention for standard claims
- Multimodal Parsing — Nova Pro extracts data from scanned prescriptions
- NCCI Rules Engine — 40+ bundling rules for upcoding and unbundling detection
- Browser Automation — Nova Act fills and submits insurance portal forms
- Escalation Queue — Complex cases automatically routed to human review via S3
- End-to-End Pipeline — Parse → Detect → Correct → Submit in one flow
Scanned Image / JSON Record
│
▼
Parse (Nova Pro) → Structured claim data
│
▼
Detect Errors (NCCI Rules) → Upcoding / Unbundling violations
│
▼
Apply Corrections → Corrected claim
│
▼
Submit (Nova Act) → Confirmation number
│
▼
Results / Escalation
| Model | Component | Purpose |
|---|---|---|
| Nova Pro | Document Parser | Multimodal parsing of scanned medical images |
| Nova Lite | Error Detector | Intelligent error detection with NCCI rules |
| Nova Act | Browser Automation | Autonomous portal form submission |
Tested on 20 synthetic medical claims + 4 scanned images:
- ✅ 100% Claim Success Rate (20/20 claims processed)
- ✅ 100% Image Parsing Rate (4/4 images parsed)
- ✅ 10 Errors Detected (5 upcoding + 5 unbundling)
- ✅ 10 Errors Corrected (100% correction rate)
- ✅ Escalation Queue functional for complex cases
- Python 3.11+
- AWS Account with Bedrock access (Nova Pro, Nova Lite, Nova Act)
- AWS CLI configured with appropriate credentials
pip install -r requirements.txtCreate .env file:
# AWS Configuration
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
# Nova Model IDs
MODEL_NOVA_2_OMNI=us.amazon.nova-pro-v1:0
MODEL_NOVA_2_LITE=us.amazon.nova-lite-v1:0
# S3 Configuration
S3_BUCKET=nova-zero-medical-biller
# Mirror Portal (test portal)
PORTAL_URL=http://localhost:3000
PORTAL_USERNAME=admin
PORTAL_PASSWORD=admin123python mirror-portal/server.pyPortal runs at http://localhost:3000
python test_end_to_end.pyThis processes claims through the full pipeline with real Nova Act submission.
python test_local_verification.pyProcesses all 20 synthetic claims and generates detailed reports in data/results/.
python test_image_parsing.pyDemonstrates Nova Pro parsing 4 scanned medical images with 100% success rate.
.
├── src/
│ ├── parser/ # Document parsing (Nova Pro multimodal)
│ ├── validator/ # Error detection (NCCI rules engine)
│ ├── rag/ # RAG engine with fallback rules
│ ├── escalation/ # Escalation queue (S3-based)
│ └── orchestrator/ # Main pipeline coordinator
├── data/
│ ├── synthetic/ # 20 synthetic test claims
│ ├── scanned/ # 4 scanned medical images (JPG)
│ ├── ncci-rules/ # 40+ NCCI bundling rules (JSON)
│ └── results/ # Processing results
├── mirror-portal/ # Test insurance portal (localhost:3000)
├── demo-dashboard/ # Live demo UI
├── docs/ # Architecture documentation
├── nova_act_workflow.py # Nova Act workflow definition
├── test_end_to_end.py # End-to-end demo script
├── test_local_verification.py # Full pipeline verification
├── test_image_parsing.py # Multimodal image parsing demo
└── demo-visual.py # HTML report generator
- Compares billed CPT codes against visit documentation
- Detects when high-complexity codes are billed for simple visits
- Example: 99215 (high complexity) billed for a brief follow-up → corrected to 99213
- Checks procedure code pairs against 40+ NCCI bundling rules
- Detects when procedures should be bundled together
- Supports modifier exceptions (-25, -59, -76, -77, -91)
- Example: 99214 + 36415 billed separately → flagged per NCCI rules
Claims are escalated to human review when:
- High-severity errors with low confidence
- Claims exceeding value thresholds ($1000+ = HIGH priority)
- Complex cases requiring expert judgment
Escalated claims are persisted to S3 with priority level, human-readable summary, and full error history.
AWS_REGION— AWS region for Bedrock (default: us-east-1)MODEL_NOVA_2_OMNI— Nova Pro model ID for multimodal parsingMODEL_NOVA_2_LITE— Nova Lite model ID for error detectionS3_BUCKET— S3 bucket for escalation queue
PORTAL_URL— Mirror Portal URL (default: http://localhost:3000)PORTAL_USERNAME/PORTAL_PASSWORD— Portal credentials
Ensure your AWS credentials have Bedrock permissions:
{
"Effect": "Allow",
"Action": ["bedrock:InvokeModel"],
"Resource": "*"
}Check if port 3000 is available. Kill any existing process on that port.
If you see "Playwright Sync API inside asyncio loop", run the demo scripts directly (not from async contexts):
python test_end_to_end.pyEnsure NOVA_ACT_API_KEY is NOT set in .env — the system uses AWS IAM authentication via the @workflow decorator instead.
MIT License
Built for the Amazon Nova AI Hackathon demonstrating:
- Multimodal AI: Nova Pro for scanned document parsing (4/4 images, 100% success)
- Agentic AI: Nova Act for autonomous browser automation
- Real-world healthcare billing automation use case
- NCCI compliance checking with 40+ bundling rules