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>
70 lines
4.2 KiB
TypeScript
70 lines
4.2 KiB
TypeScript
import type { Prisma } from '../../generated/prisma';
|
|
import * as z from 'zod';
|
|
import { AppointmentIncludeObjectSchema as AppointmentIncludeObjectSchema } from './objects/AppointmentInclude.schema';
|
|
import { AppointmentOrderByWithRelationInputObjectSchema as AppointmentOrderByWithRelationInputObjectSchema } from './objects/AppointmentOrderByWithRelationInput.schema';
|
|
import { AppointmentWhereInputObjectSchema as AppointmentWhereInputObjectSchema } from './objects/AppointmentWhereInput.schema';
|
|
import { AppointmentWhereUniqueInputObjectSchema as AppointmentWhereUniqueInputObjectSchema } from './objects/AppointmentWhereUniqueInput.schema';
|
|
import { AppointmentScalarFieldEnumSchema } from './enums/AppointmentScalarFieldEnum.schema';
|
|
|
|
// Select schema needs to be in file to prevent circular imports
|
|
//------------------------------------------------------
|
|
|
|
export const AppointmentFindFirstOrThrowSelectSchema: z.ZodType<Prisma.AppointmentSelect> = z.object({
|
|
id: z.boolean().optional(),
|
|
patientId: z.boolean().optional(),
|
|
userId: z.boolean().optional(),
|
|
staffId: z.boolean().optional(),
|
|
npiProviderId: z.boolean().optional(),
|
|
title: z.boolean().optional(),
|
|
date: z.boolean().optional(),
|
|
startTime: z.boolean().optional(),
|
|
endTime: z.boolean().optional(),
|
|
type: z.boolean().optional(),
|
|
typeLocked: z.boolean().optional(),
|
|
notes: z.boolean().optional(),
|
|
procedureCodeNotes: z.boolean().optional(),
|
|
status: z.boolean().optional(),
|
|
movedByAi: z.boolean().optional(),
|
|
createdAt: z.boolean().optional(),
|
|
eligibilityStatus: z.boolean().optional(),
|
|
patient: z.boolean().optional(),
|
|
user: z.boolean().optional(),
|
|
staff: z.boolean().optional(),
|
|
npiProvider: z.boolean().optional(),
|
|
procedures: z.boolean().optional(),
|
|
claims: z.boolean().optional(),
|
|
files: z.boolean().optional(),
|
|
_count: z.boolean().optional()
|
|
}).strict() as unknown as z.ZodType<Prisma.AppointmentSelect>;
|
|
|
|
export const AppointmentFindFirstOrThrowSelectZodSchema = z.object({
|
|
id: z.boolean().optional(),
|
|
patientId: z.boolean().optional(),
|
|
userId: z.boolean().optional(),
|
|
staffId: z.boolean().optional(),
|
|
npiProviderId: z.boolean().optional(),
|
|
title: z.boolean().optional(),
|
|
date: z.boolean().optional(),
|
|
startTime: z.boolean().optional(),
|
|
endTime: z.boolean().optional(),
|
|
type: z.boolean().optional(),
|
|
typeLocked: z.boolean().optional(),
|
|
notes: z.boolean().optional(),
|
|
procedureCodeNotes: z.boolean().optional(),
|
|
status: z.boolean().optional(),
|
|
movedByAi: z.boolean().optional(),
|
|
createdAt: z.boolean().optional(),
|
|
eligibilityStatus: z.boolean().optional(),
|
|
patient: z.boolean().optional(),
|
|
user: z.boolean().optional(),
|
|
staff: z.boolean().optional(),
|
|
npiProvider: z.boolean().optional(),
|
|
procedures: z.boolean().optional(),
|
|
claims: z.boolean().optional(),
|
|
files: z.boolean().optional(),
|
|
_count: z.boolean().optional()
|
|
}).strict();
|
|
|
|
export const AppointmentFindFirstOrThrowSchema: z.ZodType<Prisma.AppointmentFindFirstOrThrowArgs> = z.object({ select: AppointmentFindFirstOrThrowSelectSchema.optional(), include: z.lazy(() => AppointmentIncludeObjectSchema.optional()), orderBy: z.union([AppointmentOrderByWithRelationInputObjectSchema, AppointmentOrderByWithRelationInputObjectSchema.array()]).optional(), where: AppointmentWhereInputObjectSchema.optional(), cursor: AppointmentWhereUniqueInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), distinct: z.union([AppointmentScalarFieldEnumSchema, AppointmentScalarFieldEnumSchema.array()]).optional() }).strict() as unknown as z.ZodType<Prisma.AppointmentFindFirstOrThrowArgs>;
|
|
|
|
export const AppointmentFindFirstOrThrowZodSchema = z.object({ select: AppointmentFindFirstOrThrowSelectSchema.optional(), include: z.lazy(() => AppointmentIncludeObjectSchema.optional()), orderBy: z.union([AppointmentOrderByWithRelationInputObjectSchema, AppointmentOrderByWithRelationInputObjectSchema.array()]).optional(), where: AppointmentWhereInputObjectSchema.optional(), cursor: AppointmentWhereUniqueInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), distinct: z.union([AppointmentScalarFieldEnumSchema, AppointmentScalarFieldEnumSchema.array()]).optional() }).strict(); |