Design specification · 2026-07-26

Appointment plans, booking promises, and capacity

A durable model for packages, repeated treatments, partial completion, equipment disruption, rescheduling, controlled overbooking, and extended clinic hours.

Purchase snapshot Tenant policy Item-level fulfillment Customer consent
Normative sourceKorean Markdown design
Visual baselineStarted at commit e3ae0ce
PresentationHybrid · simulation is the default view
Related changePR #185

Simulation · Default view

How a purchase obligation becomes a safe booking promise

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.

01 · PURCHASE

Freeze the product snapshot

Build treatment obligations and dependencies from the purchased BOM and scheduling rules.

02 · PROPOSED

Calculate candidates

Explain feasible slots without consuming capacity.

03 · HELD

Reserve with expiry

Protect the required staff, room, and equipment for a bounded time.

04 · CONFIRMED

Protect the consented promise

Persist the decision snapshot; later policy changes do not silently rewrite it.

FIXED_SLOT

Exact time

Commit one start time where staff, room, and equipment all fit.

ARRIVAL_WINDOW

Arrival range

Promise an arrival interval while the clinic controls the actual service order.

DATE_QUEUE

Date queue

Promise a date and priority rather than an exact start time.

When policy changes: new proposals use the new policy, valid holds survive until expiry, and confirmed appointments retain their original snapshot. A changed promise requires a new proposal and new consent.

History · Decision provenance

Trace the decision, not just the polished screen

This companion explains the design; it does not replace its normative Markdown source.

2026-07-26 · Long-horizon domain design approved

The normative design fixed service ownership, promise states, capacity semantics, policy snapshots, and recovery invariants.

2026-07-26 · Current delivery narrowed to the foundation

The implementation-plan visual limits present execution to catalog projection and purchase-to-plan convergence.

Design map · Ownership

The appointment service owns future scheduling facts

UPSTREAM

Product and purchase

Product management owns the BOM and booking rules. Purchasing owns contracts and additional purchases.

THIS SERVICE

Plans, visits, resources, policy

Creates obligations from snapshots and owns proposals, holds, confirmations, reassignment, and capacity occupancy.

DOWNSTREAM

Treatment, refund, support

Source-of-truth completion, refund decisions, complaints, and compensation remain with specialist services.

Selected model: AppointmentPlan → PlannedTreatment ← AppointmentItem → Appointment. The plan represents the purchased promise, items split fulfillment, and appointments group work into visits.

Promise lifecycle

State names carry capacity and consent semantics

PROPOSED

No capacity is consumed. Candidates may disappear before selection.

HELD

Capacity is consumed until an explicit expiry. The effective policy snapshot is recorded.

CONFIRMED

Capacity and customer consent are both present. The promise cannot be silently rewritten.

Policy and capacity

Tenant defaults may be narrowed by clinic policy

Effective policy

Compile tenant baseline plus clinic override into an immutable, versioned snapshot. Store the version and hash with every consequential decision.

Controlled overbooking

Hard safety ceilings are never relaxed. Optional risk capacity requires explicit policy, explainable scoring, monitoring, and an operator recovery path.

Dependencies

Repeated and staged treatments preserve sequence and minimum/maximum interval rules without merging purchase truth into appointment state.

Minimum change

When disruption forces replanning, keep unaffected visits and resources stable before optimizing convenience.

Disruption and recovery

A safety violation triggers workflow, not silent mutation

Detect

Equipment outage, staff absence, capacity breach, or changed clinical constraint identifies affected promises.

Contain

Stop unsafe new proposals and preserve unaffected confirmed work.

Re-propose

Produce explainable alternatives, obtain consent again, and retain the previous decision history.

Current executable slice

Appointment Plan Foundation stops before booking commitment

IN SCOPE NOW

Projection and convergence

  • Tenant, clinic, and source-authority catalog snapshots
  • Purchase identity to plan, obligations, and dependencies
  • Atomic inbox, plan, and outbox convergence
  • Scope-safe operator reads
ROADMAP

Commitment and operations

  • Appointment items, resources, and slot search
  • PROPOSED, HELD, CONFIRMED, and consent
  • Partial fulfillment, refund, and disruption
  • Solver, overbooking, and extended hours
Foundation is neither booking confirmation nor proof that an outbox message was delivered. The Markdown acceptance commands and current implementation plan remain authoritative.