- 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>
30 lines
2.3 KiB
TypeScript
30 lines
2.3 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { SortOrderSchema } from '../enums/SortOrder.schema';
|
|
import { SortOrderInputObjectSchema as SortOrderInputObjectSchema } from './SortOrderInput.schema';
|
|
import { AppointmentOrderByWithRelationInputObjectSchema as AppointmentOrderByWithRelationInputObjectSchema } from './AppointmentOrderByWithRelationInput.schema';
|
|
import { PatientOrderByWithRelationInputObjectSchema as PatientOrderByWithRelationInputObjectSchema } from './PatientOrderByWithRelationInput.schema';
|
|
import { NpiProviderOrderByWithRelationInputObjectSchema as NpiProviderOrderByWithRelationInputObjectSchema } from './NpiProviderOrderByWithRelationInput.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
id: SortOrderSchema.optional(),
|
|
appointmentId: SortOrderSchema.optional(),
|
|
patientId: SortOrderSchema.optional(),
|
|
npiProviderId: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
procedureCode: SortOrderSchema.optional(),
|
|
procedureLabel: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
fee: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
category: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
toothNumber: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
toothSurface: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
oralCavityArea: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
source: SortOrderSchema.optional(),
|
|
comboKey: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
createdAt: SortOrderSchema.optional(),
|
|
appointment: z.lazy(() => AppointmentOrderByWithRelationInputObjectSchema).optional(),
|
|
patient: z.lazy(() => PatientOrderByWithRelationInputObjectSchema).optional(),
|
|
npiProvider: z.lazy(() => NpiProviderOrderByWithRelationInputObjectSchema).optional()
|
|
}).strict();
|
|
export const AppointmentProcedureOrderByWithRelationInputObjectSchema: z.ZodType<Prisma.AppointmentProcedureOrderByWithRelationInput> = makeSchema() as unknown as z.ZodType<Prisma.AppointmentProcedureOrderByWithRelationInput>;
|
|
export const AppointmentProcedureOrderByWithRelationInputObjectZodSchema = makeSchema();
|