Patient Chart Service — Event Schemas
Status: populated Owner: TBD Last updated: 2026-04-17 Companion: Service Template · 04 Event-Driven · NAMING
All events follow the platform EventEnvelope schema (frozen by F01). NATS stream: PATIENT_CHART; subject format patient_chart.{aggregate}.{event}.v{N}. All events carry tenantId, patientId, and correlationId.
1. Produced events
| Subject | Version | Retention class | Schema |
|---|---|---|---|
patient_chart.problem.added.v1 | v1 | clinical-7y | §2.1 |
patient_chart.problem.updated.v1 | v1 | clinical-7y | §2.2 |
patient_chart.problem.resolved.v1 | v1 | clinical-7y | §2.3 |
patient_chart.problem.inactivated.v1 | v1 | clinical-7y | §2.4 |
patient_chart.problem.entered_in_error.v1 | v1 | clinical-7y | §2.5 |
patient_chart.allergy.added.v1 | v1 | clinical-7y | §3.1 |
patient_chart.allergy.updated.v1 | v1 | clinical-7y | §3.2 |
patient_chart.allergy.inactivated.v1 | v1 | clinical-7y | §3.3 |
patient_chart.allergy.entered_in_error.v1 | v1 | clinical-7y | §3.4 |
patient_chart.vitals.recorded.v1 | v1 | clinical-7y | §4.1 |
patient_chart.vitals.updated.v1 | v1 | clinical-7y | §4.2 |
patient_chart.vitals.abnormal_flagged.v1 | v1 | clinical-7y | §4.3 |
patient_chart.note.created.v1 | v1 | clinical-7y | §5.1 |
patient_chart.note.updated_draft.v1 | v1 | operational-90d | §5.2 |
patient_chart.note.signed.v1 | v1 | clinical-7y | §5.3 |
patient_chart.note.cosign_requested.v1 | v1 | operational-90d | §5.4 |
patient_chart.note.cosigned.v1 | v1 | clinical-7y | §5.5 |
patient_chart.note.addendum_created.v1 | v1 | clinical-7y | §5.6 |
patient_chart.note.entered_in_error.v1 | v1 | clinical-7y | §5.7 |
patient_chart.note.ai_accepted.v1 | v1 | clinical-7y | §5.8 |
patient_chart.chart.snapshot_exported.v1 | v1 | audit-3y | §6.1 |
patient_chart.chart.item_opened.v1 | v1 | audit-1y | §6.2 |
patient_chart.breakglass.invoked.v1 | v1 | audit-7y | §7.1 |
patient_chart.sensitive_access.recorded.v1 | v1 | audit-7y | §7.2 |
Retention classes defined in 04 Event-Driven Architecture.
2. Problem events
2.1 patient_chart.problem.added.v1
{
"envelope": { "eventId": "evt_...", "eventType": "patient_chart.problem.added.v1", "occurredAt": "...", "tenantId": "ten_...", "correlationId": "...", "causationId": "..." },
"data": {
"problemId": "prb_...",
"patientId": "pat_...",
"encounterId": "enc_... | null",
"code": { "codings": [{ "system": "...", "code": "...", "display": "..." }], "text": "..." },
"clinicalStatus": "active",
"verificationStatus": "confirmed",
"onsetDate": "2024-06-12 | null",
"severity": "mild|moderate|severe|null",
"recordedBy": "prc_...",
"recordedAt": "...",
"version": 1
}
}
2.2 patient_chart.problem.updated.v1
data includes problemId, previousVersion, newVersion, patch: { code?, severity?, verificationStatus?, onsetDate? }, updatedBy, updatedAt.
2.3 patient_chart.problem.resolved.v1
data includes problemId, version, abatementDate, reason?, resolvedBy, resolvedAt.
2.4 patient_chart.problem.inactivated.v1
data includes problemId, version, reason?, inactivatedBy, inactivatedAt.
2.5 patient_chart.problem.entered_in_error.v1
data includes problemId, reason, actor, at.
3. Allergy events
3.1 patient_chart.allergy.added.v1
{
"envelope": { ... },
"data": {
"allergyId": "alg_...",
"patientId": "pat_...",
"substance": { "codings": [...], "text": "..." },
"categories": ["medication"],
"clinicalStatus": "active",
"verificationStatus": "confirmed",
"reactions": [{ "manifestation": [...], "severity": "moderate" }],
"highestSeverity": "moderate",
"recordedBy": "prc_...",
"recordedAt": "...",
"version": 1,
"assertion": "none|nka|nkda"
}
}
3.2 allergy.updated.v1, 3.3 allergy.inactivated.v1, 3.4 allergy.entered_in_error.v1
Analogous to §2.2–2.5 with allergy shape.
4. Vitals events
4.1 patient_chart.vitals.recorded.v1
{
"envelope": { ... },
"data": {
"vitalsSetId": "vit_...",
"patientId": "pat_...",
"encounterId": "enc_... | null",
"collectionLocationId": "loc_... | null",
"recordedBy": "prc_...",
"recordedAt": "...",
"method": "manual|device",
"deviceId": "dev_... | null",
"measurements": [
{ "observationId": "obs_...", "code": { "system": "http://loinc.org", "code": "8480-6" }, "value": 142, "unit": "mm[Hg]", "abnormalFlag": "H" }
]
}
}
4.2 vitals.updated.v1
data includes vitalsSetId, previousVersion, newVersion, measurementsPatch, reason.
4.3 vitals.abnormal_flagged.v1
Fires per abnormal measurement; data: observationId, vitalsSetId, code, value, unit, flag, severity.
5. Clinical note events
5.1 patient_chart.note.created.v1
{
"envelope": { ... },
"data": {
"noteId": "note_...",
"patientId": "pat_...",
"encounterId": "enc_... | null",
"templateId": "soap.v1",
"authorId": "prc_...",
"createdAt": "...",
"sectionCount": 4,
"status": "draft",
"version": 1
}
}
5.2 note.updated_draft.v1 — incremental; retention short; sectionsChanged[] summary only (no body bytes).
5.3 note.signed.v1 — data: noteId, signedBy, signedAt, signatureMethod, documentReferenceId? (if PDF generated).
5.4 note.cosign_requested.v1 — data: noteId, requestedBy, cosignerId, dueBy?.
5.5 note.cosigned.v1 — data: noteId, cosignerId, cosignedAt, outcome: approved|rejected.
5.6 note.addendum_created.v1 — data: noteId, addendumId, authorId, reason, at.
5.7 note.entered_in_error.v1 — data: noteId, reason, actor, at.
5.8 note.ai_accepted.v1 — data: noteId, sectionKey, feature: "docassist"|"stt"|"summarize"|"templatefill", modelVersion, actor, acceptedAt, contentHash.
6. Chart composition events
6.1 chart.snapshot_exported.v1 — data: patientId, format, exportedBy, at, documentReferenceId?, purposeOfUse?.
6.2 chart.item_opened.v1 — data: patientId, itemType, itemId, openedBy, at.
7. Access events
7.1 breakglass.invoked.v1 — data: accessId, patientId, reason, durationMinutes, actor, at.
7.2 sensitive_access.recorded.v1 — data: accessId, patientId, segment, actor, at, policyResult.
8. Consumed events
| Event | Producer | Handler action |
|---|---|---|
registration.patient.merged.v1 | registration-service | Rewrite aggregate patientId references to surviving patient; emit problem.updated/allergy.updated as appropriate |
registration.encounter.created.v1 | registration-service | Warm encounter cache for banner |
gdpr.subject_request.received.v1 | platform | Anonymize author display fields; keep coded clinical content unless erasure-of-clinical-content is authorized |
9. Schema registration & compatibility
All envelopes register in the platform schema registry with JSON Schema. Breaking field removals require v2 subject and dual-publish for ≥ 14 days before v1 is retired.
10. Open Questions
- Should
note.ai_accepted.v1retention match clinical (7y) since it is part of the legal audit trail? Current proposal: yes — retention =clinical-7y.