RoundsCorrowmere Clinics · Estmark synthetic data · seed 23

Ask

Questions are answered from the same definitions the operator uses. When a word has two meanings in the group, both answers come back, each with its owner, version and SQL.

How many no-shows last week?How many active patients do we have?Late cancellations todayAbnormal results this week

'Late cancellation' has 2 definitions and no canonical one: operations (Head of operations): 246 appointments; charter (Head of patient experience): 280 appointments. Which one do you mean?

Operations meaning

246

246 appointments

Head of operations (operations) · operations v1 · today (16 Nov 2026)

Cancelled less than operations_hours before the start.

SELECT a.id AS appointment_id, a.clinic_id, a.start_at, a.cancelled_at
FROM appointments a
WHERE a.cancelled_at <= TIMESTAMP '2026-11-16 13:00:00' AND a.cancelled_at > a.start_at - to_hours(24)
  AND a.start_at >= TIMESTAMP '2026-11-16 00:00:00' AND a.start_at < TIMESTAMP '2026-11-16 13:00:00'

Charter meaning

280

280 appointments

Head of patient experience (patient experience) · charter v1 · today (16 Nov 2026)

Cancelled less than charter_hours before the start.

SELECT a.id AS appointment_id, a.clinic_id, a.start_at, a.cancelled_at
FROM appointments a
WHERE a.cancelled_at <= TIMESTAMP '2026-11-16 13:00:00' AND a.cancelled_at > a.start_at - to_hours(48)
  AND a.start_at >= TIMESTAMP '2026-11-16 00:00:00' AND a.start_at < TIMESTAMP '2026-11-16 13:00:00'