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:
ff
2026-07-20 23:07:10 -04:00
parent ca568de817
commit b1932fa3d6
1285 changed files with 21237 additions and 4432 deletions

View File

@@ -40,6 +40,7 @@ const SortOrderInput_schema_1 = require("./SortOrderInput.schema");
const PatientOrderByWithRelationInput_schema_1 = require("./PatientOrderByWithRelationInput.schema");
const UserOrderByWithRelationInput_schema_1 = require("./UserOrderByWithRelationInput.schema");
const StaffOrderByWithRelationInput_schema_1 = require("./StaffOrderByWithRelationInput.schema");
const NpiProviderOrderByWithRelationInput_schema_1 = require("./NpiProviderOrderByWithRelationInput.schema");
const AppointmentProcedureOrderByRelationAggregateInput_schema_1 = require("./AppointmentProcedureOrderByRelationAggregateInput.schema");
const ClaimOrderByRelationAggregateInput_schema_1 = require("./ClaimOrderByRelationAggregateInput.schema");
const AppointmentFileOrderByRelationAggregateInput_schema_1 = require("./AppointmentFileOrderByRelationAggregateInput.schema");
@@ -48,6 +49,7 @@ const makeSchema = () => z.object({
patientId: SortOrder_schema_1.SortOrderSchema.optional(),
userId: SortOrder_schema_1.SortOrderSchema.optional(),
staffId: SortOrder_schema_1.SortOrderSchema.optional(),
npiProviderId: z.union([SortOrder_schema_1.SortOrderSchema, z.lazy(() => SortOrderInput_schema_1.SortOrderInputObjectSchema)]).optional(),
title: SortOrder_schema_1.SortOrderSchema.optional(),
date: SortOrder_schema_1.SortOrderSchema.optional(),
startTime: SortOrder_schema_1.SortOrderSchema.optional(),
@@ -63,6 +65,7 @@ const makeSchema = () => z.object({
patient: z.lazy(() => PatientOrderByWithRelationInput_schema_1.PatientOrderByWithRelationInputObjectSchema).optional(),
user: z.lazy(() => UserOrderByWithRelationInput_schema_1.UserOrderByWithRelationInputObjectSchema).optional(),
staff: z.lazy(() => StaffOrderByWithRelationInput_schema_1.StaffOrderByWithRelationInputObjectSchema).optional(),
npiProvider: z.lazy(() => NpiProviderOrderByWithRelationInput_schema_1.NpiProviderOrderByWithRelationInputObjectSchema).optional(),
procedures: z.lazy(() => AppointmentProcedureOrderByRelationAggregateInput_schema_1.AppointmentProcedureOrderByRelationAggregateInputObjectSchema).optional(),
claims: z.lazy(() => ClaimOrderByRelationAggregateInput_schema_1.ClaimOrderByRelationAggregateInputObjectSchema).optional(),
files: z.lazy(() => AppointmentFileOrderByRelationAggregateInput_schema_1.AppointmentFileOrderByRelationAggregateInputObjectSchema).optional()