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:
@@ -17,10 +17,12 @@ export const ClaimAggregateResultSchema = z.object({ _count: z.object({
|
||||
updatedAt: z.number(),
|
||||
status: z.number(),
|
||||
claimNumber: z.number(),
|
||||
npiProviderId: z.number(),
|
||||
patient: z.number(),
|
||||
appointment: z.number(),
|
||||
user: z.number(),
|
||||
staff: z.number(),
|
||||
npiProvider: z.number(),
|
||||
serviceLines: z.number(),
|
||||
claimFiles: z.number(),
|
||||
payment: z.number()
|
||||
@@ -30,14 +32,16 @@ export const ClaimAggregateResultSchema = z.object({ _count: z.object({
|
||||
patientId: z.number().nullable(),
|
||||
appointmentId: z.number().nullable(),
|
||||
userId: z.number().nullable(),
|
||||
staffId: z.number().nullable()
|
||||
staffId: z.number().nullable(),
|
||||
npiProviderId: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_avg: z.object({
|
||||
id: z.number().nullable(),
|
||||
patientId: z.number().nullable(),
|
||||
appointmentId: z.number().nullable(),
|
||||
userId: z.number().nullable(),
|
||||
staffId: z.number().nullable()
|
||||
staffId: z.number().nullable(),
|
||||
npiProviderId: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_min: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
@@ -53,7 +57,8 @@ export const ClaimAggregateResultSchema = z.object({ _count: z.object({
|
||||
insuranceProvider: z.string().nullable(),
|
||||
createdAt: z.date().nullable(),
|
||||
updatedAt: z.date().nullable(),
|
||||
claimNumber: z.string().nullable()
|
||||
claimNumber: z.string().nullable(),
|
||||
npiProviderId: z.number().int().nullable()
|
||||
}).nullable().optional(),
|
||||
_max: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
@@ -69,5 +74,6 @@ export const ClaimAggregateResultSchema = z.object({ _count: z.object({
|
||||
insuranceProvider: z.string().nullable(),
|
||||
createdAt: z.date().nullable(),
|
||||
updatedAt: z.date().nullable(),
|
||||
claimNumber: z.string().nullable()
|
||||
claimNumber: z.string().nullable(),
|
||||
npiProviderId: z.number().int().nullable()
|
||||
}).nullable().optional()});
|
||||
Reference in New Issue
Block a user