- Add appointment type categories matching insurance claim form (recall, filling, pedo, dentures, implant, endo, crown, perio, extraction, ortho, consultation, emergency, other) - Auto-infer appointment type from CDT codes with priority rules (endo > implant > crown > ...) - typeLocked flag prevents auto-overwrite when user manually sets type - Show appointment type label and procedure codes on schedule cards - Background sync on /day route retroactively fixes stale appointment types - Fix PUT /api/claims/:id to save claimFiles (previously silently dropped) - Auto-link AppointmentFile records to ClaimFile when claim is created or updated - Fix D5750 (denture reline) CDT range to map correctly to dentures category - Fix typeLocked Zod rejection in appointment update route Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
4.1 KiB
TypeScript
36 lines
4.1 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { StringFieldUpdateOperationsInputObjectSchema as StringFieldUpdateOperationsInputObjectSchema } from './StringFieldUpdateOperationsInput.schema';
|
|
import { DateTimeFieldUpdateOperationsInputObjectSchema as DateTimeFieldUpdateOperationsInputObjectSchema } from './DateTimeFieldUpdateOperationsInput.schema';
|
|
import { BoolFieldUpdateOperationsInputObjectSchema as BoolFieldUpdateOperationsInputObjectSchema } from './BoolFieldUpdateOperationsInput.schema';
|
|
import { NullableStringFieldUpdateOperationsInputObjectSchema as NullableStringFieldUpdateOperationsInputObjectSchema } from './NullableStringFieldUpdateOperationsInput.schema';
|
|
import { PatientStatusSchema } from '../enums/PatientStatus.schema';
|
|
import { EnumPatientStatusFieldUpdateOperationsInputObjectSchema as EnumPatientStatusFieldUpdateOperationsInputObjectSchema } from './EnumPatientStatusFieldUpdateOperationsInput.schema';
|
|
import { PatientUpdateOneRequiredWithoutAppointmentsNestedInputObjectSchema as PatientUpdateOneRequiredWithoutAppointmentsNestedInputObjectSchema } from './PatientUpdateOneRequiredWithoutAppointmentsNestedInput.schema';
|
|
import { StaffUpdateOneWithoutAppointmentsNestedInputObjectSchema as StaffUpdateOneWithoutAppointmentsNestedInputObjectSchema } from './StaffUpdateOneWithoutAppointmentsNestedInput.schema';
|
|
import { AppointmentProcedureUpdateManyWithoutAppointmentNestedInputObjectSchema as AppointmentProcedureUpdateManyWithoutAppointmentNestedInputObjectSchema } from './AppointmentProcedureUpdateManyWithoutAppointmentNestedInput.schema';
|
|
import { ClaimUpdateManyWithoutAppointmentNestedInputObjectSchema as ClaimUpdateManyWithoutAppointmentNestedInputObjectSchema } from './ClaimUpdateManyWithoutAppointmentNestedInput.schema';
|
|
import { AppointmentFileUpdateManyWithoutAppointmentNestedInputObjectSchema as AppointmentFileUpdateManyWithoutAppointmentNestedInputObjectSchema } from './AppointmentFileUpdateManyWithoutAppointmentNestedInput.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
title: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
|
date: z.union([z.coerce.date(), z.lazy(() => DateTimeFieldUpdateOperationsInputObjectSchema)]).optional(),
|
|
startTime: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
|
endTime: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
|
type: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
|
typeLocked: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
|
notes: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
|
procedureCodeNotes: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
|
|
status: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
|
|
movedByAi: z.union([z.boolean(), z.lazy(() => BoolFieldUpdateOperationsInputObjectSchema)]).optional(),
|
|
createdAt: z.union([z.coerce.date(), z.lazy(() => DateTimeFieldUpdateOperationsInputObjectSchema)]).optional(),
|
|
eligibilityStatus: z.union([PatientStatusSchema, z.lazy(() => EnumPatientStatusFieldUpdateOperationsInputObjectSchema)]).optional(),
|
|
patient: z.lazy(() => PatientUpdateOneRequiredWithoutAppointmentsNestedInputObjectSchema).optional(),
|
|
staff: z.lazy(() => StaffUpdateOneWithoutAppointmentsNestedInputObjectSchema).optional(),
|
|
procedures: z.lazy(() => AppointmentProcedureUpdateManyWithoutAppointmentNestedInputObjectSchema).optional(),
|
|
claims: z.lazy(() => ClaimUpdateManyWithoutAppointmentNestedInputObjectSchema).optional(),
|
|
files: z.lazy(() => AppointmentFileUpdateManyWithoutAppointmentNestedInputObjectSchema).optional()
|
|
}).strict();
|
|
export const AppointmentUpdateWithoutUserInputObjectSchema: z.ZodType<Prisma.AppointmentUpdateWithoutUserInput> = makeSchema() as unknown as z.ZodType<Prisma.AppointmentUpdateWithoutUserInput>;
|
|
export const AppointmentUpdateWithoutUserInputObjectZodSchema = makeSchema();
|