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>
24 lines
2.3 KiB
TypeScript
24 lines
2.3 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { UserCreateNestedOneWithoutNpiProvidersInputObjectSchema as UserCreateNestedOneWithoutNpiProvidersInputObjectSchema } from './UserCreateNestedOneWithoutNpiProvidersInput.schema';
|
|
import { ClaimCreateNestedManyWithoutNpiProviderInputObjectSchema as ClaimCreateNestedManyWithoutNpiProviderInputObjectSchema } from './ClaimCreateNestedManyWithoutNpiProviderInput.schema';
|
|
import { PaymentCreateNestedManyWithoutNpiProviderInputObjectSchema as PaymentCreateNestedManyWithoutNpiProviderInputObjectSchema } from './PaymentCreateNestedManyWithoutNpiProviderInput.schema';
|
|
import { CommissionBatchCreateNestedManyWithoutNpiProviderInputObjectSchema as CommissionBatchCreateNestedManyWithoutNpiProviderInputObjectSchema } from './CommissionBatchCreateNestedManyWithoutNpiProviderInput.schema';
|
|
import { AppointmentProcedureCreateNestedManyWithoutNpiProviderInputObjectSchema as AppointmentProcedureCreateNestedManyWithoutNpiProviderInputObjectSchema } from './AppointmentProcedureCreateNestedManyWithoutNpiProviderInput.schema';
|
|
import { AppointmentCreateNestedManyWithoutNpiProviderInputObjectSchema as AppointmentCreateNestedManyWithoutNpiProviderInputObjectSchema } from './AppointmentCreateNestedManyWithoutNpiProviderInput.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
npiNumber: z.string(),
|
|
providerName: z.string(),
|
|
sortOrder: z.number().int().optional(),
|
|
createdAt: z.coerce.date().optional(),
|
|
user: z.lazy(() => UserCreateNestedOneWithoutNpiProvidersInputObjectSchema),
|
|
claims: z.lazy(() => ClaimCreateNestedManyWithoutNpiProviderInputObjectSchema).optional(),
|
|
payments: z.lazy(() => PaymentCreateNestedManyWithoutNpiProviderInputObjectSchema).optional(),
|
|
commissionBatches: z.lazy(() => CommissionBatchCreateNestedManyWithoutNpiProviderInputObjectSchema).optional(),
|
|
appointmentProcedures: z.lazy(() => AppointmentProcedureCreateNestedManyWithoutNpiProviderInputObjectSchema).optional(),
|
|
appointments: z.lazy(() => AppointmentCreateNestedManyWithoutNpiProviderInputObjectSchema).optional()
|
|
}).strict();
|
|
export const NpiProviderCreateInputObjectSchema: z.ZodType<Prisma.NpiProviderCreateInput> = makeSchema() as unknown as z.ZodType<Prisma.NpiProviderCreateInput>;
|
|
export const NpiProviderCreateInputObjectZodSchema = makeSchema();
|