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 DocumentsRemove 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
- 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 LOCKEDlease. - An immutable snapshot is built from the source. AI-inferred findings are excluded (EVID-03).
- A dispatch gate re-checks consent and budget at generation time, not only at enqueue.
- Sections are generated, checked by deterministic validators, regenerated once if needed, then verified sentence by sentence by an entailment check against the snapshot.
- 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
| Store | Holds |
|---|---|
| Document snapshots and bundles | Frozen sources and generation work items |
| Clinical documents and renditions | Drafts, signed versions and rendered files |
| Deliveries and patient signatures | 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
| Step | Model or engine | Notes |
|---|---|---|
| Section generation | Gemini 3 Flash-Lite (flash tier) | Text only; numbers, codes and dates are filled from deterministic slots |
| Sentence verification | Gemini 3 Flash-Lite (flash tier) | 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 renderingEnabled 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
| Direction | What |
|---|---|
| Consumes | Accepted Scribe dossiers, completed perio exams, accepted plan steps and acceptances |
| Consumes | Clinic fee schedule |
| Emits | Signed clinical documents and renditions |
| Emits | 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