feat: add Provider field to appointment form, drive AI claim automation
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>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import * as z from 'zod';
|
||||
import type { Prisma } from '../../../generated/prisma';
|
||||
import { IntFilterObjectSchema as IntFilterObjectSchema } from './IntFilter.schema';
|
||||
import { IntNullableFilterObjectSchema as IntNullableFilterObjectSchema } from './IntNullableFilter.schema';
|
||||
import { StringFilterObjectSchema as StringFilterObjectSchema } from './StringFilter.schema';
|
||||
import { DateTimeFilterObjectSchema as DateTimeFilterObjectSchema } from './DateTimeFilter.schema';
|
||||
import { BoolFilterObjectSchema as BoolFilterObjectSchema } from './BoolFilter.schema';
|
||||
@@ -13,6 +14,8 @@ import { UserScalarRelationFilterObjectSchema as UserScalarRelationFilterObjectS
|
||||
import { UserWhereInputObjectSchema as UserWhereInputObjectSchema } from './UserWhereInput.schema';
|
||||
import { StaffNullableScalarRelationFilterObjectSchema as StaffNullableScalarRelationFilterObjectSchema } from './StaffNullableScalarRelationFilter.schema';
|
||||
import { StaffWhereInputObjectSchema as StaffWhereInputObjectSchema } from './StaffWhereInput.schema';
|
||||
import { NpiProviderNullableScalarRelationFilterObjectSchema as NpiProviderNullableScalarRelationFilterObjectSchema } from './NpiProviderNullableScalarRelationFilter.schema';
|
||||
import { NpiProviderWhereInputObjectSchema as NpiProviderWhereInputObjectSchema } from './NpiProviderWhereInput.schema';
|
||||
import { AppointmentProcedureListRelationFilterObjectSchema as AppointmentProcedureListRelationFilterObjectSchema } from './AppointmentProcedureListRelationFilter.schema';
|
||||
import { ClaimListRelationFilterObjectSchema as ClaimListRelationFilterObjectSchema } from './ClaimListRelationFilter.schema';
|
||||
import { AppointmentFileListRelationFilterObjectSchema as AppointmentFileListRelationFilterObjectSchema } from './AppointmentFileListRelationFilter.schema'
|
||||
@@ -25,6 +28,7 @@ const appointmentwhereinputSchema = z.object({
|
||||
patientId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
userId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
staffId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
npiProviderId: z.union([z.lazy(() => IntNullableFilterObjectSchema), z.number().int()]).optional().nullable(),
|
||||
title: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
||||
date: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
|
||||
startTime: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
||||
@@ -40,6 +44,7 @@ const appointmentwhereinputSchema = z.object({
|
||||
patient: z.union([z.lazy(() => PatientScalarRelationFilterObjectSchema), z.lazy(() => PatientWhereInputObjectSchema)]).optional(),
|
||||
user: z.union([z.lazy(() => UserScalarRelationFilterObjectSchema), z.lazy(() => UserWhereInputObjectSchema)]).optional(),
|
||||
staff: z.union([z.lazy(() => StaffNullableScalarRelationFilterObjectSchema), z.lazy(() => StaffWhereInputObjectSchema)]).optional(),
|
||||
npiProvider: z.union([z.lazy(() => NpiProviderNullableScalarRelationFilterObjectSchema), z.lazy(() => NpiProviderWhereInputObjectSchema)]).optional(),
|
||||
procedures: z.lazy(() => AppointmentProcedureListRelationFilterObjectSchema).optional(),
|
||||
claims: z.lazy(() => ClaimListRelationFilterObjectSchema).optional(),
|
||||
files: z.lazy(() => AppointmentFileListRelationFilterObjectSchema).optional()
|
||||
|
||||
Reference in New Issue
Block a user