feat: Select Procedures flow, batch-column NPI provider fix, auto PDF save
- 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>
This commit is contained in:
@@ -2,6 +2,7 @@ import * as z from 'zod';
|
||||
import { Prisma } from '../../../generated/prisma';
|
||||
import Decimal from 'decimal.js';
|
||||
import { IntFilterObjectSchema as IntFilterObjectSchema } from './IntFilter.schema';
|
||||
import { IntNullableFilterObjectSchema as IntNullableFilterObjectSchema } from './IntNullableFilter.schema';
|
||||
import { StringFilterObjectSchema as StringFilterObjectSchema } from './StringFilter.schema';
|
||||
import { StringNullableFilterObjectSchema as StringNullableFilterObjectSchema } from './StringNullableFilter.schema';
|
||||
import { DecimalNullableFilterObjectSchema as DecimalNullableFilterObjectSchema } from './DecimalNullableFilter.schema';
|
||||
@@ -11,7 +12,9 @@ import { DateTimeFilterObjectSchema as DateTimeFilterObjectSchema } from './Date
|
||||
import { AppointmentScalarRelationFilterObjectSchema as AppointmentScalarRelationFilterObjectSchema } from './AppointmentScalarRelationFilter.schema';
|
||||
import { AppointmentWhereInputObjectSchema as AppointmentWhereInputObjectSchema } from './AppointmentWhereInput.schema';
|
||||
import { PatientScalarRelationFilterObjectSchema as PatientScalarRelationFilterObjectSchema } from './PatientScalarRelationFilter.schema';
|
||||
import { PatientWhereInputObjectSchema as PatientWhereInputObjectSchema } from './PatientWhereInput.schema'
|
||||
import { PatientWhereInputObjectSchema as PatientWhereInputObjectSchema } from './PatientWhereInput.schema';
|
||||
import { NpiProviderNullableScalarRelationFilterObjectSchema as NpiProviderNullableScalarRelationFilterObjectSchema } from './NpiProviderNullableScalarRelationFilter.schema';
|
||||
import { NpiProviderWhereInputObjectSchema as NpiProviderWhereInputObjectSchema } from './NpiProviderWhereInput.schema'
|
||||
|
||||
import { DecimalJSLikeSchema, isValidDecimalInput } from '../../helpers/decimal-helpers';
|
||||
const appointmentprocedurewhereinputSchema = z.object({
|
||||
@@ -21,6 +24,7 @@ const appointmentprocedurewhereinputSchema = z.object({
|
||||
id: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
appointmentId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
patientId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
npiProviderId: z.union([z.lazy(() => IntNullableFilterObjectSchema), z.number().int()]).optional().nullable(),
|
||||
procedureCode: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
||||
procedureLabel: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
fee: z.union([z.lazy(() => DecimalNullableFilterObjectSchema), z.union([
|
||||
@@ -40,7 +44,8 @@ const appointmentprocedurewhereinputSchema = z.object({
|
||||
comboKey: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
createdAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
|
||||
appointment: z.union([z.lazy(() => AppointmentScalarRelationFilterObjectSchema), z.lazy(() => AppointmentWhereInputObjectSchema)]).optional(),
|
||||
patient: z.union([z.lazy(() => PatientScalarRelationFilterObjectSchema), z.lazy(() => PatientWhereInputObjectSchema)]).optional()
|
||||
patient: z.union([z.lazy(() => PatientScalarRelationFilterObjectSchema), z.lazy(() => PatientWhereInputObjectSchema)]).optional(),
|
||||
npiProvider: z.union([z.lazy(() => NpiProviderNullableScalarRelationFilterObjectSchema), z.lazy(() => NpiProviderWhereInputObjectSchema)]).optional()
|
||||
}).strict();
|
||||
export const AppointmentProcedureWhereInputObjectSchema: z.ZodType<Prisma.AppointmentProcedureWhereInput> = appointmentprocedurewhereinputSchema as unknown as z.ZodType<Prisma.AppointmentProcedureWhereInput>;
|
||||
export const AppointmentProcedureWhereInputObjectZodSchema = appointmentprocedurewhereinputSchema;
|
||||
|
||||
Reference in New Issue
Block a user