About

Healthcare Assistant

A course prototype with synthetic patient records, mocked scheduling, configurable FHIR access, an access log, and rule-based emergency-message routing. LangGraph coordinates the tools, which are also available through MCP.

LangGraph
FastAPI
Next.js 15
shadcn/ui
Anthropic Claude
FHIR R4
MCP
Tavily
FHIR R4 EHR backend

Pluggable EHR layer — SQLite for the course demo, a configurable FHIR R4 HTTP adapter and offline fixtures. Compatibility with a particular production server needs separate verification. Conditions are SNOMED-coded; Observations are LOINC-coded. History summaries cite these directly.

PHI access audit log

Patient-tool access is recorded in a separate SQLite file. This demonstrates an audit-log pattern, not HIPAA compliance or an independent security boundary. The demo uses synthetic records.

Emergency-message rules

Pre-classifier between START and intent routing. Deterministic regex catches cardiac / stroke / suicide / anaphylaxis / severe-bleeding / altered-mental-status; emits a hardcoded 911/988/112/108 template and skips the LLM entirely. Informational guards cover selected false positives; these rules are not a validated clinical triage system.

Multi-intent fan-out

The classifier may return multiple intents — LangGraph fans out to all relevant branches in parallel, then converges on the composer. State fields with multiple writers use Annotated reducers to avoid silent overwrites.

Token-streamed responses

Mixed stream_mode=[updates, messages] surfaces node-progress AND composer tokens in the same loop. The chat bubble fills in real-time; node-progress badges animate in as each branch completes.

MCP server

The 8 tools the LangGraph agent uses internally are also exposed via Anthropic's Model Context Protocol, so Claude Desktop (or any MCP client) can drive the same booking / records / history / search / audit operations.

Fixture and model evaluation

Fourteen routing/state fixtures, a response-quality judge, and twenty adversarial examples cover selected behaviors. Provider mode and fallback use affect results. Passing these checks does not establish clinical safety or general correctness.

Observability

Every workflow invocation produces one JSONL trace row with timing, intents, backends, errors. Optional LangSmith auto-engages when LANGCHAIN_API_KEY is set for per-LLM-call flame graphs.

Synthetic data; no real PHI. Informational only — not a substitute for clinical care.