Claude Code for Clinicians Chapter 19
Part V — The Part of Tens

Chapter 19: Ten Killer Workflows for Clinical AI Teams

The earlier chapters showed you how Claude Code works. This chapter shows you what to actually build with it next Tuesday morning at a cancer center.

Every workflow below maps to something the AI Office, the pharmacy informatics group, or the clinical data science team at KHCC already does — or should be doing. Don’t try all ten. Pick two, ship them this month, then come back.

🧠 Remember. A workflow is just a sequence of small actions wired together so that nobody has to remember to run them. Claude Code is unusually good at being the wiring.


1. The Nightly Extraction Eval Run

The situation. You changed a prompt — maybe one line in the pathology extractor that pulls tumor stage out of free-text pathology reports. You want to know whether that one line broke anything before it ships to the gold table that downstream researchers query.

What an extraction pipeline is. At the AI Office, an extraction pipeline reads unstructured clinical text (a pathology report, an ER note, an operative note) and pulls out a structured row of data — tumor size, T-stage, margins, histology. The pipeline is the LLM plus a Pydantic schema plus the surrounding plumbing. See Chapter 0.5 if “Pydantic schema” still sounds foreign.

What the eval cohort is. A frozen list of ~1,000 deceased patients with hand-curated ground truth for each pipeline’s task. Because the patients have died, the records never change and the answers don’t drift. Every prompt change is graded against this cohort before it ships.

The workflow. Build a custom slash command /eval (Chapter 11) that runs the eval suite, records the run in aidi_catalog.dbo.eval_runs, and diffs against last night’s baseline. Then wire a Stop hook (Chapter 14) that refuses to let a session end until /eval has run. Claude commits the prompt change, runs the eval, and posts a markdown summary to the team Slack with delta counts (“AKI worsening: 142 → 141, one patient flipped: review case MRN A8X4-92”). Add a Ralph loop (Chapter 18) and you can iterate on a prompt for an hour while you eat dinner.

🧠 Remember. No prompt change ships without an eval run. This is Rule 4 of the global CLAUDE.md. Wire it into a hook so you can’t forget when you’re tired.

2. The Pathology Triage Inbox

The situation. Wilms tumor cases (a childhood kidney cancer Dr. Sultan studies) arrive as PDF pathology reports. Clinic is Monday morning. You want T-stage, histology subtype, and margin status pulled out structurally before the clinician opens the chart.

The workflow. Build a tiny project: a folder called pathology-inbox/ where new report PDFs land, a Pydantic schema for the structured fields, and a slash command /process-inbox that runs the extraction for each new PDF and writes a .json next to it. Add a PreToolUse hook (Chapter 14) that runs tools/check_pii.py before any file leaves the folder, so a patient name or MRN never escapes in plaintext.

The clinician walks in Monday morning, opens the .json files, and reads in two minutes what would otherwise be twenty.

3. The “Why Did This Patient Get Missed?” Auditor

The situation. A patient who should have triggered the AKI worsening alert didn’t. Three pipelines touch the patient’s record. Two teams own them. Nobody wants to start the detective work.

The workflow. Spin up a subagent (Chapter 13) with read-only tools — Read, Grep, Glob — pointed at the AI Office extraction repo, the cohort SQL, and the alert dispatcher. The prompt: “MRN A8X4-92 should have triggered the AKI worsening alert on 2026-04-12. Trace every step. Report where the patient was filtered out and which table is responsible.”

The subagent has its own clean context. The main session stays clean. Two minutes later you get a 200-word root-cause analysis instead of two hours of grep.

💡 Tip. Anthropic’s own security team shaved 10–15 minutes off stack-trace tracing using this exact pattern. The pattern is real. The numbers are real.

4. The Two-Tool Plan-Then-Build Workflow

The situation. You’re about to start something bigger than one file — a new cohort definition, a refactor of the chemo dose checker, a new dashboard. The temptation is to type it straight into Claude Code.

The workflow. Don’t. Open Claude.ai (the chat app) first. Brainstorm the design there: trade-offs, schema, edge cases, what to not build. When you have a plan, ask Claude.ai to write the implementation prompt for Claude Code. Paste that prompt into Claude Code as your opening message.

Two different Anthropic teams (Growth Marketing and Legal) discovered this independently. It works because the chat app is for thinking and the CLI is for doing, and you should not try to do both in the same window.

5. The Dashboard Screenshot Debug

The situation. A clinician sends you a screenshot of the chemotherapy dashboard with three red boxes drawn on it and the message “these are wrong.” You have no idea which “wrong” — wrong dose? wrong patient? wrong order of columns?

The workflow. Paste the screenshot directly into Claude Code (yes, you can paste images — Ctrl+V works). Say “the user reports the three highlighted rows are wrong; find the bug.” Claude reads the image, identifies the columns visible, traces the query that produces them, finds the join error, and proposes a fix. Anthropic’s Data Infrastructure team uses this pattern to diagnose Kubernetes outages from cloud-console screenshots. It works on Power BI screenshots too.

🧠 Remember. A screenshot uses context but is often cheaper than the 600 words you’d need to describe the bug in prose.

6. The Friday Ralph Loop

The situation. Your todo.md has seventeen unchecked items: refactor four prompts, regenerate three figures, update a Cox regression model, write the methods section, run three more evals. You also have a flight to catch at 7 PM.

The workflow. Set up the Ralph loop pattern (Chapter 18) with a completion promise that requires every checkbox ticked and the eval suite green. Set max iterations to 30. Launch and walk away. By the time you land, most of the work is done, the items it couldn’t finish are flagged with explanations, and you owe someone on the team a coffee but not a weekend.

This works because the eval suite is your safety net. Without it, you cannot leave Claude alone. With it, you can.

7. The R Survival Analysis Buddy

The situation. You have a Kaplan-Meier survival curve drawn with the R package survminer. It needs to be re-themed to match a recent Lancet publication: stratified by treatment arm, p-value box in the top right, risk table beneath, specific color palette.

The workflow. Open Claude Code in the project folder. Paste the published figure as an image. Say “match this figure with our tidymodels cohort. Theme it for Lancet. Save as PNG and PDF.” Claude reads your existing theme_lancet.R helper, writes the new plotting script, runs it, and shows you the rendered result. If it’s wrong, you paste the rendered PNG back into Claude and say what’s off. Twenty minutes, end to end. (tidymodels is the modern R framework for machine learning and statistical modeling. survminer is the survival-curve plotting library most clinical statisticians use.)

8. The MCP-Powered AIDI-DB Schema Inspector

The situation. Half your day is spent asking “wait, what’s that column called in SILVER_aki_episodes?” Then opening DBeaver. Then closing DBeaver. Then asking again.

What MCP is. Model Context Protocol — a standard way for Claude to talk to external tools and databases. An MCP server is a small program that exposes data (a database, an API, your file system) in a way Claude can call. We covered MCP in Chapter 15.

The workflow. Install an Azure SQL MCP server pointed at the AIDI-DB database. Once connected, you ask in plain English: “Which silver tables have a creatinine_baseline column, and which gold table aggregates them?” Claude queries information_schema (the database’s internal directory of tables and columns), returns the answer, and remembers it for the rest of the session. Anthropic’s Data Infrastructure team replaced their internal data catalog with exactly this pattern.

9. The Custom Slash Command Library

The situation. Every team has rituals — “make a commit message in the AI Office style,” “open a PR against the dev branch using the standard template,” “regenerate the patient cohort SQL with today’s date.” Each ritual is a few lines of markdown.

What a slash command is. A small file in .claude/commands/ that becomes a typeable shortcut, like /commit-aidi. We covered them in Chapter 11.

The workflow. Spend a Friday afternoon writing eight of them: /commit-aidi, /pr-dev, /refresh-cohort, /check-phi, /run-eval, /regen-figures, /build-report, /audit-mrn. Check them into the repository. Now every member of the team gets the same shortcuts, the same way. Anthropic’s security team owns half of all custom slash commands in the company’s monorepo. They are the visible signature of a team that takes the tool seriously.

10. The Non-Coder Workflow Translator

The situation. A clinical pharmacist arrives at your desk with: “I want to pull yesterday’s referral count, filter to oncology, group by service, and email the top five doctors.” She doesn’t write code.

The workflow. You don’t write the script. You teach her to write the prompt. Open Claude Code in a sandboxed folder (one with strict permissions and no PHI), hand her the keyboard, and watch her describe what she wants in plain English. Claude writes the SQL, runs it, shows the result. You added a hook earlier that blocks any destructive action. Anthropic’s Finance team trained their non-coders this way. The long-term win is not the script she got today; it is the dozen scripts she’ll write next month without needing you.

⚠️ Warning. Sandbox aggressively for non-coders. In .claude/settings.json, deny-list everything under /data/patients/, every *.key and *.env, and any directory containing PHI. Chapter 14 covers the PreToolUse hooks that enforce this.


Try This

Pick workflow #1 (the nightly eval run) and stand it up before you read Chapter 20. It is the single highest-payoff automation in this list because it touches every concept in the book: hooks, slash commands, subagents, CLAUDE.md, the eval cohort. If you can ship #1, you can ship the other nine.

Watch Out

Don’t try to build all ten in a week. Pick two. The trap with Claude Code is that everything feels just possible enough that you’ll over-commit, then ship none of them. Two workflows shipped beats ten started.