Files
DentalManagementMH06/packages/db/shared/schemas/objects/ClaimScalarWhereWithAggregatesInput.schema.ts
Gitead 3e899376c3 feat: Select Procedures flow, batch-column NPI provider fix, auto PDF save
- Add 'Select Procedures' right-click option on appointment page (separate from Claims/PreAuth)
- Select Procedures form saves CDT codes + NPI provider to AppointmentProcedure storage
- Remove Save button from insurance claim form; Claims/PreAuth opens for insurance submission only
- Claims/PreAuth auto-prefills from saved procedures including NPI provider
- Batch-column: procedures npiProviderId takes priority over stale claim npiProviderId
- Batch-column: auto-save PDF to patient Documents after successful submission (no socket needed)
- Add npiProviderId column to AppointmentProcedure table (prisma db push)
- Fix 'invalid db creation invocation': guard staffId, npiProviderId, procedureDate as Date object, totalBilled NaN guard
- Add full error logging to batch-column catch block

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 00:25:24 -04:00

39 lines
4.1 KiB
TypeScript

import * as z from 'zod';
import type { Prisma } from '../../../generated/prisma';
import { IntWithAggregatesFilterObjectSchema as IntWithAggregatesFilterObjectSchema } from './IntWithAggregatesFilter.schema';
import { StringWithAggregatesFilterObjectSchema as StringWithAggregatesFilterObjectSchema } from './StringWithAggregatesFilter.schema';
import { DateTimeWithAggregatesFilterObjectSchema as DateTimeWithAggregatesFilterObjectSchema } from './DateTimeWithAggregatesFilter.schema';
import { EnumMissingTeethStatusWithAggregatesFilterObjectSchema as EnumMissingTeethStatusWithAggregatesFilterObjectSchema } from './EnumMissingTeethStatusWithAggregatesFilter.schema';
import { MissingTeethStatusSchema } from '../enums/MissingTeethStatus.schema';
import { JsonNullableWithAggregatesFilterObjectSchema as JsonNullableWithAggregatesFilterObjectSchema } from './JsonNullableWithAggregatesFilter.schema';
import { EnumClaimStatusWithAggregatesFilterObjectSchema as EnumClaimStatusWithAggregatesFilterObjectSchema } from './EnumClaimStatusWithAggregatesFilter.schema';
import { ClaimStatusSchema } from '../enums/ClaimStatus.schema';
import { StringNullableWithAggregatesFilterObjectSchema as StringNullableWithAggregatesFilterObjectSchema } from './StringNullableWithAggregatesFilter.schema';
import { IntNullableWithAggregatesFilterObjectSchema as IntNullableWithAggregatesFilterObjectSchema } from './IntNullableWithAggregatesFilter.schema'
const claimscalarwherewithaggregatesinputSchema = z.object({
AND: z.union([z.lazy(() => ClaimScalarWhereWithAggregatesInputObjectSchema), z.lazy(() => ClaimScalarWhereWithAggregatesInputObjectSchema).array()]).optional(),
OR: z.lazy(() => ClaimScalarWhereWithAggregatesInputObjectSchema).array().optional(),
NOT: z.union([z.lazy(() => ClaimScalarWhereWithAggregatesInputObjectSchema), z.lazy(() => ClaimScalarWhereWithAggregatesInputObjectSchema).array()]).optional(),
id: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
patientId: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
appointmentId: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
userId: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
staffId: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
patientName: z.union([z.lazy(() => StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
memberId: z.union([z.lazy(() => StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
dateOfBirth: z.union([z.lazy(() => DateTimeWithAggregatesFilterObjectSchema), z.coerce.date()]).optional(),
remarks: z.union([z.lazy(() => StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
missingTeethStatus: z.union([z.lazy(() => EnumMissingTeethStatusWithAggregatesFilterObjectSchema), MissingTeethStatusSchema]).optional(),
missingTeeth: z.lazy(() => JsonNullableWithAggregatesFilterObjectSchema).optional(),
serviceDate: z.union([z.lazy(() => DateTimeWithAggregatesFilterObjectSchema), z.coerce.date()]).optional(),
insuranceProvider: z.union([z.lazy(() => StringWithAggregatesFilterObjectSchema), z.string()]).optional(),
createdAt: z.union([z.lazy(() => DateTimeWithAggregatesFilterObjectSchema), z.coerce.date()]).optional(),
updatedAt: z.union([z.lazy(() => DateTimeWithAggregatesFilterObjectSchema), z.coerce.date()]).optional(),
status: z.union([z.lazy(() => EnumClaimStatusWithAggregatesFilterObjectSchema), ClaimStatusSchema]).optional(),
claimNumber: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),
npiProviderId: z.union([z.lazy(() => IntNullableWithAggregatesFilterObjectSchema), z.number().int()]).optional().nullable()
}).strict();
export const ClaimScalarWhereWithAggregatesInputObjectSchema: z.ZodType<Prisma.ClaimScalarWhereWithAggregatesInput> = claimscalarwherewithaggregatesinputSchema as unknown as z.ZodType<Prisma.ClaimScalarWhereWithAggregatesInput>;
export const ClaimScalarWhereWithAggregatesInputObjectZodSchema = claimscalarwherewithaggregatesinputSchema;