feat: add provider column, commission tracking, and report provider filter
- Claims & Payments: save npiProviderId when submitting MH claim; sync between claim and payment on update - Claims table: add Provider column showing rendering provider name - Payments table: add Provider column + purple Commissioned badge on status - Claim edit modal: add Rendering Provider dropdown (defaults to Mary Scannell) - Payment edit modal: add Rendering Provider dropdown + Commissioned metadata display - Reports page: add Provider filter dropdown (dynamic from NPI providers settings) - Reports page: remove Collections by Doctor report type and Select Doctor dropdown - Commission section: new section in reports page with date range + provider filter, shows eligible paid claims/payments per provider, multi-select checkboxes, Pay Commission modal with print + save, marks payments as commissioned so they are excluded from future cycles - DB: add CommissionBatch and CommissionBatchItem tables; backfill Payment.npiProviderId from linked claims - Backend: PATCH /api/payments/:id/provider syncs to linked claim; PUT /api/claims/:id syncs to linked payment; new /api/commissions routes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchAggregateResultSchema = z.object({ _count: z.object({
|
||||
id: z.number(),
|
||||
npiProviderId: z.number(),
|
||||
totalCollection: z.number(),
|
||||
commissionAmount: z.number(),
|
||||
notes: z.number(),
|
||||
createdAt: z.number(),
|
||||
npiProvider: z.number(),
|
||||
items: z.number()
|
||||
}).optional(),
|
||||
_sum: z.object({
|
||||
id: z.number().nullable(),
|
||||
npiProviderId: z.number().nullable(),
|
||||
totalCollection: z.number().nullable(),
|
||||
commissionAmount: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_avg: z.object({
|
||||
id: z.number().nullable(),
|
||||
npiProviderId: z.number().nullable(),
|
||||
totalCollection: z.number().nullable(),
|
||||
commissionAmount: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_min: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
npiProviderId: z.number().int().nullable(),
|
||||
totalCollection: z.number().nullable(),
|
||||
commissionAmount: z.number().nullable(),
|
||||
notes: z.string().nullable(),
|
||||
createdAt: z.date().nullable()
|
||||
}).nullable().optional(),
|
||||
_max: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
npiProviderId: z.number().int().nullable(),
|
||||
totalCollection: z.number().nullable(),
|
||||
commissionAmount: z.number().nullable(),
|
||||
notes: z.string().nullable(),
|
||||
createdAt: z.date().nullable()
|
||||
}).nullable().optional()});
|
||||
@@ -0,0 +1,2 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchCountResultSchema = z.number();
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchCreateManyResultSchema = z.object({
|
||||
count: z.number()
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchCreateResultSchema = z.object({
|
||||
id: z.number().int(),
|
||||
npiProviderId: z.number().int(),
|
||||
totalCollection: z.number(),
|
||||
commissionAmount: z.number(),
|
||||
notes: z.string().optional(),
|
||||
createdAt: z.date(),
|
||||
npiProvider: z.unknown(),
|
||||
items: z.array(z.unknown())
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchDeleteManyResultSchema = z.object({
|
||||
count: z.number()
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchDeleteResultSchema = z.nullable(z.object({
|
||||
id: z.number().int(),
|
||||
npiProviderId: z.number().int(),
|
||||
totalCollection: z.number(),
|
||||
commissionAmount: z.number(),
|
||||
notes: z.string().optional(),
|
||||
createdAt: z.date(),
|
||||
npiProvider: z.unknown(),
|
||||
items: z.array(z.unknown())
|
||||
}));
|
||||
@@ -0,0 +1,11 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchFindFirstResultSchema = z.nullable(z.object({
|
||||
id: z.number().int(),
|
||||
npiProviderId: z.number().int(),
|
||||
totalCollection: z.number(),
|
||||
commissionAmount: z.number(),
|
||||
notes: z.string().optional(),
|
||||
createdAt: z.date(),
|
||||
npiProvider: z.unknown(),
|
||||
items: z.array(z.unknown())
|
||||
}));
|
||||
@@ -0,0 +1,21 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchFindManyResultSchema = z.object({
|
||||
data: z.array(z.object({
|
||||
id: z.number().int(),
|
||||
npiProviderId: z.number().int(),
|
||||
totalCollection: z.number(),
|
||||
commissionAmount: z.number(),
|
||||
notes: z.string().optional(),
|
||||
createdAt: z.date(),
|
||||
npiProvider: z.unknown(),
|
||||
items: z.array(z.unknown())
|
||||
})),
|
||||
pagination: z.object({
|
||||
page: z.number().int().min(1),
|
||||
pageSize: z.number().int().min(1),
|
||||
total: z.number().int().min(0),
|
||||
totalPages: z.number().int().min(0),
|
||||
hasNext: z.boolean(),
|
||||
hasPrev: z.boolean()
|
||||
})
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchFindUniqueResultSchema = z.nullable(z.object({
|
||||
id: z.number().int(),
|
||||
npiProviderId: z.number().int(),
|
||||
totalCollection: z.number(),
|
||||
commissionAmount: z.number(),
|
||||
notes: z.string().optional(),
|
||||
createdAt: z.date(),
|
||||
npiProvider: z.unknown(),
|
||||
items: z.array(z.unknown())
|
||||
}));
|
||||
@@ -0,0 +1,47 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchGroupByResultSchema = z.array(z.object({
|
||||
id: z.number().int(),
|
||||
npiProviderId: z.number().int(),
|
||||
totalCollection: z.number(),
|
||||
commissionAmount: z.number(),
|
||||
notes: z.string(),
|
||||
createdAt: z.date(),
|
||||
_count: z.object({
|
||||
id: z.number(),
|
||||
npiProviderId: z.number(),
|
||||
totalCollection: z.number(),
|
||||
commissionAmount: z.number(),
|
||||
notes: z.number(),
|
||||
createdAt: z.number(),
|
||||
npiProvider: z.number(),
|
||||
items: z.number()
|
||||
}).optional(),
|
||||
_sum: z.object({
|
||||
id: z.number().nullable(),
|
||||
npiProviderId: z.number().nullable(),
|
||||
totalCollection: z.number().nullable(),
|
||||
commissionAmount: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_avg: z.object({
|
||||
id: z.number().nullable(),
|
||||
npiProviderId: z.number().nullable(),
|
||||
totalCollection: z.number().nullable(),
|
||||
commissionAmount: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_min: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
npiProviderId: z.number().int().nullable(),
|
||||
totalCollection: z.number().nullable(),
|
||||
commissionAmount: z.number().nullable(),
|
||||
notes: z.string().nullable(),
|
||||
createdAt: z.date().nullable()
|
||||
}).nullable().optional(),
|
||||
_max: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
npiProviderId: z.number().int().nullable(),
|
||||
totalCollection: z.number().nullable(),
|
||||
commissionAmount: z.number().nullable(),
|
||||
notes: z.string().nullable(),
|
||||
createdAt: z.date().nullable()
|
||||
}).nullable().optional()
|
||||
}));
|
||||
@@ -0,0 +1,33 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemAggregateResultSchema = z.object({ _count: z.object({
|
||||
id: z.number(),
|
||||
commissionBatchId: z.number(),
|
||||
paymentId: z.number(),
|
||||
collectionAmount: z.number(),
|
||||
commissionBatch: z.number(),
|
||||
payment: z.number()
|
||||
}).optional(),
|
||||
_sum: z.object({
|
||||
id: z.number().nullable(),
|
||||
commissionBatchId: z.number().nullable(),
|
||||
paymentId: z.number().nullable(),
|
||||
collectionAmount: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_avg: z.object({
|
||||
id: z.number().nullable(),
|
||||
commissionBatchId: z.number().nullable(),
|
||||
paymentId: z.number().nullable(),
|
||||
collectionAmount: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_min: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
commissionBatchId: z.number().int().nullable(),
|
||||
paymentId: z.number().int().nullable(),
|
||||
collectionAmount: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_max: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
commissionBatchId: z.number().int().nullable(),
|
||||
paymentId: z.number().int().nullable(),
|
||||
collectionAmount: z.number().nullable()
|
||||
}).nullable().optional()});
|
||||
@@ -0,0 +1,2 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemCountResultSchema = z.number();
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemCreateManyResultSchema = z.object({
|
||||
count: z.number()
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemCreateResultSchema = z.object({
|
||||
id: z.number().int(),
|
||||
commissionBatchId: z.number().int(),
|
||||
paymentId: z.number().int(),
|
||||
collectionAmount: z.number(),
|
||||
commissionBatch: z.unknown(),
|
||||
payment: z.unknown()
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemDeleteManyResultSchema = z.object({
|
||||
count: z.number()
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemDeleteResultSchema = z.nullable(z.object({
|
||||
id: z.number().int(),
|
||||
commissionBatchId: z.number().int(),
|
||||
paymentId: z.number().int(),
|
||||
collectionAmount: z.number(),
|
||||
commissionBatch: z.unknown(),
|
||||
payment: z.unknown()
|
||||
}));
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemFindFirstResultSchema = z.nullable(z.object({
|
||||
id: z.number().int(),
|
||||
commissionBatchId: z.number().int(),
|
||||
paymentId: z.number().int(),
|
||||
collectionAmount: z.number(),
|
||||
commissionBatch: z.unknown(),
|
||||
payment: z.unknown()
|
||||
}));
|
||||
@@ -0,0 +1,19 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemFindManyResultSchema = z.object({
|
||||
data: z.array(z.object({
|
||||
id: z.number().int(),
|
||||
commissionBatchId: z.number().int(),
|
||||
paymentId: z.number().int(),
|
||||
collectionAmount: z.number(),
|
||||
commissionBatch: z.unknown(),
|
||||
payment: z.unknown()
|
||||
})),
|
||||
pagination: z.object({
|
||||
page: z.number().int().min(1),
|
||||
pageSize: z.number().int().min(1),
|
||||
total: z.number().int().min(0),
|
||||
totalPages: z.number().int().min(0),
|
||||
hasNext: z.boolean(),
|
||||
hasPrev: z.boolean()
|
||||
})
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemFindUniqueResultSchema = z.nullable(z.object({
|
||||
id: z.number().int(),
|
||||
commissionBatchId: z.number().int(),
|
||||
paymentId: z.number().int(),
|
||||
collectionAmount: z.number(),
|
||||
commissionBatch: z.unknown(),
|
||||
payment: z.unknown()
|
||||
}));
|
||||
@@ -0,0 +1,39 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemGroupByResultSchema = z.array(z.object({
|
||||
id: z.number().int(),
|
||||
commissionBatchId: z.number().int(),
|
||||
paymentId: z.number().int(),
|
||||
collectionAmount: z.number(),
|
||||
_count: z.object({
|
||||
id: z.number(),
|
||||
commissionBatchId: z.number(),
|
||||
paymentId: z.number(),
|
||||
collectionAmount: z.number(),
|
||||
commissionBatch: z.number(),
|
||||
payment: z.number()
|
||||
}).optional(),
|
||||
_sum: z.object({
|
||||
id: z.number().nullable(),
|
||||
commissionBatchId: z.number().nullable(),
|
||||
paymentId: z.number().nullable(),
|
||||
collectionAmount: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_avg: z.object({
|
||||
id: z.number().nullable(),
|
||||
commissionBatchId: z.number().nullable(),
|
||||
paymentId: z.number().nullable(),
|
||||
collectionAmount: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_min: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
commissionBatchId: z.number().int().nullable(),
|
||||
paymentId: z.number().int().nullable(),
|
||||
collectionAmount: z.number().nullable()
|
||||
}).nullable().optional(),
|
||||
_max: z.object({
|
||||
id: z.number().int().nullable(),
|
||||
commissionBatchId: z.number().int().nullable(),
|
||||
paymentId: z.number().int().nullable(),
|
||||
collectionAmount: z.number().nullable()
|
||||
}).nullable().optional()
|
||||
}));
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemUpdateManyResultSchema = z.object({
|
||||
count: z.number()
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemUpdateResultSchema = z.nullable(z.object({
|
||||
id: z.number().int(),
|
||||
commissionBatchId: z.number().int(),
|
||||
paymentId: z.number().int(),
|
||||
collectionAmount: z.number(),
|
||||
commissionBatch: z.unknown(),
|
||||
payment: z.unknown()
|
||||
}));
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchItemUpsertResultSchema = z.object({
|
||||
id: z.number().int(),
|
||||
commissionBatchId: z.number().int(),
|
||||
paymentId: z.number().int(),
|
||||
collectionAmount: z.number(),
|
||||
commissionBatch: z.unknown(),
|
||||
payment: z.unknown()
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchUpdateManyResultSchema = z.object({
|
||||
count: z.number()
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchUpdateResultSchema = z.nullable(z.object({
|
||||
id: z.number().int(),
|
||||
npiProviderId: z.number().int(),
|
||||
totalCollection: z.number(),
|
||||
commissionAmount: z.number(),
|
||||
notes: z.string().optional(),
|
||||
createdAt: z.date(),
|
||||
npiProvider: z.unknown(),
|
||||
items: z.array(z.unknown())
|
||||
}));
|
||||
@@ -0,0 +1,11 @@
|
||||
import * as z from 'zod';
|
||||
export const CommissionBatchUpsertResultSchema = z.object({
|
||||
id: z.number().int(),
|
||||
npiProviderId: z.number().int(),
|
||||
totalCollection: z.number(),
|
||||
commissionAmount: z.number(),
|
||||
notes: z.string().optional(),
|
||||
createdAt: z.date(),
|
||||
npiProvider: z.unknown(),
|
||||
items: z.array(z.unknown())
|
||||
});
|
||||
@@ -7,6 +7,8 @@ export const NpiProviderAggregateResultSchema = z.object({ _count: z.object({
|
||||
createdAt: z.number(),
|
||||
user: z.number(),
|
||||
claims: z.number(),
|
||||
payments: z.number(),
|
||||
commissionBatches: z.number(),
|
||||
appointmentProcedures: z.number()
|
||||
}).optional(),
|
||||
_sum: z.object({
|
||||
|
||||
@@ -7,5 +7,7 @@ export const NpiProviderCreateResultSchema = z.object({
|
||||
createdAt: z.date(),
|
||||
user: z.unknown(),
|
||||
claims: z.array(z.unknown()),
|
||||
payments: z.array(z.unknown()),
|
||||
commissionBatches: z.array(z.unknown()),
|
||||
appointmentProcedures: z.array(z.unknown())
|
||||
});
|
||||
@@ -7,5 +7,7 @@ export const NpiProviderDeleteResultSchema = z.nullable(z.object({
|
||||
createdAt: z.date(),
|
||||
user: z.unknown(),
|
||||
claims: z.array(z.unknown()),
|
||||
payments: z.array(z.unknown()),
|
||||
commissionBatches: z.array(z.unknown()),
|
||||
appointmentProcedures: z.array(z.unknown())
|
||||
}));
|
||||
@@ -7,5 +7,7 @@ export const NpiProviderFindFirstResultSchema = z.nullable(z.object({
|
||||
createdAt: z.date(),
|
||||
user: z.unknown(),
|
||||
claims: z.array(z.unknown()),
|
||||
payments: z.array(z.unknown()),
|
||||
commissionBatches: z.array(z.unknown()),
|
||||
appointmentProcedures: z.array(z.unknown())
|
||||
}));
|
||||
@@ -8,6 +8,8 @@ export const NpiProviderFindManyResultSchema = z.object({
|
||||
createdAt: z.date(),
|
||||
user: z.unknown(),
|
||||
claims: z.array(z.unknown()),
|
||||
payments: z.array(z.unknown()),
|
||||
commissionBatches: z.array(z.unknown()),
|
||||
appointmentProcedures: z.array(z.unknown())
|
||||
})),
|
||||
pagination: z.object({
|
||||
|
||||
@@ -7,5 +7,7 @@ export const NpiProviderFindUniqueResultSchema = z.nullable(z.object({
|
||||
createdAt: z.date(),
|
||||
user: z.unknown(),
|
||||
claims: z.array(z.unknown()),
|
||||
payments: z.array(z.unknown()),
|
||||
commissionBatches: z.array(z.unknown()),
|
||||
appointmentProcedures: z.array(z.unknown())
|
||||
}));
|
||||
@@ -13,6 +13,8 @@ export const NpiProviderGroupByResultSchema = z.array(z.object({
|
||||
createdAt: z.number(),
|
||||
user: z.number(),
|
||||
claims: z.number(),
|
||||
payments: z.number(),
|
||||
commissionBatches: z.number(),
|
||||
appointmentProcedures: z.number()
|
||||
}).optional(),
|
||||
_sum: z.object({
|
||||
|
||||
@@ -7,5 +7,7 @@ export const NpiProviderUpdateResultSchema = z.nullable(z.object({
|
||||
createdAt: z.date(),
|
||||
user: z.unknown(),
|
||||
claims: z.array(z.unknown()),
|
||||
payments: z.array(z.unknown()),
|
||||
commissionBatches: z.array(z.unknown()),
|
||||
appointmentProcedures: z.array(z.unknown())
|
||||
}));
|
||||
@@ -7,5 +7,7 @@ export const NpiProviderUpsertResultSchema = z.object({
|
||||
createdAt: z.date(),
|
||||
user: z.unknown(),
|
||||
claims: z.array(z.unknown()),
|
||||
payments: z.array(z.unknown()),
|
||||
commissionBatches: z.array(z.unknown()),
|
||||
appointmentProcedures: z.array(z.unknown())
|
||||
});
|
||||
@@ -5,6 +5,7 @@ export const PaymentAggregateResultSchema = z.object({ _count: z.object({
|
||||
patientId: z.number(),
|
||||
userId: z.number(),
|
||||
updatedById: z.number(),
|
||||
npiProviderId: z.number(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
@@ -20,8 +21,10 @@ export const PaymentAggregateResultSchema = z.object({ _count: z.object({
|
||||
claim: z.number(),
|
||||
patient: z.number(),
|
||||
updatedBy: z.number(),
|
||||
npiProvider: z.number(),
|
||||
serviceLineTransactions: z.number(),
|
||||
serviceLines: z.number()
|
||||
serviceLines: z.number(),
|
||||
commissionBatchItems: z.number()
|
||||
}).optional(),
|
||||
_sum: z.object({
|
||||
id: z.number().nullable(),
|
||||
@@ -29,6 +32,7 @@ export const PaymentAggregateResultSchema = z.object({ _count: z.object({
|
||||
patientId: z.number().nullable(),
|
||||
userId: z.number().nullable(),
|
||||
updatedById: z.number().nullable(),
|
||||
npiProviderId: z.number().nullable(),
|
||||
totalBilled: z.number().nullable(),
|
||||
totalPaid: z.number().nullable(),
|
||||
totalAdjusted: z.number().nullable(),
|
||||
@@ -43,6 +47,7 @@ export const PaymentAggregateResultSchema = z.object({ _count: z.object({
|
||||
patientId: z.number().nullable(),
|
||||
userId: z.number().nullable(),
|
||||
updatedById: z.number().nullable(),
|
||||
npiProviderId: z.number().nullable(),
|
||||
totalBilled: z.number().nullable(),
|
||||
totalPaid: z.number().nullable(),
|
||||
totalAdjusted: z.number().nullable(),
|
||||
@@ -57,6 +62,7 @@ export const PaymentAggregateResultSchema = z.object({ _count: z.object({
|
||||
patientId: z.number().int().nullable(),
|
||||
userId: z.number().int().nullable(),
|
||||
updatedById: z.number().int().nullable(),
|
||||
npiProviderId: z.number().int().nullable(),
|
||||
totalBilled: z.number().nullable(),
|
||||
totalPaid: z.number().nullable(),
|
||||
totalAdjusted: z.number().nullable(),
|
||||
@@ -75,6 +81,7 @@ export const PaymentAggregateResultSchema = z.object({ _count: z.object({
|
||||
patientId: z.number().int().nullable(),
|
||||
userId: z.number().int().nullable(),
|
||||
updatedById: z.number().int().nullable(),
|
||||
npiProviderId: z.number().int().nullable(),
|
||||
totalBilled: z.number().nullable(),
|
||||
totalPaid: z.number().nullable(),
|
||||
totalAdjusted: z.number().nullable(),
|
||||
|
||||
@@ -5,6 +5,7 @@ export const PaymentCreateResultSchema = z.object({
|
||||
patientId: z.number().int(),
|
||||
userId: z.number().int(),
|
||||
updatedById: z.number().int().optional(),
|
||||
npiProviderId: z.number().int().optional(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
@@ -20,6 +21,8 @@ export const PaymentCreateResultSchema = z.object({
|
||||
claim: z.unknown().optional(),
|
||||
patient: z.unknown(),
|
||||
updatedBy: z.unknown().optional(),
|
||||
npiProvider: z.unknown().optional(),
|
||||
serviceLineTransactions: z.array(z.unknown()),
|
||||
serviceLines: z.array(z.unknown())
|
||||
serviceLines: z.array(z.unknown()),
|
||||
commissionBatchItems: z.array(z.unknown())
|
||||
});
|
||||
@@ -5,6 +5,7 @@ export const PaymentDeleteResultSchema = z.nullable(z.object({
|
||||
patientId: z.number().int(),
|
||||
userId: z.number().int(),
|
||||
updatedById: z.number().int().optional(),
|
||||
npiProviderId: z.number().int().optional(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
@@ -20,6 +21,8 @@ export const PaymentDeleteResultSchema = z.nullable(z.object({
|
||||
claim: z.unknown().optional(),
|
||||
patient: z.unknown(),
|
||||
updatedBy: z.unknown().optional(),
|
||||
npiProvider: z.unknown().optional(),
|
||||
serviceLineTransactions: z.array(z.unknown()),
|
||||
serviceLines: z.array(z.unknown())
|
||||
serviceLines: z.array(z.unknown()),
|
||||
commissionBatchItems: z.array(z.unknown())
|
||||
}));
|
||||
@@ -5,6 +5,7 @@ export const PaymentFindFirstResultSchema = z.nullable(z.object({
|
||||
patientId: z.number().int(),
|
||||
userId: z.number().int(),
|
||||
updatedById: z.number().int().optional(),
|
||||
npiProviderId: z.number().int().optional(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
@@ -20,6 +21,8 @@ export const PaymentFindFirstResultSchema = z.nullable(z.object({
|
||||
claim: z.unknown().optional(),
|
||||
patient: z.unknown(),
|
||||
updatedBy: z.unknown().optional(),
|
||||
npiProvider: z.unknown().optional(),
|
||||
serviceLineTransactions: z.array(z.unknown()),
|
||||
serviceLines: z.array(z.unknown())
|
||||
serviceLines: z.array(z.unknown()),
|
||||
commissionBatchItems: z.array(z.unknown())
|
||||
}));
|
||||
@@ -6,6 +6,7 @@ export const PaymentFindManyResultSchema = z.object({
|
||||
patientId: z.number().int(),
|
||||
userId: z.number().int(),
|
||||
updatedById: z.number().int().optional(),
|
||||
npiProviderId: z.number().int().optional(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
@@ -21,8 +22,10 @@ export const PaymentFindManyResultSchema = z.object({
|
||||
claim: z.unknown().optional(),
|
||||
patient: z.unknown(),
|
||||
updatedBy: z.unknown().optional(),
|
||||
npiProvider: z.unknown().optional(),
|
||||
serviceLineTransactions: z.array(z.unknown()),
|
||||
serviceLines: z.array(z.unknown())
|
||||
serviceLines: z.array(z.unknown()),
|
||||
commissionBatchItems: z.array(z.unknown())
|
||||
})),
|
||||
pagination: z.object({
|
||||
page: z.number().int().min(1),
|
||||
|
||||
@@ -5,6 +5,7 @@ export const PaymentFindUniqueResultSchema = z.nullable(z.object({
|
||||
patientId: z.number().int(),
|
||||
userId: z.number().int(),
|
||||
updatedById: z.number().int().optional(),
|
||||
npiProviderId: z.number().int().optional(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
@@ -20,6 +21,8 @@ export const PaymentFindUniqueResultSchema = z.nullable(z.object({
|
||||
claim: z.unknown().optional(),
|
||||
patient: z.unknown(),
|
||||
updatedBy: z.unknown().optional(),
|
||||
npiProvider: z.unknown().optional(),
|
||||
serviceLineTransactions: z.array(z.unknown()),
|
||||
serviceLines: z.array(z.unknown())
|
||||
serviceLines: z.array(z.unknown()),
|
||||
commissionBatchItems: z.array(z.unknown())
|
||||
}));
|
||||
@@ -5,6 +5,7 @@ export const PaymentGroupByResultSchema = z.array(z.object({
|
||||
patientId: z.number().int(),
|
||||
userId: z.number().int(),
|
||||
updatedById: z.number().int(),
|
||||
npiProviderId: z.number().int(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
@@ -22,6 +23,7 @@ export const PaymentGroupByResultSchema = z.array(z.object({
|
||||
patientId: z.number(),
|
||||
userId: z.number(),
|
||||
updatedById: z.number(),
|
||||
npiProviderId: z.number(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
@@ -37,8 +39,10 @@ export const PaymentGroupByResultSchema = z.array(z.object({
|
||||
claim: z.number(),
|
||||
patient: z.number(),
|
||||
updatedBy: z.number(),
|
||||
npiProvider: z.number(),
|
||||
serviceLineTransactions: z.number(),
|
||||
serviceLines: z.number()
|
||||
serviceLines: z.number(),
|
||||
commissionBatchItems: z.number()
|
||||
}).optional(),
|
||||
_sum: z.object({
|
||||
id: z.number().nullable(),
|
||||
@@ -46,6 +50,7 @@ export const PaymentGroupByResultSchema = z.array(z.object({
|
||||
patientId: z.number().nullable(),
|
||||
userId: z.number().nullable(),
|
||||
updatedById: z.number().nullable(),
|
||||
npiProviderId: z.number().nullable(),
|
||||
totalBilled: z.number().nullable(),
|
||||
totalPaid: z.number().nullable(),
|
||||
totalAdjusted: z.number().nullable(),
|
||||
@@ -60,6 +65,7 @@ export const PaymentGroupByResultSchema = z.array(z.object({
|
||||
patientId: z.number().nullable(),
|
||||
userId: z.number().nullable(),
|
||||
updatedById: z.number().nullable(),
|
||||
npiProviderId: z.number().nullable(),
|
||||
totalBilled: z.number().nullable(),
|
||||
totalPaid: z.number().nullable(),
|
||||
totalAdjusted: z.number().nullable(),
|
||||
@@ -74,6 +80,7 @@ export const PaymentGroupByResultSchema = z.array(z.object({
|
||||
patientId: z.number().int().nullable(),
|
||||
userId: z.number().int().nullable(),
|
||||
updatedById: z.number().int().nullable(),
|
||||
npiProviderId: z.number().int().nullable(),
|
||||
totalBilled: z.number().nullable(),
|
||||
totalPaid: z.number().nullable(),
|
||||
totalAdjusted: z.number().nullable(),
|
||||
@@ -92,6 +99,7 @@ export const PaymentGroupByResultSchema = z.array(z.object({
|
||||
patientId: z.number().int().nullable(),
|
||||
userId: z.number().int().nullable(),
|
||||
updatedById: z.number().int().nullable(),
|
||||
npiProviderId: z.number().int().nullable(),
|
||||
totalBilled: z.number().nullable(),
|
||||
totalPaid: z.number().nullable(),
|
||||
totalAdjusted: z.number().nullable(),
|
||||
|
||||
@@ -5,6 +5,7 @@ export const PaymentUpdateResultSchema = z.nullable(z.object({
|
||||
patientId: z.number().int(),
|
||||
userId: z.number().int(),
|
||||
updatedById: z.number().int().optional(),
|
||||
npiProviderId: z.number().int().optional(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
@@ -20,6 +21,8 @@ export const PaymentUpdateResultSchema = z.nullable(z.object({
|
||||
claim: z.unknown().optional(),
|
||||
patient: z.unknown(),
|
||||
updatedBy: z.unknown().optional(),
|
||||
npiProvider: z.unknown().optional(),
|
||||
serviceLineTransactions: z.array(z.unknown()),
|
||||
serviceLines: z.array(z.unknown())
|
||||
serviceLines: z.array(z.unknown()),
|
||||
commissionBatchItems: z.array(z.unknown())
|
||||
}));
|
||||
@@ -5,6 +5,7 @@ export const PaymentUpsertResultSchema = z.object({
|
||||
patientId: z.number().int(),
|
||||
userId: z.number().int(),
|
||||
updatedById: z.number().int().optional(),
|
||||
npiProviderId: z.number().int().optional(),
|
||||
totalBilled: z.number(),
|
||||
totalPaid: z.number(),
|
||||
totalAdjusted: z.number(),
|
||||
@@ -20,6 +21,8 @@ export const PaymentUpsertResultSchema = z.object({
|
||||
claim: z.unknown().optional(),
|
||||
patient: z.unknown(),
|
||||
updatedBy: z.unknown().optional(),
|
||||
npiProvider: z.unknown().optional(),
|
||||
serviceLineTransactions: z.array(z.unknown()),
|
||||
serviceLines: z.array(z.unknown())
|
||||
serviceLines: z.array(z.unknown()),
|
||||
commissionBatchItems: z.array(z.unknown())
|
||||
});
|
||||
@@ -401,3 +401,29 @@ export { PatientConversationDeleteManyResultSchema } from './PatientConversation
|
||||
export { PatientConversationAggregateResultSchema } from './PatientConversationAggregateResult.schema';
|
||||
export { PatientConversationGroupByResultSchema } from './PatientConversationGroupByResult.schema';
|
||||
export { PatientConversationCountResultSchema } from './PatientConversationCountResult.schema';
|
||||
export { CommissionBatchFindUniqueResultSchema } from './CommissionBatchFindUniqueResult.schema';
|
||||
export { CommissionBatchFindFirstResultSchema } from './CommissionBatchFindFirstResult.schema';
|
||||
export { CommissionBatchFindManyResultSchema } from './CommissionBatchFindManyResult.schema';
|
||||
export { CommissionBatchCreateResultSchema } from './CommissionBatchCreateResult.schema';
|
||||
export { CommissionBatchCreateManyResultSchema } from './CommissionBatchCreateManyResult.schema';
|
||||
export { CommissionBatchUpdateResultSchema } from './CommissionBatchUpdateResult.schema';
|
||||
export { CommissionBatchUpdateManyResultSchema } from './CommissionBatchUpdateManyResult.schema';
|
||||
export { CommissionBatchUpsertResultSchema } from './CommissionBatchUpsertResult.schema';
|
||||
export { CommissionBatchDeleteResultSchema } from './CommissionBatchDeleteResult.schema';
|
||||
export { CommissionBatchDeleteManyResultSchema } from './CommissionBatchDeleteManyResult.schema';
|
||||
export { CommissionBatchAggregateResultSchema } from './CommissionBatchAggregateResult.schema';
|
||||
export { CommissionBatchGroupByResultSchema } from './CommissionBatchGroupByResult.schema';
|
||||
export { CommissionBatchCountResultSchema } from './CommissionBatchCountResult.schema';
|
||||
export { CommissionBatchItemFindUniqueResultSchema } from './CommissionBatchItemFindUniqueResult.schema';
|
||||
export { CommissionBatchItemFindFirstResultSchema } from './CommissionBatchItemFindFirstResult.schema';
|
||||
export { CommissionBatchItemFindManyResultSchema } from './CommissionBatchItemFindManyResult.schema';
|
||||
export { CommissionBatchItemCreateResultSchema } from './CommissionBatchItemCreateResult.schema';
|
||||
export { CommissionBatchItemCreateManyResultSchema } from './CommissionBatchItemCreateManyResult.schema';
|
||||
export { CommissionBatchItemUpdateResultSchema } from './CommissionBatchItemUpdateResult.schema';
|
||||
export { CommissionBatchItemUpdateManyResultSchema } from './CommissionBatchItemUpdateManyResult.schema';
|
||||
export { CommissionBatchItemUpsertResultSchema } from './CommissionBatchItemUpsertResult.schema';
|
||||
export { CommissionBatchItemDeleteResultSchema } from './CommissionBatchItemDeleteResult.schema';
|
||||
export { CommissionBatchItemDeleteManyResultSchema } from './CommissionBatchItemDeleteManyResult.schema';
|
||||
export { CommissionBatchItemAggregateResultSchema } from './CommissionBatchItemAggregateResult.schema';
|
||||
export { CommissionBatchItemGroupByResultSchema } from './CommissionBatchItemGroupByResult.schema';
|
||||
export { CommissionBatchItemCountResultSchema } from './CommissionBatchItemCountResult.schema';
|
||||
|
||||
Reference in New Issue
Block a user