Seraya Psikologi — Documentation

Booking and payment MVP · Implementation baseline · 96 ADR

61. Regenerate Only Uncommitted Future Availability Slots

Status

Accepted for the MVP working model; exact scheduler trigger/backfill cadence and invalid-slot client messaging remain open.

Context

AvailabilityRule/Exception and ServiceOfferingRevision are sources for future capacity, but generated AvailabilitySlot, SlotHold, and Appointment have different commitments. Rebuilding every future row would risk deleting an active hold or changing a client-facing commitment.

Decision

AvailabilityException overrides AvailabilityRule for the same operational date/range. A valid psychologist/Admin source change or activated ServiceOfferingRevision applies to future generation. Regeneration may create/update/withdraw only future AvailabilitySlot records that are not held and not linked to an Appointment.

All generation and withdrawal operations are idempotent and audited. Confirmed Appointment, Payment, OfferSnapshot, PackagePurchase, and historical source records are not edited in place.

Consequences

Positive:

Costs and constraints:

Open follow-up

Define scheduler trigger/backfill cadence, client messaging for withdrawn/invalid slots, and Admin resolution when an active hold's source becomes invalid.