← Writing

Kuzushi Labs · Applied research and engineering

Building agentic patient workflows

An implementation series on patient operations: domain agents, action cards, approvals, FHIR and messaging connectors, durable workflows, evaluation and deployment.

Arunank Sharan · September 2026 · 18 articles · 19,849 words

I connect our FastAPI and Next.js build to concrete contracts, failure cases and a runnable reference lab. The original implementation, interface prototypes and proposed extensions are distinguished throughout. Worked examples use synthetic identifiers; capacity profiles are explicit assumptions.

18 articles with 47 code blocks, 18 implementation diagrams and 19 primary references. The kit includes a local Python lab with 43 deterministic checks, connector contracts and 24 starter evaluation scenarios. Start with part 18 to run the lab, or follow the build from part 1.

Parts 1–6

Workflow and interface

From durable patient records to typed actions, reviewed writes, journeys and live context.

  1. PART 01 · 7 min read

    Start with the patient workflow

    Durable patient records, a complete booking example and the implementation history.

  2. PART 02 · 8 min read

    From language to domain actions

    Typed tool adapters, intent uncertainty, service contracts and bounded planning.

  3. PART 03 · 7 min read

    Making intent visible in the interface

    Editable action cards, stale-response protection and a typed Next.js navigation contract.

  4. PART 04 · 7 min read

    Confirmation is part of the workflow

    Proposal revisions, atomic idempotency and reconciliation after an uncertain write.

  5. PART 05 · 8 min read

    Patient journeys beyond the chat

    Versioned journeys, transactional outbox events, worker leases and durable escalation.

  6. PART 06 · 7 min read

    Context, memory and live updates

    Context ownership, token budgets, workflow events and end-to-end latency.

Parts 7–11

Connectors and execution

FHIR identity, concurrent booking, messaging receipts, MCP/A2A and a resumable harness.

  1. PART 07 · 6 min read

    Patient identity and FHIR connectors

    Identity mapping, SMART authorization, FHIR R4 appointment contracts and write reconciliation.

  2. PART 08 · 5 min read

    Booking under concurrency and time zones

    Slot ownership, race conditions, daylight-saving ambiguity, holds and rescheduling.

  3. PART 09 · 5 min read

    Messaging connectors and delivery receipts

    Provider adapters, signed webhooks, preference checks and out-of-order delivery events.

  4. PART 10 · 5 min read

    MCP, A2A and the tool boundary

    Scoped tool discovery, authenticated adapters and delegated task contracts.

  5. PART 11 · 5 min read

    A durable harness for patient work

    Checkpointed workflows, approval resume, effect identities and recovery semantics.

Parts 12–15

Trust and evaluation

Authorization, policy evidence, multilingual voice and complete-workflow benchmarks.

  1. PART 12 · 5 min read

    Security at every agent boundary

    Actor and tenant scope, hostile tool output, constrained connectors and useful private traces.

  2. PART 13 · 5 min read

    Retrieval for policies and patient context

    Effective policy versions, authorized evidence, live records and retrieval evaluation.

  3. PART 14 · 5 min read

    Voice, multilingual input and human handoff

    Final transcripts, Hindi/Hinglish fields, interruptions and acknowledged staff handoffs.

  4. PART 15 · 6 min read

    Evaluating complete patient workflows

    A proposed 300-case benchmark, 24 starter cards, final-state oracles and repeated trials.

Parts 16–18

Operate and implement

Capacity and recovery, a sourced product/research comparison, and the implementation handoff.

  1. PART 16 · 5 min read

    Operating the platform: capacity, cost and recovery

    Worked CPU and memory sizing, concurrency, database pools, telemetry and recovery drills.

  2. PART 17 · 6 min read

    What Polsia and agent research change

    A sourced comparison with Polsia and Hippocratic AI, plus five research-driven experiments.

  3. PART 18 · 5 min read

    Run the lab and ship one workflow

    Run the local example, reproduce failures and follow a staged implementation handoff.