import type { Patient } from './patient';

/**
 * An appointment purpose is any treatment-type code selectable in the appointment
 * context (see the treatment catalog with `?context=appointment`). Kept as a
 * string so the set is driven by the DB catalog rather than a hardcoded union.
 */
export type AppointmentPurpose = string;

export interface AppointmentColumnProvider {
  userId: string;
  name: string;
  hasWorkingHours: boolean;
  dayBlocks: { startMinute: number; endMinute: number }[];
}

export interface AppointmentRecord {
  id: string;
  organizationId: string;
  patientId: string;
  providerUserId: string;
  startAt: string;
  endAt: string;
  purpose: string;
  patient: Pick<Patient, 'id' | 'firstName' | 'lastName' | 'mobile'>;
  /** True when a treatment record is linked to this appointment. */
  hasTreatment?: boolean;
}
