import * as z from 'zod';
import type { Prisma } from '../../../generated/prisma';
import { IntFilterObjectSchema as IntFilterObjectSchema } from './IntFilter.schema';
import { StringFilterObjectSchema as StringFilterObjectSchema } from './StringFilter.schema';
import { DateTimeNullableFilterObjectSchema as DateTimeNullableFilterObjectSchema } from './DateTimeNullableFilter.schema';
import { StringNullableFilterObjectSchema as StringNullableFilterObjectSchema } from './StringNullableFilter.schema';
import { EnumPatientStatusFilterObjectSchema as EnumPatientStatusFilterObjectSchema } from './EnumPatientStatusFilter.schema';
import { PatientStatusSchema } from '../enums/PatientStatus.schema';
import { DateTimeFilterObjectSchema as DateTimeFilterObjectSchema } from './DateTimeFilter.schema';
import { UserScalarRelationFilterObjectSchema as UserScalarRelationFilterObjectSchema } from './UserScalarRelationFilter.schema';
import { UserWhereInputObjectSchema as UserWhereInputObjectSchema } from './UserWhereInput.schema';
import { AppointmentListRelationFilterObjectSchema as AppointmentListRelationFilterObjectSchema } from './AppointmentListRelationFilter.schema';
import { AppointmentProcedureListRelationFilterObjectSchema as AppointmentProcedureListRelationFilterObjectSchema } from './AppointmentProcedureListRelationFilter.schema';
import { ClaimListRelationFilterObjectSchema as ClaimListRelationFilterObjectSchema } from './ClaimListRelationFilter.schema';
import { PdfGroupListRelationFilterObjectSchema as PdfGroupListRelationFilterObjectSchema } from './PdfGroupListRelationFilter.schema';
import { PaymentListRelationFilterObjectSchema as PaymentListRelationFilterObjectSchema } from './PaymentListRelationFilter.schema';
import { CommunicationListRelationFilterObjectSchema as CommunicationListRelationFilterObjectSchema } from './CommunicationListRelationFilter.schema';
import { PatientDocumentListRelationFilterObjectSchema as PatientDocumentListRelationFilterObjectSchema } from './PatientDocumentListRelationFilter.schema';
import { PatientConversationNullableScalarRelationFilterObjectSchema as PatientConversationNullableScalarRelationFilterObjectSchema } from './PatientConversationNullableScalarRelationFilter.schema';
import { PatientConversationWhereInputObjectSchema as PatientConversationWhereInputObjectSchema } from './PatientConversationWhereInput.schema';
import { CloudFolderListRelationFilterObjectSchema as CloudFolderListRelationFilterObjectSchema } from './CloudFolderListRelationFilter.schema'

const patientwhereinputSchema = z.object({
  AND: z.union([z.lazy(() => PatientWhereInputObjectSchema), z.lazy(() => PatientWhereInputObjectSchema).array()]).optional(),
  OR: z.lazy(() => PatientWhereInputObjectSchema).array().optional(),
  NOT: z.union([z.lazy(() => PatientWhereInputObjectSchema), z.lazy(() => PatientWhereInputObjectSchema).array()]).optional(),
  id: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
  firstName: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
  lastName: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
  dateOfBirth: z.union([z.lazy(() => DateTimeNullableFilterObjectSchema), z.coerce.date()]).optional().nullable(),
  gender: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
  phone: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
  email: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  address: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  city: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  zipCode: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  insuranceProvider: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  insuranceId: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  groupNumber: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  policyHolder: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  allergies: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  medicalConditions: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  preferredLanguage: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
  status: z.union([z.lazy(() => EnumPatientStatusFilterObjectSchema), PatientStatusSchema]).optional(),
  userId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
  createdAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
  updatedAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
  user: z.union([z.lazy(() => UserScalarRelationFilterObjectSchema), z.lazy(() => UserWhereInputObjectSchema)]).optional(),
  appointments: z.lazy(() => AppointmentListRelationFilterObjectSchema).optional(),
  procedures: z.lazy(() => AppointmentProcedureListRelationFilterObjectSchema).optional(),
  claims: z.lazy(() => ClaimListRelationFilterObjectSchema).optional(),
  groups: z.lazy(() => PdfGroupListRelationFilterObjectSchema).optional(),
  payment: z.lazy(() => PaymentListRelationFilterObjectSchema).optional(),
  communications: z.lazy(() => CommunicationListRelationFilterObjectSchema).optional(),
  documents: z.lazy(() => PatientDocumentListRelationFilterObjectSchema).optional(),
  conversation: z.union([z.lazy(() => PatientConversationNullableScalarRelationFilterObjectSchema), z.lazy(() => PatientConversationWhereInputObjectSchema)]).optional(),
  cloudFolders: z.lazy(() => CloudFolderListRelationFilterObjectSchema).optional()
}).strict();
export const PatientWhereInputObjectSchema: z.ZodType<Prisma.PatientWhereInput> = patientwhereinputSchema as unknown as z.ZodType<Prisma.PatientWhereInput>;
export const PatientWhereInputObjectZodSchema = patientwhereinputSchema;
