---
title: Appointments
slug: redshift/appointments
icon: {"lucideIcon":"CalendarCheck"}
docTags: 
createdAt: 2026-10-01T12:35:24.380Z
---

Appointment volume, status, and source are the core operational metrics most clinics build first.

### `appointment` — basic appointment information

Note: the view is `appointment` (singular) — not `appointments`.

- `patient_id` → `pet.id`
- `clinic_id` → `clinics.id`, `vet_id` → `vets.id`, `room_id` → `rooms.id`
- `service_id` — likely references `service_packages.id` directly (the primary booked service); `visit_type_id` → `available_services.id`. `information_schema` doesn't expose foreign key intent, so confirm `service_id`'s target against a known appointment before relying on it in a join.
- `occasion` — appointment type (free text)
- `datetime`, `end_datetime`, `duration`
- `status`:
  - `0` = created at clinic
  - `1` = created by client (online request)
  - `2` = created by client (mobile app)
  - `3` = clinic rescheduled
  - `4` = client requested reschedule
  - `5` = confirmed
  - `6` = client cancelled
  - `7` = clinic cancelled
  - `8` = auto created
  - `9` = no show
- `source`:
  - `0` = clinic
  - `1` = web
  - `2` = mobile app
- `recurrence`, `recurrence_parent_id`, `frequency` — recurring-appointment fields not previously documented here
- `confirmed_by`, `confirmation_source`, `last_confirmed_at`, `reconfirmed` — confirmation-flow fields not previously documented here
- `done_at`, `cancellation_reason` — not previously documented here

### `appointment_services` — appointment-to-service link

Not previously documented here. A thin join: `appointment_id`, `service_package_id` → `service_packages.id`.

### `appointment_requests` — online booking requests (web/app)

- `appointment_id` → `appointment.id`
- `status` — `0` = pending, `1` = accepted, `-1` = cancelled

### `appointments_reschedules` — reschedule history

Note: the view is `appointments_reschedules` — the previous spelling ("reshedules") was a typo, not the actual name.

- `appointment_id` → `appointment.id`
- Captures reschedule events, relevant when `appointment.status` is `3` or `4`

### `available_services` — visit types

- `id` referenced by `appointment.visit_type_id`
- `category_id` → `service_categories.id`
