35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import * as z from 'zod';
|
|
import { PatientStatusSchema } from '../../enums/PatientStatus.schema';
|
|
// prettier-ignore
|
|
export const PatientInputSchema = z.object({
|
|
id: z.number().int(),
|
|
firstName: z.string(),
|
|
lastName: z.string(),
|
|
dateOfBirth: z.date(),
|
|
gender: z.string(),
|
|
phone: z.string(),
|
|
email: z.string().optional().nullable(),
|
|
address: z.string().optional().nullable(),
|
|
city: z.string().optional().nullable(),
|
|
zipCode: z.string().optional().nullable(),
|
|
insuranceProvider: z.string().optional().nullable(),
|
|
insuranceId: z.string().optional().nullable(),
|
|
groupNumber: z.string().optional().nullable(),
|
|
policyHolder: z.string().optional().nullable(),
|
|
allergies: z.string().optional().nullable(),
|
|
medicalConditions: z.string().optional().nullable(),
|
|
status: PatientStatusSchema,
|
|
userId: z.number().int(),
|
|
createdAt: z.date(),
|
|
user: z.unknown(),
|
|
appointments: z.array(z.unknown()),
|
|
procedures: z.array(z.unknown()),
|
|
claims: z.array(z.unknown()),
|
|
groups: z.array(z.unknown()),
|
|
payment: z.array(z.unknown()),
|
|
communications: z.array(z.unknown()),
|
|
documents: z.array(z.unknown())
|
|
}).strict();
|
|
|
|
export type PatientInputType = z.infer<typeof PatientInputSchema>;
|