feat: share patients across all users

Removed per-user patient filtering so all staff accounts see the same
patient pool. Previously each user only saw patients they created.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ff
2026-05-17 23:04:26 -04:00
parent b148c0de30
commit 8cab823d60
219 changed files with 14090 additions and 718 deletions

View File

@@ -3,6 +3,7 @@ import type { Prisma } from '../../../generated/prisma';
import { IntWithAggregatesFilterObjectSchema as IntWithAggregatesFilterObjectSchema } from './IntWithAggregatesFilter.schema';
import { IntNullableWithAggregatesFilterObjectSchema as IntNullableWithAggregatesFilterObjectSchema } from './IntNullableWithAggregatesFilter.schema';
import { DecimalWithAggregatesFilterObjectSchema as DecimalWithAggregatesFilterObjectSchema } from './DecimalWithAggregatesFilter.schema';
import { DecimalNullableWithAggregatesFilterObjectSchema as DecimalNullableWithAggregatesFilterObjectSchema } from './DecimalNullableWithAggregatesFilter.schema';
import { EnumPaymentStatusWithAggregatesFilterObjectSchema as EnumPaymentStatusWithAggregatesFilterObjectSchema } from './EnumPaymentStatusWithAggregatesFilter.schema';
import { PaymentStatusSchema } from '../enums/PaymentStatus.schema';
import { StringNullableWithAggregatesFilterObjectSchema as StringNullableWithAggregatesFilterObjectSchema } from './StringNullableWithAggregatesFilter.schema';
@@ -20,6 +21,7 @@ const paymentscalarwherewithaggregatesinputSchema = z.object({
patientId: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
userId: z.union([z.lazy(() => IntWithAggregatesFilterObjectSchema), z.number().int()]).optional(),
updatedById: z.union([z.lazy(() => IntNullableWithAggregatesFilterObjectSchema), z.number().int()]).optional().nullable(),
npiProviderId: z.union([z.lazy(() => IntNullableWithAggregatesFilterObjectSchema), z.number().int()]).optional().nullable(),
totalBilled: z.union([z.lazy(() => DecimalWithAggregatesFilterObjectSchema), z.union([
z.number(),
z.string(),
@@ -55,6 +57,33 @@ const paymentscalarwherewithaggregatesinputSchema = z.object({
DecimalJSLikeSchema,
]).refine((v) => isValidDecimalInput(v), {
message: "Field 'totalDue' must be a Decimal",
})]).optional(),
mhPaidAmount: z.union([z.lazy(() => DecimalNullableWithAggregatesFilterObjectSchema), z.union([
z.number(),
z.string(),
z.instanceof(Decimal),
z.instanceof(Decimal),
DecimalJSLikeSchema,
]).refine((v) => isValidDecimalInput(v), {
message: "Field 'mhPaidAmount' must be a Decimal",
})]).optional().nullable(),
copayment: z.union([z.lazy(() => DecimalWithAggregatesFilterObjectSchema), z.union([
z.number(),
z.string(),
z.instanceof(Decimal),
z.instanceof(Decimal),
DecimalJSLikeSchema,
]).refine((v) => isValidDecimalInput(v), {
message: "Field 'copayment' must be a Decimal",
})]).optional(),
adjustment: z.union([z.lazy(() => DecimalWithAggregatesFilterObjectSchema), z.union([
z.number(),
z.string(),
z.instanceof(Decimal),
z.instanceof(Decimal),
DecimalJSLikeSchema,
]).refine((v) => isValidDecimalInput(v), {
message: "Field 'adjustment' must be a Decimal",
})]).optional(),
status: z.union([z.lazy(() => EnumPaymentStatusWithAggregatesFilterObjectSchema), PaymentStatusSchema]).optional(),
notes: z.union([z.lazy(() => StringNullableWithAggregatesFilterObjectSchema), z.string()]).optional().nullable(),