Skip to content

Clinical-notes — events

Per-module slice of docs/events-catalog.md (auto-generated). Update both files when adding or removing events.

Published

One event per note type. The publish call passes a variable resolved from the _NOTE_TYPE_TO_EVENT map in service.py, so the catalog attributes these from the EventType constants referenced in that file.

EventWhenConsumers
clinical_notes.diagnosis_createdA diagnosis note is createdpatient_timeline
clinical_notes.treatment_createdA treatment note is createdpatient_timeline
clinical_notes.plan_createdA treatment-plan note is createdpatient_timeline
clinical_notes.administrative_createdAn administrative note is createdpatient_timeline
clinical_notes.appointment_clinical_createdA clinical note captured on an appointment
clinical_notes.appointment_administrative_createdAn administrative note captured on an appointment

Known gap (audit event-bus #7): the two appointment_* note events have no subscriber, so notes captured on an appointment do not currently reach the patient timeline. Tracked separately from this docs backfill.

Payloads carry clinic_id, patient_id, and a body_excerpt.

Subscribed

This module does not subscribe to any events (get_event_handlers returns {}).

Adding a new event

  1. Add the constant to backend/app/core/events/types.py (EventType).
  2. Publish from a service method, after the DB commit succeeds.
  3. Add the row to the table above.
  4. Run python backend/scripts/generate_catalogs.py to refresh the global catalog.