import * as z from 'zod';
import type { Prisma } from '../../../generated/prisma';
import { MissingTeethStatusSchema } from '../enums/MissingTeethStatus.schema';
import { NullableJsonNullValueInputSchema } from '../enums/NullableJsonNullValueInput.schema';
import { ClaimStatusSchema } from '../enums/ClaimStatus.schema';
import { PatientCreateNestedOneWithoutClaimsInputObjectSchema as PatientCreateNestedOneWithoutClaimsInputObjectSchema } from './PatientCreateNestedOneWithoutClaimsInput.schema';
import { AppointmentCreateNestedOneWithoutClaimsInputObjectSchema as AppointmentCreateNestedOneWithoutClaimsInputObjectSchema } from './AppointmentCreateNestedOneWithoutClaimsInput.schema';
import { UserCreateNestedOneWithoutClaimsInputObjectSchema as UserCreateNestedOneWithoutClaimsInputObjectSchema } from './UserCreateNestedOneWithoutClaimsInput.schema';
import { StaffCreateNestedOneWithoutClaimsInputObjectSchema as StaffCreateNestedOneWithoutClaimsInputObjectSchema } from './StaffCreateNestedOneWithoutClaimsInput.schema';
import { NpiProviderCreateNestedOneWithoutClaimsInputObjectSchema as NpiProviderCreateNestedOneWithoutClaimsInputObjectSchema } from './NpiProviderCreateNestedOneWithoutClaimsInput.schema';
import { ServiceLineCreateNestedManyWithoutClaimInputObjectSchema as ServiceLineCreateNestedManyWithoutClaimInputObjectSchema } from './ServiceLineCreateNestedManyWithoutClaimInput.schema';
import { ClaimFileCreateNestedManyWithoutClaimInputObjectSchema as ClaimFileCreateNestedManyWithoutClaimInputObjectSchema } from './ClaimFileCreateNestedManyWithoutClaimInput.schema';
import { PaymentCreateNestedOneWithoutClaimInputObjectSchema as PaymentCreateNestedOneWithoutClaimInputObjectSchema } from './PaymentCreateNestedOneWithoutClaimInput.schema'

import { JsonValueSchema as jsonSchema } from '../../helpers/json-helpers';

const makeSchema = () => z.object({
  patientName: z.string(),
  memberId: z.string(),
  dateOfBirth: z.coerce.date(),
  remarks: z.string(),
  missingTeethStatus: MissingTeethStatusSchema.optional(),
  missingTeeth: z.union([NullableJsonNullValueInputSchema, jsonSchema]).optional(),
  serviceDate: z.coerce.date(),
  insuranceProvider: z.string(),
  createdAt: z.coerce.date().optional(),
  status: ClaimStatusSchema.optional(),
  claimNumber: z.string().optional().nullable(),
  preAuthNumber: z.string().optional().nullable(),
  patient: z.lazy(() => PatientCreateNestedOneWithoutClaimsInputObjectSchema),
  appointment: z.lazy(() => AppointmentCreateNestedOneWithoutClaimsInputObjectSchema).optional(),
  user: z.lazy(() => UserCreateNestedOneWithoutClaimsInputObjectSchema).optional(),
  staff: z.lazy(() => StaffCreateNestedOneWithoutClaimsInputObjectSchema).optional(),
  npiProvider: z.lazy(() => NpiProviderCreateNestedOneWithoutClaimsInputObjectSchema).optional(),
  serviceLines: z.lazy(() => ServiceLineCreateNestedManyWithoutClaimInputObjectSchema).optional(),
  claimFiles: z.lazy(() => ClaimFileCreateNestedManyWithoutClaimInputObjectSchema).optional(),
  payment: z.lazy(() => PaymentCreateNestedOneWithoutClaimInputObjectSchema).optional()
}).strict();
export const ClaimCreateInputObjectSchema: z.ZodType<Prisma.ClaimCreateInput> = makeSchema() as unknown as z.ZodType<Prisma.ClaimCreateInput>;
export const ClaimCreateInputObjectZodSchema = makeSchema();
