Inspiration
Prior authorization is the #1 driver of US physician burnout in 2026. 90% of practices saw PA requirements increase this year (MGMA). Medicare Advantage payers issued 4.1M denials in 2024 — and 82% get overturned on appeal, yet most are never appealed because the process takes 30+ minutes per case. Meanwhile, CMS-0057-F (effective January 1, 2026) mandates FHIR-based electronic prior auth. A federal requirement waiting for a solution.
What it does
AutoAuth automates the entire healthcare prior authorization workflow using AI agents and FHIR standards. It orchestrates the HL7 Da Vinci Burden Reduction pipeline:
- CRD (Coverage Requirements Discovery) — Checks if PA is required
- DTR (Documentation Templates & Rules) — Fetches the payer's questionnaire
- Synthesize (GenAI) — Reads the patient's FHIR chart and generates a payer-ready clinical justification with citations to specific FHIR resources
- PAS (Prior Authorization Support) — Submits the PA to the payer
- Appeal (GenAI) — If denied, automatically generates an appeal letter and resubmits
The system reads real FHIR R4 data, writes real clinical narratives with evidence citations, and intelligently handles wrongful AI denials.
How I built it
- A2A Orchestrator Agent: Claude Haiku running in Prompt Opinion, orchestrating the workflow via Agent-to-Agent communication
- 5 MCP Tools: crd_check_coverage, dtr_fetch_questionnaire, synthesize_clinical_justification, pas_submit_bundle, appeal_denial
- MCP Server: FastAPI deployed to Render cloud (24/7 availability)
- FHIR Data: Real FHIR R4 patient data from HAPI public server
- GenAI: Claude (via OpenRouter) for narrative synthesis and appeal generation
- Stateful Payer Simulation: In-memory payer behavior modeling embedded in MCP tools — first submission denied for insufficient documentation, approval granted on appeal resubmission with enhanced evidence
- Standards: HL7 Da Vinci CRD/DTR/PAS, FHIR R4, US Core profiles, CMS-0057-F compliant
Challenges I ran into
Prompt Opinion session timeouts — The synthesize LLM call was slow, causing Prompt Opinion's MCP session to timeout before pas_submit_bundle could fire. Fixed by optimizing model selection and reducing output verbosity.
FHIR data retrieval — Had to seed synthetic patient data in HAPI public server and ensure it persisted across test runs.
MCP tool response parsing — The synthesize tool sometimes returned invalid JSON (truncated output). Fixed by removing aggressive max_tokens caps and letting Claude finish naturally.
Cloud deployment architecture — Initial local development used a separate mock payer service on localhost, which became unreachable once the MCP server was deployed to Render. Refactored the tools to embed payer simulation directly, ensuring statelessness and 24/7 availability without dependencies on local services.
Accomplishments that I'm proud of
✓ Full standards compliance — Implements real HL7 Da Vinci CRD/DTR/PAS (not a mockup)
✓ Real FHIR citations — Narratives cite actual FHIR resource IDs (Condition/cond-lbp-001, MedicationRequest/medreq-ibuprofen-001, Encounter/enc-pt-456, etc.), proving the AI read structured data
✓ Automated denial appeals — When payer AI denies, the system recognizes the error and generates a formal appeal with evidence — something no rules-based system can do
✓ Multi-agent resilience — When tools fail, the agent adapts instead of failing (demonstrated when appeal_denial tool errored, the orchestrator pivoted to direct resubmission with enhanced narrative)
✓ Cloud-deployed and judge-testable — Live on Render with 24/7 availability, no local laptop dependency
✓ Zero real PHI — All data is synthetic; compliant with HIPAA principles from day one
What I learned
- HL7 FHIR is powerful but verbose; GenAI excels at synthesizing it into narrative form
- The Da Vinci standards are well-designed but underutilized — most vendors treat them as optional
- LLM-based clinical writing requires guardrails (system prompts, max_tokens, response_format constraints), not free-form generation
- Agent-to-Agent (A2A) orchestration is the future — single-agent systems can't handle the complexity of healthcare workflows
- The appeal workflow is where AI creates the most value — 82% wrongful denial rate means huge opportunity
What's next for AutoAuth
- Real payer state management — Move from in-memory state to Redis/database for proper multi-tenant tracking of submissions and appeals across sessions
- SHARP integration — Implement Prompt Opinion's FHIR Context Extension so the agent receives secure patient context automatically
- Real payer integration — Connect to actual payer CRD/DTR/PAS endpoints (Anthem, Humana, UnitedHealthcare have published sandboxes)
- EHR native integration — Build SMART on FHIR app to embed AutoAuth directly in EHRs (Epic, Cerner, Athena)
- Multi-payer support — Handle variation in questionnaire formats across different payers
Built With
- claude-(anthropic)
- cms-0057-f
- fastapi
- fhir-r4
- hapi-fhir-server
- healthcare-ai
- hl7-da-vinci
- model-context-protocol-(mcp)
- openrouter
- prompt-opinion
- python
- render