Inspiration

Doctors see dozens of patients a day, each requiring multi-specialty reasoning in minutes. A second opinion today means a referral that takes days. We wanted to put the entire specialist team in the room — instantly, grounded in real patient data, not LLM guesses.


What it does

ClinIQ is a multi-agent clinical decision support system inside Prompt Opinion. A doctor types one message. ClinIQ reads the live FHIR R4 patient record, routes to the right specialists — endocrinologist, cardiologist, neurologist, pharmacist — assembles a unified clinical response, and writes the diagnosis, medications, labs, and encounter note back to the FHIR record. All in one conversation.


How we built it

Six specialist AI agents built on Google ADK, each with an explicit clinical rule book. An orchestrator handles triage routing via a three-level decision tree. All agents run in-process via AgentTool — zero inter-agent HTTP calls. FHIR R4 for bidirectional patient data. Gemini 2.5 Flash via LiteLLM (swappable to Claude or GPT-4o). Deployed on Prompt Opinion via A2A protocol v1. HIPAA guardrails injected into every agent's instruction from a shared module.


Challenges we ran into

The A2A v1 spec was ahead of the Python SDK — we wrote compatibility shims to bridge the gap. Prompt Opinion sent PascalCase method names, proto-enum role values, and reused task IDs across conversation turns — all three broke the SDK. Fixed in middleware so agents never saw the incompatibility. FHIR credentials landed in the wrong field of the A2A payload and had to be bridged before the callback could find them.


Accomplishments that we're proud of

A working end-to-end clinical workflow — symptom input, FHIR read, multi-specialist reasoning, pharmacist safety check, and FHIR write-back — all in a single conversation. Deterministic clinical outputs that trace back to numbered rules, not LLM intuition. FHIR credentials that never appear in any prompt, log, or LLM context window. Six agents coordinated with zero network hops between them.


What we learned

Explicit rule books outperform general LLM reasoning for safety-critical decisions — thresholds need to be deterministic, not probabilistic. In-process agent composition changes the latency profile entirely. A write guard is not optional in a keyword-routed multi-agent system. And shipping against a moving spec means building compatibility layers, not waiting.


What's next for ClinIQ Health Care Decision Support System

Radiologist agent for imaging report interpretation. SMART on FHIR OAuth for production EHR integration. Audit logging to a SIEM for full HIPAA trail compliance. HL7 v2 ingestion to reach hospitals that haven't migrated to FHIR. Confidence-based escalation — low-confidence findings automatically trigger human-in-the-loop review. Overnight population health batch mode — surface high-risk patients before the care team starts their day.

Built With

Share this project:

Updates