Tools: Ultimate Guide: From FHIR Events to Explainable Agentic AI: Building a Clinical FollowโUp Demo with InterSystems IRIS for Health
๐ฌ What This Demo Produces
๐ฏ What Problem Does This Solve?
๐งช Demo Scenario: CKD + Rising Creatinine
โฑ๏ธ From Event to Evidence: The Complete Journey
๐ง Architecture Overview
Key Principle
High-Level Flow
Visual Components
๐ค Why CrewAI? Understanding Multi-Agent Architecture
1. Context Agent
2. Guidelines Agent
3. Reasoning Agent
Why Multi-Agent Instead of Single LLM Call?
๐ Interoperability Production
๐ Explainability: Proving the AI's Reasoning
Example Queries
๐ฉบ Publishing Results as FHIR DiagnosticReport
๐ Try It Yourself
๐ฏ What You've Learned
๐ฎ Beyond Lab Results: What Else Can You Automate?
๐ Conclusion 10:47 AM โ Jose Garcia's creatinine test results arrive at the hospital FHIR server.
2.1 mg/dL โ a 35% increase from last month. No chatbot. No manual prompts. No black-box reasoning. This is event-driven clinical decision support with full explainability: โ Triggered automatically by FHIR eventsโ Multi-agent reasoning (context, guidelines, recommendations)โ Complete audit trail in SQL (every decision, every evidence source)โ FHIR-native outputs (DiagnosticReport published to server) You'll learn: ๐๏ธ How to orchestrate agentic AI workflows within production-grade interoperability systems โ and why explainability matters more than accuracy alone. When Jose's abnormal creatinine observation arrives, the system automatically generates: INPUT: FHIR Observation (creatinine 2.1 mg/dL, status: HIGH) OUTPUT: FHIR DiagnosticReport containing: AUDIT TRAIL: Every decision, recommendation, and evidence citation persisted in SQL tables for compliance and review. Most AI demos in healthcare focus on: In real clinical environments, what matters is: This demo answers a simple but realistic question: What happens when a new abnormal lab result arrives โ and how can we automate the initial clinical assessment while maintaining transparency? The demo is based on a common healthcare use case: Patient: Jose Garcia (MRN-1000001) The >30% progressive increase requires clinical follow-up. Instead of waiting for manual review, the system automatically: Follow a single lab result through the system: From event to actionable recommendations. InterSystems IRIS for Health is the orchestrator and system of record. The AI agents are external capabilities that are governed, triggered, and integrated by the IRIS platform. IRIS owns the data, the workflow, and the audit trail โ the agents provide specialized reasoning. The demo includes a Gradio web UI for interactive demonstration: This makes the complete flow visible and understandable. CrewAI is a multi-agent orchestration framework that enables specialized AI agents to collaborate on complex tasks. In this demo, three agents work sequentially: Role: Gather patient clinical history from FHIR server Output: Structured patient context for reasoning Role: Search clinical knowledge base using RAG (Retrieval-Augmented Generation) Output: Evidence-based clinical guidance Role: Synthesize recommendations from context + guidelines Output: Risk assessment + actionable follow-up plan Agentic workflows provide: โ Better structured reasoning โ Each agent has a focused responsibilityโ Tool use โ Agents can query FHIR, search vector databases, analyze trendsโ Explainable decision chains โ Each step is traceableโ Separation of concerns โ Context โ Guidelines โ Reasoning Critical: IRIS orchestrates the agents โ CrewAI is used as a library, not the platform. IRIS owns persistence, orchestration, FHIR integration, and audit trails. The workflow is managed by three IRIS components: Business Service (FHIRObservationIn)Triggered automatically when FHIR Observation is POSTed Business Process (FollowUpAI)Orchestrates three-step workflow: One of the most critical aspects of clinical AI is proving why a recommendation was made. IRIS persists everything in a minimal, queryable SQL model: "What cases were evaluated today?" "Why did the agent recommend nephrotoxic medication review?" Every recommendation has: You can answer "Why did the AI recommend this?" with SQL queries and evidence citations. The final step closes the loop: AI outputs become part of the clinical record. The system publishes a FHIR DiagnosticReport containing: This makes the AI output: The DiagnosticReport is not a separate "AI system output" โ it's a first-class clinical document that follows the same standards as lab reports and radiology findings. Quick Start (15 minutes): Load sample patient data (Jose Garcia with CKD history)Follow the README setup instructions Open browser to http://localhost:7860 POST an abnormal lab value and watch: Query the results using IRIS SQL Explorer or Management Portal ๐ฌ Questions or feedback? Reply to this post โ I'd love to hear about your use cases. If you've followed along, you now understand how to: โ Trigger AI workflows from FHIR events โ No manual initiation requiredโ Orchestrate multi-agent systems with CrewAI โ Context, Guidelines, Reasoning agentsโ Build explainable AI with SQL audit trails โ Every decision is traceableโ Publish AI outputs as FHIR resources โ Interoperable clinical documents
โ Integrate agentic AI with IRIS Interoperability โ Production-grade orchestration This pattern applies to many clinical scenarios: The architecture is the same: event โ context โ evidence โ reasoning โ action. This demo shows how Agentic AI can be safely and effectively integrated into real clinical workflows using InterSystems IRIS for Health. We move from AI experiments to platform-grade clinical AI. โญ Star the repo: https://github.com/intersystems-ib/iris-health-fhir-agentic-demo ๐งช Try the demo with your own clinical guidelines ๐ฌ Share your use case โ What clinical event would you automate first? Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse