Co-Clinician

Clinical decision support

The interesting part of clinical AI is not the answer. It is everything around the answer.

A co-clinician reads a patient’s records alongside the doctor. Getting one to produce a plausible paragraph is a weekend. Getting one you would put in front of a clinician means answering harder questions: where did that fact come from, what left the building, which rule fired, and what happens when the model misbehaves.

This build answers those questions on screen, in a working console, over three synthetic patients.

What the console shows

Provenance, not assertion

01

Every extracted fact carries a verbatim quote from the document it came from. After extraction, each quote is checked back against the source; anything that cannot be found is marked unverified rather than stored as fact. In the current corpus, 104 of 104 spans verify.

A score the model cannot invent

02

The health score is a pure function over the extracted rows — same records in, same number out, every run. Each deduction names the specific record that caused it. The assistant may describe the score and is never allowed to produce one.

Guardrails with a live trace

03

Nine rules across input and output. Every turn records each rule's verdict and measured latency to the database and renders them beside the answer. Nothing on that panel is pre-recorded, and the deterministic rules run before any model is called.

One adapter, three providers

04

Every model call goes through a single interface, switchable live from the console header. Swapping vendors touches one file; the guardrails, the scorer and the pipeline do not move. That turns an open-weight migration into a scheduling question.

What actually leaves the building

Identifiers are replaced with placeholders before any text reaches a model provider. Switch between the two views below — the redacted version is generated by the same function the harness runs on every turn, not written by hand.

The de-identification boundary

[NAME_1] (MRN [MRN_1], DOB [DOB_1]) — her eGFR is down to 38 and she is still on metformin 1000 mg twice daily. Worth a call today? Mobile [PHONE_1], email [EMAIL_1].

Redaction ledger · 5 entries

  • [NAME_1]M••••••••••n·name· sha256 0d83c1dd14
  • [MRN_1]S••••••••••2·mrn· sha256 2215fa9c94
  • [DOB_1]0••••••••8·dob· sha256 0fc68a92f4
  • [PHONE_1]3••••••••••8·phone· sha256 a676c911b7
  • [EMAIL_1]m••••••••••g·email· sha256 b9413f80b8

The ledger records the hash, never the value. It can prove what was redacted without becoming a second copy of the thing it was protecting.

How a record becomes an answer

Six stages. Select one to see what it does and, more importantly, what it is not allowed to do.

Prose passes through verbatim by code — a model has no reason to touch a paragraph and every opportunity to shorten one. The model is scoped to aligning tabular blocks, where blank cells make naive splitting wrong, and its output is row-count checked with a deterministic fallback.

There is no vector store. This record set is small enough to pass whole, and passing it whole removes retrieval as a source of error. That stops being true at scale, which is precisely where a retrieval layer earns its place — and where it needs its own evaluation.

The three synthetic patients

Each is constructed around one failure mode that reading a single document does not catch. They are authored fiction, written for this demonstration.

Margaret Ellison

67F · type 2 diabetes, CKD stage 3

eGFR falls 52 → 38 across two lab panels eleven months apart while metformin stays active. Neither document states the problem. Only the pair does.

David Okonkwo

54M · post-STEMI on dual antiplatelet therapy

Orthopedics prescribes an NSAID after a drug-eluting stent. The note itself records that cardiology records were unavailable at that visit.

Aisha Rahman

31F · persistent asthma, 24 weeks pregnant

Her chart carries an auto-imported portal message containing an instruction addressed to whatever model reads it. The input harness quarantines it before the model call.

What this is not

This is a demonstration prototype. It is not a medical device, it is not HIPAA-certified, no business associate agreement is in place, and it must not be used for clinical decisions.

Every patient record in it is fiction we wrote. The de-identification layer shows where that boundary belongs in a production system and what it produces; it is not a certified de-identification implementation, and running real protected health information through a hosted model API requires contractual cover this demonstration does not have.

The parts that are real are the mechanisms: the pipeline runs, the spans are genuinely verified, the score is genuinely deterministic, and every guardrail verdict on the trace panel was measured on that request.

Read the safety and data notes