Files
DentalManagementMH07/packages/db/shared/schemas/objects/AppointmentUncheckedUpdateWithoutNpiProviderInput.schema.ts
ff b1932fa3d6 feat: add Provider field to appointment form, drive AI claim automation
Adds an optional Provider (NPI) select to the Edit Appointment form,
sourced from Settings > NPI Providers. The AI "Claim for Column" batch
flow now prefers the appointment's own provider when resolving which
provider Selenium should select on the insurance site (e.g. MassHealth
rendering provider dropdown), falling back to the existing per-procedure
selection, active claim, or first configured provider.

Also resyncs packages/db's committed compiled schema/client artifacts
with their .ts sources — they had drifted out of sync (some untouched
since July), which was silently stripping the new npiProviderId field
via stale .strict() zod schemas.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-20 23:07:10 -04:00

37 lines
4.3 KiB
TypeScript

import * as z from 'zod';
import type { Prisma } from '../../../generated/prisma';
import { IntFieldUpdateOperationsInputObjectSchema as IntFieldUpdateOperationsInputObjectSchema } from './IntFieldUpdateOperationsInput.schema';
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 { AppointmentProcedureUncheckedUpdateManyWithoutAppointmentNestedInputObjectSchema as AppointmentProcedureUncheckedUpdateManyWithoutAppointmentNestedInputObjectSchema } from './AppointmentProcedureUncheckedUpdateManyWithoutAppointmentNestedInput.schema';
import { ClaimUncheckedUpdateManyWithoutAppointmentNestedInputObjectSchema as ClaimUncheckedUpdateManyWithoutAppointmentNestedInputObjectSchema } from './ClaimUncheckedUpdateManyWithoutAppointmentNestedInput.schema';
import { AppointmentFileUncheckedUpdateManyWithoutAppointmentNestedInputObjectSchema as AppointmentFileUncheckedUpdateManyWithoutAppointmentNestedInputObjectSchema } from './AppointmentFileUncheckedUpdateManyWithoutAppointmentNestedInput.schema'
const makeSchema = () => z.object({
id: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
patientId: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
userId: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
staffId: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
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(),
procedures: z.lazy(() => AppointmentProcedureUncheckedUpdateManyWithoutAppointmentNestedInputObjectSchema).optional(),
claims: z.lazy(() => ClaimUncheckedUpdateManyWithoutAppointmentNestedInputObjectSchema).optional(),
files: z.lazy(() => AppointmentFileUncheckedUpdateManyWithoutAppointmentNestedInputObjectSchema).optional()
}).strict();
export const AppointmentUncheckedUpdateWithoutNpiProviderInputObjectSchema: z.ZodType<Prisma.AppointmentUncheckedUpdateWithoutNpiProviderInput> = makeSchema() as unknown as z.ZodType<Prisma.AppointmentUncheckedUpdateWithoutNpiProviderInput>;
export const AppointmentUncheckedUpdateWithoutNpiProviderInputObjectZodSchema = makeSchema();