- Add movedByAi boolean column to Appointment table (default false) - reschedule-graph: set movedByAi=true when AI moves an appointment - PATCH /api/appointments/:id/confirm endpoint clears the movedByAi flag - Schedule grid: show teal AI badge on appointment cards where movedByAi=true - Right-click context menu: 'Manually Confirmed' removes the AI badge via the confirm endpoint Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
1.7 KiB
TypeScript
28 lines
1.7 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { PatientStatusSchema } from '../enums/PatientStatus.schema';
|
|
import { ClaimUncheckedCreateNestedManyWithoutAppointmentInputObjectSchema as ClaimUncheckedCreateNestedManyWithoutAppointmentInputObjectSchema } from './ClaimUncheckedCreateNestedManyWithoutAppointmentInput.schema';
|
|
import { AppointmentFileUncheckedCreateNestedManyWithoutAppointmentInputObjectSchema as AppointmentFileUncheckedCreateNestedManyWithoutAppointmentInputObjectSchema } from './AppointmentFileUncheckedCreateNestedManyWithoutAppointmentInput.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
id: z.number().int().optional(),
|
|
patientId: z.number().int(),
|
|
userId: z.number().int(),
|
|
staffId: z.number().int(),
|
|
title: z.string(),
|
|
date: z.coerce.date(),
|
|
startTime: z.string(),
|
|
endTime: z.string(),
|
|
type: z.string(),
|
|
notes: z.string().optional().nullable(),
|
|
procedureCodeNotes: z.string().optional().nullable(),
|
|
status: z.string().optional(),
|
|
movedByAi: z.boolean().optional(),
|
|
createdAt: z.coerce.date().optional(),
|
|
eligibilityStatus: PatientStatusSchema.optional(),
|
|
claims: z.lazy(() => ClaimUncheckedCreateNestedManyWithoutAppointmentInputObjectSchema).optional(),
|
|
files: z.lazy(() => AppointmentFileUncheckedCreateNestedManyWithoutAppointmentInputObjectSchema).optional()
|
|
}).strict();
|
|
export const AppointmentUncheckedCreateWithoutProceduresInputObjectSchema: z.ZodType<Prisma.AppointmentUncheckedCreateWithoutProceduresInput> = makeSchema() as unknown as z.ZodType<Prisma.AppointmentUncheckedCreateWithoutProceduresInput>;
|
|
export const AppointmentUncheckedCreateWithoutProceduresInputObjectZodSchema = makeSchema();
|