Seraya Psikologi — Documentation

Booking and payment MVP · Implementation baseline · 96 ADR

92. Finalize Appointment Outcome Timing, Late-arrival, and Correction Window

Status

Accepted. This ADR is the final model for no-show timing, late-arrival handling, and outcome correction on the launch counseling product. It supersedes the open questions in ADR 0015-appointment-outcomes.md (line 40), ADR 0026-entitlement-consumption.md (line 38), ADR 0027-no-show-consumption.md (line 33), ADR 0028-no-show-grace-period.md (line 35), and ADR 0054-outcome-correction-events.md (line 35). It closes TBC-NO-SHOW-01 from PRD-GUIDELINE-REVIEW.md:499. It is compatible with the couple participant model in ADR 0090.

Ringkasan eksekutif (Bahasa Indonesia)

Context

ADR 0015-appointment-outcomes.md:13–20 mendefinisikan completed/no_show sebagai post-session outcomes. ADR 0028-no-show-grace-period.md:11–15 mengizinkan no_show marking 15 menit setelah scheduled start dan langsung mengonsumsi entitlement (ADR 0027). Dengan sesi 60 menit (ADR 0073), konsumsi entitlement terjadi saat masih tersisa 45 menit sesi, sementara late-arrival handling dan correction window belum diputuskan (ADR 0028:33–35, ADR 0054:33–35). PRD-GUIDELINE-REVIEW.md P1-12 (PRD-GUIDELINE-REVIEW.md:400–411) mengangkat kontradiksi ini sebagai blocker.

Pertanyaan yang harus dijawab:

  1. Apakah no_show early operational checkpoint atau terminal post-session outcome?
  2. Kapan no_show dianggap final?
  3. Bagaimana late-arrival ditangani (sesi berlanjut? partial completed? outcome khusus)?
  4. Berapa lama Admin boleh mengoreksi outcome dengan audited OutcomeCorrection?
  5. Apakah no_show selalu konsumsi entitlement, atau berdasarkan durasi attended?
  6. Kapan klien/Admin diberi tahu tentang outcome?

Diskusi multi-perspektif

Operations

Clinical/ethics

Engineering

UX

Decision

Model final menggunakan tiga konsep outcome yang terpisah secara konseptual tapi tetap berasal dari satu enum appointment_outcome:

  1. Early checkpoint (auto-generated pada T+15 jika tidak ada client_arrived): no_show. Locked at marking. Consumes entitlement.
  2. Final outcome (marked by psychologist at end-of-session atau lewat Admin): completed | completed_partial | no_show_late | cancelled (via CancellationDecision). Consumes entitlement kecuali cancelled.
  3. Correction (Admin-only, audited, append-only OutcomeCorrection): up to 7 hari kalender setelah marked_at.

1. Grace period dan auto-checkpoint

2. Late-arrival handling

3. Final outcome enum dan semantics

appointment_outcome:
  - completed            # sesi berjalan ≥60 menit
  - completed_partial    # sesi berjalan 1–59 menit (late arrival atau early end)
  - no_show              # auto-checkpoint T+15, klien tidak datang sebelum T+15
  - no_show_late         # klien datang setelah T+15, sesi berjalan ≥1 menit
  - cancelled            # via CancellationDecision approve

4. Correction window dan OutcomeCorrection

5. Authority

Action Actor Window Notes
Auto-checkpoint no_show system T+15 jika confirmed dan client_arrived_at IS NULL
Record client_arrived psychologist | admin kapan saja sebelum final outcome timestamp dicatat
Record session_ended psychologist | admin kapan saja setelah client_arrived_at (atau scheduled_start jika on-time) timestamp dicatat
Mark final outcome psychologist (assigned) | admin (override) setelah scheduled_start, sebelum OutcomeCorrection window dari auto-checkpoint initial marking
Mark cancelled admin via CancellationDecision sesuai ADR 0051 bukan via late-arrival path
OutcomeCorrection admin only dalam 7 hari kalender dari marked_at audited, append-only

6. Entitlement coupling table

Outcome Entitlement effect Coupling Reversible via OutcomeCorrection dalam 7 hari?
no_show (auto-checkpoint T+15) consumed coupled ya, ke completed/completed_partial jika ada bukti kehadiran
completed consumed coupled ya, ke completed_partial/no_show/no_show_late
completed_partial consumed coupled ya, dengan evidence
no_show_late consumed coupled ya, ke completed/completed_partial jika durasi attended efektif
cancelled (via CancellationDecision) tidak consumed; restored jika valid decoupled di luar scope; CancellationDecision adalah command terpisah

SessionEntitlement.status transisi:

available → scheduled → consumed         # completed, completed_partial, no_show, no_show_late
available → scheduled → available        # cancelled approved (restore jika valid)
consumed → available                     # OutcomeCorrection yang me-restore entitlement (dalam window 7 hari)

7. Notification

Event Recipient Channel Template ID
Auto-checkpoint no_show di T+15 client email no_show_recorded
Auto-checkpoint no_show di T+15 admin in-app + email no_show_admin_alert
client_arrived recorded admin only (in-app) in-app client_arrived_admin
Final outcome marked oleh psikolog client email outcome_finalized
Final outcome marked oleh Admin override client + admin email + in-app outcome_finalized_admin
OutcomeCorrection dalam window 7 hari client email outcome_corrected
OutcomeCorrection di luar window (rejected) admin in-app correction_window_expired

Email outcome_finalized untuk no_show_late menyertakan kalimat: "Sesi Anda tercatat tetap berlangsung setelah waktu mulai yang dijadwalkan. Entitlement sesi ini telah tercatat terpakai sesuai kebijakan; silakan hubungi Admin via WhatsApp jika ada pertanyaan."

Email outcome_corrected netral: tidak menyebut clinical framing; hanya "Pembaruan catatan sesi" dengan old → new outcome dan tanggal koreksi.

Reminder normal 24h/2h (ADR 0052) tidak berubah.

Consequences

Positive:

Costs and constraints:

Open follow-up

Reference