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
co-authored by Claude Sonnet 4.6
parent b148c0de30
commit 8cab823d60
219 changed files with 14090 additions and 718 deletions
@@ -9,6 +9,7 @@ import { StaffUncheckedUpdateManyWithoutUserNestedInputObjectSchema as StaffUnch
import { NpiProviderUncheckedUpdateManyWithoutUserNestedInputObjectSchema as NpiProviderUncheckedUpdateManyWithoutUserNestedInputObjectSchema } from './NpiProviderUncheckedUpdateManyWithoutUserNestedInput.schema';
import { ClaimUncheckedUpdateManyWithoutUserNestedInputObjectSchema as ClaimUncheckedUpdateManyWithoutUserNestedInputObjectSchema } from './ClaimUncheckedUpdateManyWithoutUserNestedInput.schema';
import { InsuranceCredentialUncheckedUpdateManyWithoutUserNestedInputObjectSchema as InsuranceCredentialUncheckedUpdateManyWithoutUserNestedInputObjectSchema } from './InsuranceCredentialUncheckedUpdateManyWithoutUserNestedInput.schema';
import { ShoppingVendorUncheckedUpdateManyWithoutUserNestedInputObjectSchema as ShoppingVendorUncheckedUpdateManyWithoutUserNestedInputObjectSchema } from './ShoppingVendorUncheckedUpdateManyWithoutUserNestedInput.schema';
import { PaymentUncheckedUpdateManyWithoutUpdatedByNestedInputObjectSchema as PaymentUncheckedUpdateManyWithoutUpdatedByNestedInputObjectSchema } from './PaymentUncheckedUpdateManyWithoutUpdatedByNestedInput.schema';
import { DatabaseBackupUncheckedUpdateManyWithoutUserNestedInputObjectSchema as DatabaseBackupUncheckedUpdateManyWithoutUserNestedInputObjectSchema } from './DatabaseBackupUncheckedUpdateManyWithoutUserNestedInput.schema';
import { BackupDestinationUncheckedUpdateManyWithoutUserNestedInputObjectSchema as BackupDestinationUncheckedUpdateManyWithoutUserNestedInputObjectSchema } from './BackupDestinationUncheckedUpdateManyWithoutUserNestedInput.schema';
@@ -20,7 +21,9 @@ import { TwilioSettingsUncheckedUpdateOneWithoutUserNestedInputObjectSchema as T
import { AiSettingsUncheckedUpdateOneWithoutUserNestedInputObjectSchema as AiSettingsUncheckedUpdateOneWithoutUserNestedInputObjectSchema } from './AiSettingsUncheckedUpdateOneWithoutUserNestedInput.schema';
import { OfficeHoursUncheckedUpdateOneWithoutUserNestedInputObjectSchema as OfficeHoursUncheckedUpdateOneWithoutUserNestedInputObjectSchema } from './OfficeHoursUncheckedUpdateOneWithoutUserNestedInput.schema';
import { OfficeContactUncheckedUpdateOneWithoutUserNestedInputObjectSchema as OfficeContactUncheckedUpdateOneWithoutUserNestedInputObjectSchema } from './OfficeContactUncheckedUpdateOneWithoutUserNestedInput.schema';
import { ProcedureTimeslotUncheckedUpdateOneWithoutUserNestedInputObjectSchema as ProcedureTimeslotUncheckedUpdateOneWithoutUserNestedInputObjectSchema } from './ProcedureTimeslotUncheckedUpdateOneWithoutUserNestedInput.schema'
import { ProcedureTimeslotUncheckedUpdateOneWithoutUserNestedInputObjectSchema as ProcedureTimeslotUncheckedUpdateOneWithoutUserNestedInputObjectSchema } from './ProcedureTimeslotUncheckedUpdateOneWithoutUserNestedInput.schema';
import { InsuranceContactUncheckedUpdateManyWithoutUserNestedInputObjectSchema as InsuranceContactUncheckedUpdateManyWithoutUserNestedInputObjectSchema } from './InsuranceContactUncheckedUpdateManyWithoutUserNestedInput.schema';
import { PatientConversationUncheckedUpdateManyWithoutUserNestedInputObjectSchema as PatientConversationUncheckedUpdateManyWithoutUserNestedInputObjectSchema } from './PatientConversationUncheckedUpdateManyWithoutUserNestedInput.schema'
const makeSchema = () => z.object({
id: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
@@ -34,6 +37,7 @@ const makeSchema = () => z.object({
npiProviders: z.lazy(() => NpiProviderUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
claims: z.lazy(() => ClaimUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
insuranceCredentials: z.lazy(() => InsuranceCredentialUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
shoppingVendors: z.lazy(() => ShoppingVendorUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
updatedPayments: z.lazy(() => PaymentUncheckedUpdateManyWithoutUpdatedByNestedInputObjectSchema).optional(),
backups: z.lazy(() => DatabaseBackupUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
backupDestinations: z.lazy(() => BackupDestinationUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
@@ -45,7 +49,9 @@ const makeSchema = () => z.object({
aiSettings: z.lazy(() => AiSettingsUncheckedUpdateOneWithoutUserNestedInputObjectSchema).optional(),
officeHours: z.lazy(() => OfficeHoursUncheckedUpdateOneWithoutUserNestedInputObjectSchema).optional(),
officeContact: z.lazy(() => OfficeContactUncheckedUpdateOneWithoutUserNestedInputObjectSchema).optional(),
procedureTimeslot: z.lazy(() => ProcedureTimeslotUncheckedUpdateOneWithoutUserNestedInputObjectSchema).optional()
procedureTimeslot: z.lazy(() => ProcedureTimeslotUncheckedUpdateOneWithoutUserNestedInputObjectSchema).optional(),
insuranceContacts: z.lazy(() => InsuranceContactUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional(),
patientConversations: z.lazy(() => PatientConversationUncheckedUpdateManyWithoutUserNestedInputObjectSchema).optional()
}).strict();
export const UserUncheckedUpdateInputObjectSchema: z.ZodType<Prisma.UserUncheckedUpdateInput> = makeSchema() as unknown as z.ZodType<Prisma.UserUncheckedUpdateInput>;
export const UserUncheckedUpdateInputObjectZodSchema = makeSchema();