06.09

Clinical Documents

Executive summary

Clinical Documents drafts the paperwork a visit needs — visit summaries, aftercare instructions, perio reports, referral and recall letters, consent forms, treatment plans with costs — from sources a clinician has already reviewed. Every generated sentence cites evidence in a frozen snapshot; numbers, codes and dates come from deterministic slots, never from the model. Signed documents render to archival PDF/A in an isolated service.

Overview

  • ProductionProduce · Clinical Documents
    Remove document writing from the visit without letting a single unreviewed fact or a model-written number into a document a patient or colleague receives.

Pipeline

  1. A reconciler finds newly reviewed sources — an accepted Scribe dossier, a completed perio exam, an accepted plan step, a recorded plan acceptance — and creates a bundle under a SKIP LOCKED lease.
  2. An immutable snapshot is built from the source. AI-inferred findings are excluded (EVID-03).
  3. A dispatch gate re-checks consent and budget at generation time, not only at enqueue.
  4. Sections are generated, checked by deterministic validators, regenerated once if needed, then verified sentence by sentence by an entailment check against the snapshot.
  5. The clinician reviews and signs; the document renderer produces PDF/A-2b, stored with its delivery record.

Data owned

  • Document snapshots and bundles
    Holds
    Frozen sources and generation work items
  • Clinical documents and renditions
    Holds
    Drafts, signed versions and rendered files
  • Deliveries and patient signatures
    Holds
    Who received what, and patient sign-off where required

Models and engines

  • Section generation
    Model or engine
    Gemini 3 Flash-Lite (flash tier)
    Notes
    Text only; numbers, codes and dates are filled from deterministic slots
  • Sentence verification
    Model or engine
    Gemini 3 Flash-Lite (flash tier)
    Notes
    Each generated sentence checked against the snapshot

Guardrails

  • Sources must already be clinician-reviewed; AI-only inferences never enter a snapshot.
  • Every generated sentence cites evidence ids in the snapshot, and unsupported sentences fail verification.
  • The renderer has no database access and is invoked only by service identity.
  • Every draft is a review-required artifact; nothing is sent before a clinician signs.

Rollout and status

  • ProductionGeneration, review, signing and PDF/A rendering
    Enabled in the production configuration

Interfaces

  • Consumes
    What
    Accepted Scribe dossiers, completed perio exams, accepted plan steps and acceptances
  • Consumes
    What
    Clinic fee schedule
  • Emits
    What
    Signed clinical documents and renditions
  • Emits
    What
    Patient-facing documents for Patient Mode and aftercare links
SOURCE OF TRUTH
  • server/services/clinicalDocuments/
  • shared/clinical/documents/contracts/
  • services/document-renderer/
  • regulatory/features/clinical-documents.yaml
Every figure in this specification is generated from the repository and checked in CI.