Freeze the product snapshot
Build treatment obligations and dependencies from the purchased BOM and scheduling rules.
Design specification · 2026-07-26
A durable model for packages, repeated treatments, partial completion, equipment disruption, rescheduling, controlled overbooking, and extended clinic hours.
e3ae0ceSimulation · Default view
The key operational question is when capacity is consumed. A purchase creates treatment obligations; resources are consumed only by a HELD promise and protected with customer consent at CONFIRMED.
Build treatment obligations and dependencies from the purchased BOM and scheduling rules.
Explain feasible slots without consuming capacity.
Protect the required staff, room, and equipment for a bounded time.
Persist the decision snapshot; later policy changes do not silently rewrite it.
Commit one start time where staff, room, and equipment all fit.
Promise an arrival interval while the clinic controls the actual service order.
Promise a date and priority rather than an exact start time.
History · Decision provenance
This companion explains the design; it does not replace its normative Markdown source.
The normative design fixed service ownership, promise states, capacity semantics, policy snapshots, and recovery invariants.
The implementation-plan visual limits present execution to catalog projection and purchase-to-plan convergence.
The companion design and delivery plan define locale, provenance, validation, and publication rules.
Design map · Ownership
Product management owns the BOM and booking rules. Purchasing owns contracts and additional purchases.
Creates obligations from snapshots and owns proposals, holds, confirmations, reassignment, and capacity occupancy.
Source-of-truth completion, refund decisions, complaints, and compensation remain with specialist services.
AppointmentPlan → PlannedTreatment ← AppointmentItem → Appointment. The plan represents the purchased promise, items split fulfillment, and appointments group work into visits.Promise lifecycle
No capacity is consumed. Candidates may disappear before selection.
Capacity is consumed until an explicit expiry. The effective policy snapshot is recorded.
Capacity and customer consent are both present. The promise cannot be silently rewritten.
Policy and capacity
Compile tenant baseline plus clinic override into an immutable, versioned snapshot. Store the version and hash with every consequential decision.
Hard safety ceilings are never relaxed. Optional risk capacity requires explicit policy, explainable scoring, monitoring, and an operator recovery path.
Repeated and staged treatments preserve sequence and minimum/maximum interval rules without merging purchase truth into appointment state.
When disruption forces replanning, keep unaffected visits and resources stable before optimizing convenience.
Disruption and recovery
Equipment outage, staff absence, capacity breach, or changed clinical constraint identifies affected promises.
Stop unsafe new proposals and preserve unaffected confirmed work.
Produce explainable alternatives, obtain consent again, and retain the previous decision history.
Current executable slice