What it does PriorAuth Agent automates the prior authorization workflow from coverage determination through appeal drafting. Given a patient ID and procedure code, it:

Checks whether prior authorization is required. Retrieves relevant clinical data from a FHIR R4 server. Evaluates patient evidence against payer requirements using Claude. Assembles a prior authorization package with questionnaire responses, supporting documents, a clinical narrative, and a likelihood score. Pauses at a clinician approval gate before submission. If denied, searches for additional evidence and drafts an appeal letter. The system exposes this workflow as structured MCP tools and as an A2A-discoverable agent through /.well-known/agent.json, so Prompt Opinion can discover and call the agent rather than relying on an unstructured chatbot flow.

How we built it The project is built around open healthcare and agent standards:

FHIR R4 for patient records and clinical context. MCP Streamable HTTP for tool discovery and invocation. A2A Agent Card discovery for Prompt Opinion agent handoff. SHARP-style FHIR context propagation through MCP headers: X-FHIR-Server-URL, X-FHIR-Access-Token, and X-Patient-ID. The backend is a TypeScript Express MCP server with four tools:

check_coverage_requirements gather_clinical_evidence assemble_pa_documentation draft_appeal The demo UI is built with Next.js and Tailwind CSS. It uses Server-Sent Events to stream workflow progress, reasoning traces, likelihood scoring, evidence gaps, and clinician approval state in real time. The demo uses a hosted HAPI FHIR R4 server seeded with a curated patient bundle so judges can run the workflow without generating synthetic data.

Challenges we faced The hardest part was making the system feel like real healthcare infrastructure rather than a simple AI wrapper. Prior authorization requires structured data, traceable evidence, payer requirements, clinical reasoning, and human review. That meant designing a workflow where every AI-generated conclusion could be tied back to source evidence and where final submission still goes through a clinician approval gate.

Another challenge was integrating Prompt Opinion, MCP, A2A discovery, and FHIR context propagation into one coherent flow. The agent needed to be discoverable, callable through MCP, compatible with hosted deployment, and able to receive patient context through headers rather than hardcoded configuration.

What we learned We learned that MCP works well as a boundary between agent platforms and domain-specific workflow tools. We also learned that healthcare workflows need more than generic chat: they need structured inputs, auditable outputs, event traces, and explicit approval points. The most important design decision was keeping the AI as a reasoning layer over evidence, not as the final authority.

What's next Next steps include deeper payer-rule coverage, stronger FHIR authorization support, persistent workflow state, richer clinician review controls, and production-grade security around FHIR access tokens and hosted multi-user usage.

Built With

Share this project:

Updates