06.02

Scribe

Executive summary

Scribe turns the conversation in the chair, or a dictation, into a structured clinical note and visit dossier. The model drafts; the note becomes part of the record only through a clinician save that carries a verifiable attestation. Recording survives interruptions, device changes and lost connections without losing captured audio or transcript.

Overview

  • ProductionCapture · Scribe
    Produce a reviewed SOAP note and structured dossier from encounter audio without the clinician typing, and without inventing anything that was not said.

Pipeline

  1. Audio streams through Voice OS to streaming recognition; transcript segments are stored as working recovery data as they arrive.
  2. At stop, structuring turns the transcript into a SOAP note and dossier under a strict schema at low temperature, with PII scrubbing and schema repair.
  3. An optional critic pass reviews the draft; output validation routes unsupported, sparse or conflicting content to review rather than through it.
  4. The draft is stored as a clinical artifact with its AI decision record.
  5. The clinician reviews and saves. Finalization checks the acceptance attestation and entity verification, then accepts and locks the note.
  6. Fact writers emit medications, conditions and findings as proposed facts; Clinical Documents picks the accepted note up as a source.

Data owned

  • Clinical sessions, events and segments
    Holds
    The capture session and its incremental transcript
  • Voice records
    Holds
    The finalized canonical transcript row
  • Note versions and amendments
    Holds
    Every saved version; corrections are additive amendments
  • Diarization confirmations
    Holds
    Which speaker was the clinician, when diarization is used
  • Unbound dictations
    Holds
    Dictation captured before a patient is bound, transcribed in the EU and attached later

Models and engines

  • Structuring and dossier
    Model or engine
    Gemini 3 Flash (pro tier)
    Notes
    Extraction temperature 0.1; schema-constrained
  • Critic pass
    Model or engine
    Qwen3-8B with a critic adapter (self-hosted)
    Notes
    Optional second read; can only route to review
  • Note structuring (sovereign)
    Model or engine
    Qwen3-8B with a SOAP adapter (self-hosted)
    Notes
    Routed through the clinical LLM worker when enabled, with Vertex fallback

Guardrails

  • Structuring never fabricates missing content; unsupported or sparse output goes to review or is rejected (SCRIBE-07).
  • A clean AI note is accepted only when the save carries the server-verifiable clinician attestation; generation alone is never review (SCRIBE-08).
  • Finalize is idempotent: a lost response and a retry return the same canonical record (SCRIBE-09).
  • Recording consent is captured before capture, with a shadow mode for rollout.
  • Patient binding is fixed for the whole save transaction; a patient change invalidates in-flight results (SCRIBE-05).

Rollout and status

  • ProductionStreaming capture, finalize, dossier v2, resume
    Enabled in the production configuration
  • ProductionScribe fact writer
    Writes proposed facts from accepted notes
  • ShadowRecording-consent enforcement
    Consent captured; enforcement mode in shadow
  • Rolling outCritic pass
    Implemented; enabled with the self-hosted critic adapter
  • PlannedSpeaker diarization
    Implemented behind a flag that defaults off
  • PilotUnbound dictation tray
    ADR 0032; enabled per clinic

Interfaces

  • Consumes
    What
    Voice OS transcripts
  • Consumes
    What
    Encounter binding from the clinical spine
  • Emits
    What
    SOAP note and dossier artifacts
  • Emits
    What
    Proposed clinical facts
  • Emits
    What
    Accepted sources for Clinical Documents
  • Emits
    What
    Chairside suggestions for the HUD

Invariants

  • SCRIBE-01…10 — capture, structuring, acceptance, idempotent finalize, additive amendment
  • Unbound dictation invariants (ADR 0032)

Known limits

  • Audio retention is implemented behind a flag that defaults off; by default only transcripts persist.
SOURCE OF TRUTH
  • server/routes/private/scribe.ts
  • server/routes/ai/scribe.ts
  • server/services/scribe/
  • src/components/scribe/
  • docs/clinical-invariants/scribe.md
Every figure in this specification is generated from the repository and checked in CI.