Case Study - Turning Clinical Guidelines Into Protocols an EHR Can Run
Twenty clinical protocols for the Canvas EHR, each built by reading the guideline as a physician and using agentic generation to turn it into explicit, reviewable rules that an EHR — or a clinician — can follow.
- Client
- Canvas Medical
- Year
- Service
- Clinical Protocols & Agentic EHR Configuration
- My role
- Clinical product engineer (consultant)
I read each clinical guideline as a physician, decided exactly what it does and doesn’t recommend, and used agentic generation to turn it into a rules-based protocol the Canvas EHR can run — every one published in Canvas’s open protocol library.
The challenge
Canvas lets clinical logic run inside the EHR as protocols: rules that look at a patient's record and prompt the right action, either automatically or by surfacing it to a clinician. A guideline such as a US Preventive Services Task Force recommendation is written for people. Turning it into a protocol means deciding precisely who it applies to, what counts as each risk level, and what to recommend — and the guideline doesn't always say it in a form a machine can follow.
My role
As a clinical product engineer consulting for Canvas, I authored twenty protocols for Canvas's open protocol library: I interpreted each guideline clinically and decided the logic, and used agentic generation to produce the protocol, its summary and its decision diagram.
Leadership decisions
Decision 1
Start from the authoritative guideline, and encode only what it supports.
Instead of: Writing protocols from general clinical knowledge or common practice.
Each protocol cites its source guideline, carries that guideline's grade and scope, and recommends nothing beyond it. Where the evidence draws a line, the protocol draws the same line: for aspirin to prevent preeclampsia, a high-risk pregnancy gets a recommendation, two or more moderate-risk factors get a recommendation, one moderate-risk factor gets "consider," and no risk gets none — four different branches, because the guideline makes four different calls.
Decision 2
Let the agent draft the protocol; keep the clinical reading with the physician.
Instead of: Writing every protocol by hand — or letting a model summarize the guideline into rules unchecked.
Interpreting the guideline is the clinical judgment, so that stayed with me: the population, the risk definitions, the actions and their wording. Generating the structure from that interpretation — the summary, the specification and the decision diagram — is where an agent is fast and good. Anything a clinician or the EHR will act on was checked against the source guideline.
Decision 3
Make every protocol readable by the clinicians who will rely on it.
Instead of: Logic that only exists in code.
Each protocol ships with a plain-language summary of the guideline's purpose, population, recommended actions, benefits and harms, and a decision diagram showing every branch. A clinician can see exactly why the EHR is prompting them — and disagree with it — without reading any code.
The solution
Twenty published protocols across screening, pregnancy care and prevention, each with a cited reference guideline, a summary, a specification and a decision diagram:
- Screening: adult and child anxiety, adult and child depression, adult hypertension, adult syphilis, asymptomatic bacteriuria, cervical cancer, colorectal cancer, chlamydia and gonorrhea, and child vision
- Pregnancy: syphilis, hepatitis B, Rh factor, preeclampsia aspirin prevention, healthy weight gain, and folic acid supplementation
- Prevention and treatment: HIV prevention, breast cancer risk-reducing medication, and adult cancer pain management
The guideline is written for people. The protocol has to be written for the EHR — without losing what the guideline actually said.
Impact
- Guideline-based care the EHR can prompt. Each protocol turns a recommendation into rules Canvas can run, so the right screening or prevention step can surface at the right visit.
- A reusable library, in the open. The protocols are published in Canvas's open-source repository, credited, and available for any Canvas practice to build on.
- A repeatable method. Physician interpretation plus agentic generation turned what is usually slow, specialist work into a pipeline that produced twenty protocols in weeks.
Under the hood — the technical detail
Each protocol is a folder in the Canvas protocol library: a README summarizing the guideline, a spec.yaml with contributors, the reference paper and tags (category, guideline source), and a decision diagram generated as Graphviz and rendered to SVG. See, for example, pregnancy syphilis screening.
- Clinical guideline interpretation
- Agentic generation
- Canvas Medical EHR protocols
- USPSTF recommendations
- Rules-based clinical decision support