The Problem

Prior authorization costs US clinicians 12 hours per week and delays patient care. $35B in annual administrative waste. The CMS Interoperability Final Rule (CMS-0057-F) mandates automation by 2027 — but most systems still run on faxes.

What It Does

Prior Auth Copilot is an A2A agent on Prompt Opinion that automates the full prior authorization workflow end-to-end:

  1. Checks PA requirement — Is PA needed for this CPT code + payer? (Da Vinci CRD)
  2. Retrieves medical-necessity criteria — structured payer policy rules (Da Vinci DTR)
  3. Pulls FHIR chart — conditions, observations, medications via Prompt Opinion's FHIR MCP
  4. Matches evidence with GenAI — evaluates each criterion against the chart, cites specific FHIR resource IDs. Hallucinated citations are automatically stripped.
  5. Generates the PA packet — justification letter + FHIR Claim bundle + pre-drafted appeal letter (Da Vinci PAS)

Every packet is flagged requires_human_review: true. The clinician approves. No autonomous submissions.

How We Built It

Two artifacts composed on Prompt Opinion:

PA Criteria MCP Server — Python FastMCP server, SHARP-on-MCP compliant, deployed on Hugging Face Spaces. Accepts X-FHIR-Server-URL, X-FHIR-Access-Token, X-Patient-ID headers. Uses Claude Haiku for evidence matching and letter generation. Four tools:

Tool Da Vinci Phase Purpose
check_pa_requirement CRD Is PA required?
get_policy_criteria DTR Structured criteria
match_clinical_evidence DTR GenAI grounded matching
generate_pa_packet PAS Full submission packet

Prior Auth Copilot A2A Agent — configured in Prompt Opinion, connected to the default FHIR MCP + our PA Criteria MCP. Agent Card advertises 4 skills: PriorAuthCheck, EvidenceGathering, PAPacketGeneration, AppealDrafting — so other agents can delegate to it.

Safety Architecture

  • Evidence grounding: LLM claims without valid FHIR citations are auto-rejected (status: ungrounded)
  • PHI guardrail: regex check on every LLM output before it leaves the server
  • FHIR domain allowlist: only known synthetic test servers accepted
  • SHA-256 hash-chained audit log on every tool call
  • Human-in-the-loop: enforced in agent prompt and packet metadata

Standards Compliance

  • HL7 FHIR R4
  • SHARP-on-MCP (Prompt Opinion context propagation)
  • Da Vinci CRD / DTR / PAS
  • CMS-0057-F Interoperability and Prior Authorization Final Rule

Challenges

  • Grounding LLM evidence to actual FHIR resources (solved with post-call citation validator)
  • Keeping end-to-end latency under 60 seconds across FHIR + LLM calls (solved with parallel fetches and capped token budgets)
  • Modeling payer-specific criteria variance for same CPT code (solved with payer-indexed criteria schema)

What's Next

  • Expand from 5 procedures to 50
  • CDS Hooks integration for EHR order-entry trigger
  • Partner with real payer FHIR sandbox (Humana, CMS Blue Button)
  • Appeals orchestrator sub-agent delegating via A2A

Built With

  • anthropic
  • claude
  • da
  • docker
  • face
  • fastmcp
  • fhir
  • hugging
  • opinion
  • prompt
  • python
  • r4
  • sharp-on-mcp
  • spaces
  • vinci
Share this project:

Updates