- 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>
28 lines
1.4 KiB
TypeScript
28 lines
1.4 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { AppointmentArgsObjectSchema as AppointmentArgsObjectSchema } from './AppointmentArgs.schema';
|
|
import { PatientArgsObjectSchema as PatientArgsObjectSchema } from './PatientArgs.schema';
|
|
import { NpiProviderArgsObjectSchema as NpiProviderArgsObjectSchema } from './NpiProviderArgs.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
id: z.boolean().optional(),
|
|
appointmentId: z.boolean().optional(),
|
|
patientId: z.boolean().optional(),
|
|
npiProviderId: z.boolean().optional(),
|
|
procedureCode: z.boolean().optional(),
|
|
procedureLabel: z.boolean().optional(),
|
|
fee: z.boolean().optional(),
|
|
category: z.boolean().optional(),
|
|
toothNumber: z.boolean().optional(),
|
|
toothSurface: z.boolean().optional(),
|
|
oralCavityArea: z.boolean().optional(),
|
|
source: z.boolean().optional(),
|
|
comboKey: z.boolean().optional(),
|
|
createdAt: z.boolean().optional(),
|
|
appointment: z.union([z.boolean(), z.lazy(() => AppointmentArgsObjectSchema)]).optional(),
|
|
patient: z.union([z.boolean(), z.lazy(() => PatientArgsObjectSchema)]).optional(),
|
|
npiProvider: z.union([z.boolean(), z.lazy(() => NpiProviderArgsObjectSchema)]).optional()
|
|
}).strict();
|
|
export const AppointmentProcedureSelectObjectSchema: z.ZodType<Prisma.AppointmentProcedureSelect> = makeSchema() as unknown as z.ZodType<Prisma.AppointmentProcedureSelect>;
|
|
export const AppointmentProcedureSelectObjectZodSchema = makeSchema();
|