Skip to content

Treatment Plan — events

Scaffolded stub — replace with proper documentation when this module is next touched.

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

Published

EventWhenPayload
treatment_plan.budget_sync_requestedWhen does this fire?Payload keys.
treatment_plan.createdWhen does this fire?Payload keys.
treatment_plan.status_changedWhen does this fire?Payload keys.
treatment_plan.treatment_addedA PlannedTreatmentItem is added to a plan via POST /treatment-plans/{id}/items.plan_id, item_id, treatment_id, clinic_id, patient_id, budget_id (nullable), catalog_item_id (nullable), tooth_number (nullable), surfaces (nullable), unit_price (nullable, decimal-as-string), assigned_professional_id (nullable, snapshot of the doctor responsible for this line).
treatment_plan.treatment_completedWhen does this fire?Payload keys.
treatment_plan.treatment_removedWhen does this fire?Payload keys.

Subscribed

EventHandlerEffect
appointment.completedHandler module path.What it does in response.
budget.acceptedHandler module path.What it does in response.
budget.rejectedHandler module path.What it does in response.
budget.renegotiatedHandler module path.What it does in response.
odontogram.treatment.performedHandler module path.What it does in response.

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(s) above.
  4. Run python backend/scripts/generate_catalogs.py to refresh the global catalog.