Encounter lifecycle, SOAP/APSO notes with versioning, longitudinal problem lists, and ambient-scribe pipeline with full provenance tracking.
Data Classification: Mixed scoping. Encounter, EncounterNote, and all Scribe entities are org-scoped (partition key: OrganizationID).
Problem and ProblemList are global with SourceOrganizationID for provenance (no OrganizationID partition — patient-centric across orgs).
See Data Model for ownership conventions.
Encounter P0
A clinical visit instance created from a completed Appointment. Tracks lifecycle from planned through finished/cancelled with signing timestamp.
Schema
Field
Type
Required
PK
FK
Notes
EncounterID
UUID
Yes
Yes
PatientID
UUID
Yes
Patient
ProviderID
UUID
Yes
Provider
AppointmentID
UUID
Yes
Appointment
From Scheduling module
EncounterType
String(50)
Yes
annual | acute | follow-up | telehealth | awv
EncounterStatus
String(50)
Yes
planned | in-progress | finished | cancelled
Started
DateTimeUTC
No
Ended
DateTimeUTC
No
Signed
DateTimeUTC
No
When provider signs the note
OrganizationID
UUID
Yes
Organization
Partition key
CreatedByUserID
UUID
Yes
User
Audit
CreatedDateTimeUTC
DateTimeUTC
Yes
Audit
UpdatedByUserID
UUID
Yes
User
Audit
UpdatedDateTimeUTC
DateTimeUTC
Yes
Audit
IsDeleted
Bool
Yes
Soft-delete
RBAC
Role (Tier)
Access
Patient (10)
Read own encounters (after note signed)
FrontDesk (30)
Read status only
MA / RN (40)
Read & update status (in-progress)
Provider (50)
Full CRUD on own encounters
PracticeMgr (70)
Read all org encounters
EditAMI (90+)
Schema management
EncounterNote P0
SOAP or APSO note attached to an encounter. Supports draft/in-review/signed/corrected/retracted lifecycle with semantic versioning.
Schema
Field
Type
Required
PK
FK
Notes
EncounterNoteID
UUID
Yes
Yes
EncounterID
UUID
Yes
Encounter
SignedByUserID
UUID
No
User
Set on signing
NoteFormat
String(50)
Yes
SOAP | APSO
Subjective
Text
No
S section
Objective
Text
No
O section
Assessment
Text
No
A section
Plan
Text
No
P section
NoteStatus
String(50)
Yes
draft | in-review | signed | corrected | retracted
NoteVersion
String(100)
Yes
Format: break.feature.bug.buildtimestamp
Signed
DateTimeUTC
No
OrganizationID
UUID
Yes
Organization
Partition key
CreatedByUserID
UUID
Yes
User
Audit
CreatedDateTimeUTC
DateTimeUTC
Yes
Audit
UpdatedByUserID
UUID
Yes
User
Audit
UpdatedDateTimeUTC
DateTimeUTC
Yes
Audit
IsDeleted
Bool
Yes
Soft-delete
RBAC
Role (Tier)
Access
Patient (10)
Read own signed notes
FrontDesk (30)
None
MA / RN (40)
Read; create draft (scribe-assisted)
Provider (50)
Full CRUD on own notes; sign/correct/retract
PracticeMgr (70)
Read all org notes
EditAMI (90+)
Schema management
Problem P0
A clinical problem/condition on a patient's problem list. Dual-coded (SNOMED CT + ICD-10-CM). Global entity with SourceOrganizationID for provenance.
A 1:1 container per patient holding all Problem entries. Tracks last review and schema version. Global entity with SourceOrganizationID.
Schema
Field
Type
Required
PK
FK
Notes
ProblemListID
UUID
Yes
Yes
PatientID
UUID
Yes
Patient (1:1)
One list per patient
LastReviewedByUserID
UUID
No
User
LastReviewed
DateTimeUTC
No
SchemaVersion
String(100)
Yes
SourceOrganizationID
UUID
Yes
Organization
Org that created the list
CreatedByUserID
UUID
Yes
User
Audit
CreatedDateTimeUTC
DateTimeUTC
Yes
Audit
UpdatedByUserID
UUID
Yes
User
Audit
UpdatedDateTimeUTC
DateTimeUTC
Yes
Audit
IsDeleted
Bool
Yes
Soft-delete
RBAC
Role (Tier)
Access
Patient (10)
Read own
FrontDesk (30)
None
MA / RN (40)
Read
Provider (50)
Read & review (set LastReviewed)
PracticeMgr (70)
Read
EditAMI (90+)
Schema management
ScribeSession P0
An ambient-scribe recording session attached to an encounter. Captures consent, audio storage, language, and session lifecycle.
Schema
Field
Type
Required
PK
FK
Notes
ScribeSessionID
UUID
Yes
Yes
EncounterID
UUID
Yes
Encounter
StartedByUserID
UUID
Yes
User
ConsentCaptured
Bool
Yes
Must be true to proceed
ConsentMethod
String(50)
Yes
verbal-recorded | written | portal-pre-consent
Started
DateTimeUTC
Yes
Ended
DateTimeUTC
No
AudioStorageUrl
String
No
Blob storage URI
AudioRetentionDays
Int
Yes
Default 365, max 3650
LanguageCode
String(50)
Yes
BCP-47 (e.g. en-US, es-MX)
SessionStatus
String(50)
Yes
recording | processing | ready | failed
OrganizationID
UUID
Yes
Organization
Partition key
CreatedByUserID
UUID
Yes
User
Audit
CreatedDateTimeUTC
DateTimeUTC
Yes
Audit
UpdatedByUserID
UUID
Yes
User
Audit
UpdatedDateTimeUTC
DateTimeUTC
Yes
Audit
IsDeleted
Bool
Yes
Soft-delete
RBAC
Role (Tier)
Access
Patient (10)
None (audio is clinician-side)
FrontDesk (30)
None
MA / RN (40)
Start/stop session (scribe role)
Provider (50)
Full CRUD on own sessions
PracticeMgr (70)
Read all org sessions
EditAMI (90+)
Schema management
ScribeUtterance P0
An individual ASR-transcribed speech segment within a scribe session, with speaker diarization and confidence scoring.
Schema
Field
Type
Required
PK
FK
Notes
ScribeUtteranceID
UUID
Yes
Yes
ScribeSessionID
UUID
Yes
ScribeSession
SpeakerUserID
UUID
No
User
Optional; null for patient/family/unknown
SpeakerLabel
String(50)
Yes
clinician | patient | family | staff | unknown
StartOffsetMilliseconds
Int
Yes
Offset from session start
EndOffsetMilliseconds
Int
Yes
Transcript
Text
Yes
ASR output text
LanguageCode
String(50)
Yes
BCP-47
Confidence
Decimal
Yes
0.0000 - 1.0000
OrganizationID
UUID
Yes
Organization
Partition key
CreatedByUserID
UUID
Yes
User
Audit
CreatedDateTimeUTC
DateTimeUTC
Yes
Audit
UpdatedByUserID
UUID
Yes
User
Audit
UpdatedDateTimeUTC
DateTimeUTC
Yes
Audit
IsDeleted
Bool
Yes
Soft-delete
RBAC
Role (Tier)
Access
Patient (10)
None
FrontDesk (30)
None
MA / RN (40)
Read (scribe role)
Provider (50)
Read own session utterances
PracticeMgr (70)
Read all org utterances
EditAMI (90+)
Schema management
ScribeStructuredOutput P0
An LLM-generated structured proposal (note section, problem add/resolve, medication change, etc.) derived from utterances.
Full provenance: links to source utterance range, model name/version, and DSI flag per HTI-1.
PK of the target entity (Problem, EncounterNote, etc.)
OrganizationID
UUID
Yes
Organization
Partition key
CreatedByUserID
UUID
Yes
User
Audit
CreatedDateTimeUTC
DateTimeUTC
Yes
Audit
UpdatedByUserID
UUID
Yes
User
Audit
UpdatedDateTimeUTC
DateTimeUTC
Yes
Audit
IsDeleted
Bool
Yes
Soft-delete
RBAC
Role (Tier)
Access
Patient (10)
None
FrontDesk (30)
None
MA / RN (40)
Read
Provider (50)
Read & review (accept/reject/edit) own session outputs
PracticeMgr (70)
Read all org outputs
EditAMI (90+)
Schema management
ScribeReviewState P0
The clinician's review decision on a ScribeStructuredOutput. Immutable audit record of accept/reject/edit actions.
Schema
Field
Type
Required
PK
FK
Notes
ScribeReviewStateID
UUID
Yes
Yes
ScribeStructuredOutputID
UUID
Yes
ScribeStructuredOutput
ReviewerUserID
UUID
Yes
User
ReviewAction
String(50)
Yes
accept | accept-edited | reject | defer | undo
EditedJson
Text
No
Modified payload (when accept-edited)
ReviewerComment
Text
No
Reviewed
DateTimeUTC
Yes
OrganizationID
UUID
Yes
Organization
Partition key
CreatedByUserID
UUID
Yes
User
Audit
CreatedDateTimeUTC
DateTimeUTC
Yes
Audit
UpdatedByUserID
UUID
Yes
User
Audit
UpdatedDateTimeUTC
DateTimeUTC
Yes
Audit
IsDeleted
Bool
Yes
Soft-delete
RBAC
Role (Tier)
Access
Patient (10)
None
FrontDesk (30)
None
MA / RN (40)
Read
Provider (50)
Create & read own reviews
PracticeMgr (70)
Read all org reviews
EditAMI (90+)
Schema management
Trust Tier Assignments
Trust tiers govern the level of authentication and authorization required to read or write each entity. tier-1 = patient-self / public-record; tier-2 = clinician of record; tier-3 = privileged role (admin, compliance officer, break-glass).
Entity
Read
Write
Notes
Encounter
tier-2
tier-2
Patient-self (tier-1) via portal; outside-org access via authorization-chain only
EncounterNote (signed)
tier-1
tier-2
Patient sees signed notes in portal
EncounterNote (draft)
tier-2
tier-2
Drafts are clinician-only until signed
Problem
tier-1
tier-2
Patient sees their own; cross-org reads via authorization-chain
ProblemList
tier-1
tier-2
Same as Problem
ScribeSession
tier-2
tier-2
Audio storage; never patient-readable directly (transcript only)
ScribeUtterance
tier-2
tier-2
Patient-readable transcript section behind tier-1 once note is signed
ScribeStructuredOutput
tier-2
tier-2
Reviewable by clinician of record only
ScribeReviewState
tier-3
tier-2
Compliance reviews require tier-3
RBAC Permission Thresholds
Role
Capabilities
Clinician (MD / DO / PA / NP)
Start/end scribe; review proposals; sign EncounterNote; write-back to global Problem/ProblemList/Allergy/Medication; retract within 24h
Every AI-generated clinical proposal maintains a full chain of provenance from raw audio to the final written-back entity.
graph TD
A[Audio Stream] --> B[ScribeSession]
B --> C[ASR Engine]
C --> D[ScribeUtterance 1..N]
D --> E[LLM Structured Extraction]
E --> F[ScribeStructuredOutput]
F -->|ModelName + ModelVersion| G[DSI Transparency Label]
F -->|EvidenceUtteranceFrom/To| D
F --> H{Clinician Review}
H -->|accept| I[ScribeReviewState: accept]
H -->|accept-edited| J[ScribeReviewState: accept-edited]
H -->|reject| K[ScribeReviewState: reject]
H -->|defer| L[ScribeReviewState: defer]
I --> M[Write-back to EncounterNote / Problem / etc.]
J --> M
M -->|WrittenBackEntityID| N[Target Entity]
Functional Requirements
P0 The system shall create Encounters from completed Appointments with type, status, and provider linkage.
P0 The system shall support SOAP and APSO note formats with draft/in-review/signed/corrected/retracted lifecycle.
P0 The system shall version EncounterNotes using break.feature.bug.buildtimestamp format, preserving all prior versions.
P0 The system shall maintain a longitudinal ProblemList per patient (1:1) with SNOMED CT + ICD-10-CM dual coding.
P0 The system shall track Problem verification status (provisional, confirmed, refuted, entered-in-error) and clinical status (active, inactive, resolved).
P0 The system shall capture patient consent (verbal-recorded, written, or portal-pre-consent) before starting any ScribeSession.
P0 The system shall transcribe audio into ScribeUtterances with speaker diarization, BCP-47 language codes, and ASR confidence scores.
P0 The system shall generate ScribeStructuredOutputs from utterances with full provenance (evidence utterance range, model name/version, DSI flag).
P0 The system shall require clinician review (accept/accept-edited/reject/defer) of every ScribeStructuredOutput before write-back.
P0 The system shall write back accepted ScribeStructuredOutputs to target entities (EncounterNote, Problem, etc.) and record WrittenBackEntityID.
P1 The system shall support undo of accepted scribe outputs within a configurable window (default 5 minutes).
P1 The system shall enforce audio retention policies (default 365 days, max 3650) with automated purge.
P2 The system shall provide a scribe accuracy dashboard showing accept/reject rates, edit frequency, and confidence calibration per model.
Non-Functional Requirements
Latency: Scribe structured output must appear within 5 seconds of utterance end for real-time assist.
Audio Storage: Audio blobs stored in HIPAA-compliant blob storage with encryption at rest; retention enforced by lifecycle policy.
HIPAA: All clinical text (notes, transcripts, problems) encrypted at rest (AES-256) and in transit (TLS 1.2+).
DSI Compliance: Every ScribeStructuredOutput must carry ModelName + ModelVersion per ONC HTI-1 Decision Support Intervention requirements.
Concurrency: Support 20 simultaneous scribe sessions per organization without ASR degradation.
Audit Trail: Every note status change, problem mutation, and scribe review action is immutably logged.
Retention: Clinical notes and problem lists retained for minimum 7 years; encounter records for 10 years.
Accessibility: Note editor must meet WCAG 2.1 AA; scribe review UI must be keyboard-navigable.
icApplication Overrides
Stack, project layout, naming, default and override component bindings for scribe-specific surfaces, versioning with worked example, environment cascade, and RBAC enforcement.
Shared generation map. The IC platform code-gen flow, default bindings, environment cascade, RBAC model, and CLI commands are identical across all modules. See the IC Reference for the canonical shared reference. This section covers only Clinical Documentation-specific content.
Canonical Framings (binding for this module) P0
Clinical Data is Global. The generated DDL for Problem and ProblemList emits noOrganizationID column and instead emits SourceOrganizationID. The scaffold respects DEC-RH-002.
Patients ARE Users. The generated PatientID foreign key references the same primary key as UserID. See DEC-RH-005.
rev.health as the Comprehensive Source. Every code-generated write-back path stamps SourceOrganizationID on the global clinical fact, so the longitudinal record converges across every practice the patient visits on the platform.
Technology Stack P0
The shared platform stack (Cosmos DB, Redis, IC-generated API, Angular 21, SQS+SNS, OpenTelemetry, etc.) is documented in the IC Reference. Module-specific additions:
Concern
Choice
Notes
Backend language
C# / .NET 9
icApplication-generated services per IC convention
Object storage (audio)
S3 (SSE-KMS, per-tenant Azure Key Vault CMK)
ScribeSession.AudioStorageUrl points here; bucket per region
ASR (transcription)
Vendor-agnostic; pluggable via IScribeTranscriptionProvider
Vendor-agnostic; pluggable via IScribeStructuredExtractionProvider. BAA required.
v1 candidates: Anthropic Claude / OpenAI GPT / Google MedLM, all behind BAA + zero-retention agreements
Build / CI
Azure DevOps
icApplication generator runs on PR merge to main
LLM/ASR vendor independence: the platform binds against IScribeTranscriptionProvider and IScribeStructuredExtractionProvider interfaces. Swapping vendors is a configuration change, not a code change. Every vendor signs a HIPAA BAA, and contracts include zero-retention clauses where the vendor's terms allow.
Project Directory Layout P0
This module uses a non-standard directory layout; the standard skeleton is documented in the IC Reference.
The Clinical Documentation module registers override bindings for fields where the default scalar component is insufficient. These overrides are declared in ic-application.json:
Field / context
Override Component
Why override
ScribeSession (any field) on the encounter shell
ic-ng21-scribe-audio-capture
Audio capture is a stateful media component; the default scalar bindings cannot drive the WebRTC + consent flow
ScribeUtterance list per session
ic-ng21-scribe-transcript-viewer
Diarized transcript with click-to-play; the default list binding does not provide the audio scrubber
ScribeStructuredOutput list (review queue)
ic-ng21-scribe-review-panel
Review queue with accept/edit/reject actions and inline evidence playback; replaces the generic table binding
ScribeStructuredOutput (single proposal)
ic-ng21-scribe-writeback-action
Write-back action button with destination preview (e.g., "Add to Problem List") and confirmation modal
Versioning — Worked Example for ProblemList Schema Bump P0
IC convention: break.feature.bug.buildtimestamp. break increments on incompatible changes (column drop or rename, type narrowing); feature increments on additive changes (new column, new index); bug increments on bug-fix-only churn; buildtimestamp is the UTC build clock.
Suppose ProblemList ships at v1.0.0.20270115T1200Z. A subsequent feature adds a PatientReviewedDateTimeUTC field to record when the patient last reviewed their own list. This is an additive change.
Step
Action
Resulting NoteVersionString50
1
Baseline
1.0.0.20270115T1200Z
2
Add nullable column PatientReviewedDateTimeUTC TIMESTAMPTZ via additive migration
(Hypothetical) Rename column to PatientReviewedAtDateTimeUTC — a breaking change
2.0.0.20270301T1200Z (break increment; v1.x view retained for backwards-compat reads)
The Cosmos DB pattern is to deploy a backwards-compatible container at the previous major (global-clinical-facts-v1) so existing API consumers continue to read the prior shape during the rollover window. The SchemaVersionString50 on each document records the schema active at write time.
Design-partner clinic dogfooding with synthetic patients; full vendor + BAA
Manual go from product owner
Prod
Live patient data; customer-managed encryption keys; per-region S3 audio buckets
Manual go + on-call confirmation
Clinical Documentation RBAC notes
Global clinical facts. Cosmos partition-key isolation is not applied to global containers (Problem, ProblemList) — see DEC-RH-007. The ProblemListService wraps every read of a global clinical fact in an authorization-chain check and a read-access audit emission.
Tier-3 actions. Compliance read-only of drafts; break-glass cross-org reads require WebAuthn step-up authentication and produce a tier-3 audit row.
Cross-Module Links
Scheduling — Encounter created from completed Appointment; AppointmentID FK.
Coding & CDS — Diagnosis/Procedure entities link to Encounter; CDS rules fire on problem-list changes.
Eligibility — PriorAuth links to EncounterID for clinical justification.
Patient Portal — Patients view signed notes and problem list via portal.