Inspiration

Inspired by real hospital pain points—manual claims reviews waste 20+ hours/week per billing team, while care gaps and referral delays hurt outcomes. FlowMaster automates these via MCP/A2A, turning fragmented FHIR data into executable workflows that save time/money, just like enterprise P2P tools revolutionized procurement.

What it does

Orchestrates end-to-end patient care workflows from a single FHIR patient ID: Claims Auditor - Scans FHIR claims for duplicates/coding errors ($500+ savings) Care Gap Finder - Identifies missed screenings/vaccinations from Observations Referral Triage - Routes symptoms to specialist agents with eligibility checks Prior Auth Bot - Auto-generates payer forms from encounters/evidence A2A coordinator routes tasks between MCP sub-agents with shared memory, full logging, and failure recovery. One Marketplace invoke completes what takes billing teams hours manually.

How we built it

FHIR FlowMaster was built with Python FastAPI MCP servers powering specialized sub-agents (Claims Auditor, Care Gap Finder, Referral Triage, Prior Auth Bot) that query public HAPI FHIR data. LangGraph provides A2A orchestration, routing patient workflows through shared SQLite memory with full audit logging and 3x retry failure recovery. Tauri delivers a native macOS menu bar app for one-click demo, while pytest validates 5 edge cases. Deployed to Prompt Opinion Marketplace, it showcases complete agent collaboration that single chatbots can't match.

Challenges we ran into

FHIR Data Inconsistencies Public test servers like HAPI FHIR had incomplete patient histories (missing Observations), so we implemented graceful fallbacks: synthetic data generation for evals + "insufficient data" structured responses instead of failures.

A2A Task Handoff Reliability Early LangGraph routing dropped state between sub-agents. Fixed with persistent SQLite checkpoints after each MCP tool call, ensuring memory survives crashes/retries.

MCP Tool Permission Scope Prompt Opinion required explicit tool schemas per sub-agent. Solution: Single orchestrator endpoint that dynamically dispatches, keeping Marketplace integration clean.

Real-Time macOS UI Sync Tauri window froze during long FHIR queries. Added async Rust bridges + optimistic UI updates from logs, enabling smooth <3min demo recording.

Each overcome with logging/guardrails, proving production readiness under healthcare constraints.

Accomplishments that we're proud of

Complete Agent Suite in 72 Hours - Built 4 production-ready MCP sub-agents + A2A orchestrator that handle real FHIR data end-to-end, deployed to Prompt Opinion Marketplace for judges to invoke live.

Zero Hallucinations via FHIR Grounding - Every output traces directly to HAPI FHIR Patient/99474 data with structured citations, unlike chatbots that fabricate medical insights.

Native macOS Experience - Tauri menu bar app feels like a hospital workstation tool, not a web demo—smooth async UI survives long-running agent workflows.

Production-Grade Resilience - 3x retry logic, SQLite memory persistence, human-in-loop guardrails passed all 5 pytest eval cases including edge failures.

Clear ROI Proof - Demo catches $500 duplicate claims + flags missed screenings automatically, quantifying hours saved vs. manual billing team workflows.

Turning fragmented healthcare standards (FHIR/SHARP) into executable agent workflows—something rule-based software can't touch.

What we learned

Multi-Agent > Monolith: A2A coordination dramatically outperforms single agents on complex workflows—task handoffs with shared memory caught edge cases (like partial FHIR data) that isolated tools missed.

Healthcare Data is Messy: Public FHIR servers have gaps/malformed resources. Production agents need synthetic data generation + strict schema validation, not just error messages.

MCP Tool Design is Critical: Explicit permissions/schemas prevent hallucinated tool calls. Dynamic dispatch (one orchestrator endpoint) was key for clean Prompt Opinion Marketplace integration.

Logging is the Real Demo: Judges care about transparency. Structured logs showing planning → tool calls → retries → human-in-loop decisions proved agent reasoning far beyond chatbot pattern matching.

macOS Native Wins Hearts: Tauri menu bar + async UI felt like a real hospital tool. Web demos look like toys; native apps signal production seriousness.

Healthcare AI succeeds when it executes complete workflows reliably, not just answers questions intelligently.

What's Next for FHIR FlowMaster

Production FHIR R5/R6 Support - Upgrade for US Core alignment (bypassing R5), adding Subscription resources for real-time monitoring.

Private FHIR Server Integration - Azure Health Data Services/AWS HealthLake connectors with RLS (Record-Level Security) for hospital pilots.

Expanded Agent Suite - Add Sepsis Predictor, Rx Checker, Discharge Planner using new FHIR workflows (CarePlan/Task).

iOS/macOS Hospital App - Full Tauri mobile companion with offline sync + ambient voice input for bedside use.

Enterprise Roadmap - QHIN/TEFCA compliance for nationwide exchange, targeting $10M+ billing teams with SaaS pricing.

From hackathon prototype to hospital standard—scaling modular agents to transform care delivery nationwide.

Built With

  • cargo
  • homebrew-platforms:-macos-native
  • langgraph
  • languages:-python-3.12
  • opinion
  • pandas
  • prompt
  • prompt-opinion-mcp/a2a
  • pytest-databases:-sqlite-apis:-hapi-fhir-r4
  • python-dotenv
  • requests
  • rust-frameworks:-fastapi
  • sharp-extensions-dev-tools:-vs-code
  • tauri-cli
  • tauri-libraries:-fhir.resources
  • uvicorn
Share this project:

Updates