Files
DentalManagementMH07/packages/db/shared/schemas/objects/NpiProviderWhereInput.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

33 lines
3.0 KiB
TypeScript

import * as z from 'zod';
import type { Prisma } from '../../../generated/prisma';
import { IntFilterObjectSchema as IntFilterObjectSchema } from './IntFilter.schema';
import { StringFilterObjectSchema as StringFilterObjectSchema } from './StringFilter.schema';
import { DateTimeFilterObjectSchema as DateTimeFilterObjectSchema } from './DateTimeFilter.schema';
import { UserScalarRelationFilterObjectSchema as UserScalarRelationFilterObjectSchema } from './UserScalarRelationFilter.schema';
import { UserWhereInputObjectSchema as UserWhereInputObjectSchema } from './UserWhereInput.schema';
import { ClaimListRelationFilterObjectSchema as ClaimListRelationFilterObjectSchema } from './ClaimListRelationFilter.schema';
import { PaymentListRelationFilterObjectSchema as PaymentListRelationFilterObjectSchema } from './PaymentListRelationFilter.schema';
import { CommissionBatchListRelationFilterObjectSchema as CommissionBatchListRelationFilterObjectSchema } from './CommissionBatchListRelationFilter.schema';
import { AppointmentProcedureListRelationFilterObjectSchema as AppointmentProcedureListRelationFilterObjectSchema } from './AppointmentProcedureListRelationFilter.schema';
import { AppointmentListRelationFilterObjectSchema as AppointmentListRelationFilterObjectSchema } from './AppointmentListRelationFilter.schema'
const npiproviderwhereinputSchema = z.object({
AND: z.union([z.lazy(() => NpiProviderWhereInputObjectSchema), z.lazy(() => NpiProviderWhereInputObjectSchema).array()]).optional(),
OR: z.lazy(() => NpiProviderWhereInputObjectSchema).array().optional(),
NOT: z.union([z.lazy(() => NpiProviderWhereInputObjectSchema), z.lazy(() => NpiProviderWhereInputObjectSchema).array()]).optional(),
id: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
userId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
npiNumber: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
providerName: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
sortOrder: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
createdAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
user: z.union([z.lazy(() => UserScalarRelationFilterObjectSchema), z.lazy(() => UserWhereInputObjectSchema)]).optional(),
claims: z.lazy(() => ClaimListRelationFilterObjectSchema).optional(),
payments: z.lazy(() => PaymentListRelationFilterObjectSchema).optional(),
commissionBatches: z.lazy(() => CommissionBatchListRelationFilterObjectSchema).optional(),
appointmentProcedures: z.lazy(() => AppointmentProcedureListRelationFilterObjectSchema).optional(),
appointments: z.lazy(() => AppointmentListRelationFilterObjectSchema).optional()
}).strict();
export const NpiProviderWhereInputObjectSchema: z.ZodType<Prisma.NpiProviderWhereInput> = npiproviderwhereinputSchema as unknown as z.ZodType<Prisma.NpiProviderWhereInput>;
export const NpiProviderWhereInputObjectZodSchema = npiproviderwhereinputSchema;