UNPKG

emr-types

Version:

Comprehensive TypeScript Types Library for Electronic Medical Record (EMR) Applications - Domain-Driven Design with Zod Validation

1,336 lines 325 kB
import { z } from 'zod'; import { PatientStatus, Gender, BloodType } from '../domains/patient'; export declare const PatientIdSchema: z.ZodBranded<z.ZodString, "PatientId">; export declare const PatientCodeSchema: z.ZodBranded<z.ZodString, "PatientCode">; export declare const PhoneNumberSchema: z.ZodBranded<z.ZodString, "PhoneNumber">; export declare const PatientStatusSchema: z.ZodNativeEnum<typeof PatientStatus>; export declare const GenderSchema: z.ZodNativeEnum<typeof Gender>; export declare const BloodTypeSchema: z.ZodNativeEnum<typeof BloodType>; export declare const PatientIdValueObjectSchema: z.ZodObject<{ value: z.ZodBranded<z.ZodString, "PatientId">; format: z.ZodEnum<["uuid", "auto-increment", "custom"]>; createdAt: z.ZodDate; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { value: string & z.BRAND<"PatientId">; createdAt: Date; format: "uuid" | "custom" | "auto-increment"; metadata?: Record<string, unknown> | undefined; }, { value: string; createdAt: Date; format: "uuid" | "custom" | "auto-increment"; metadata?: Record<string, unknown> | undefined; }>; export declare const PatientCodeValueObjectSchema: z.ZodObject<{ value: z.ZodBranded<z.ZodString, "PatientCode">; format: z.ZodEnum<["numeric", "alphanumeric", "custom"]>; prefix: z.ZodOptional<z.ZodString>; sequence: z.ZodNumber; createdAt: z.ZodDate; }, "strip", z.ZodTypeAny, { value: string & z.BRAND<"PatientCode">; createdAt: Date; format: "custom" | "numeric" | "alphanumeric"; sequence: number; prefix?: string | undefined; }, { value: string; createdAt: Date; format: "custom" | "numeric" | "alphanumeric"; sequence: number; prefix?: string | undefined; }>; export declare const PhoneNumberValueObjectSchema: z.ZodObject<{ value: z.ZodBranded<z.ZodString, "PhoneNumber">; type: z.ZodEnum<["mobile", "home", "work", "emergency"]>; isVerified: z.ZodBoolean; verifiedAt: z.ZodOptional<z.ZodDate>; isPrimary: z.ZodBoolean; createdAt: z.ZodDate; }, "strip", z.ZodTypeAny, { value: string & z.BRAND<"PhoneNumber">; type: "mobile" | "emergency" | "home" | "work"; createdAt: Date; isVerified: boolean; isPrimary: boolean; verifiedAt?: Date | undefined; }, { value: string; type: "mobile" | "emergency" | "home" | "work"; createdAt: Date; isVerified: boolean; isPrimary: boolean; verifiedAt?: Date | undefined; }>; export declare const AddressValueObjectSchema: z.ZodObject<{ street: z.ZodString; city: z.ZodString; state: z.ZodString; postalCode: z.ZodString; country: z.ZodString; type: z.ZodEnum<["home", "work", "mailing", "billing"]>; isVerified: z.ZodBoolean; verifiedAt: z.ZodOptional<z.ZodDate>; isPrimary: z.ZodBoolean; createdAt: z.ZodDate; }, "strip", z.ZodTypeAny, { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; }, { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; }>; export declare const PatientProfileSchema: z.ZodObject<{ id: z.ZodBranded<z.ZodString, "PatientId">; firstName: z.ZodString; lastName: z.ZodString; middleName: z.ZodOptional<z.ZodString>; dateOfBirth: z.ZodDate; gender: z.ZodNativeEnum<typeof Gender>; bloodType: z.ZodOptional<z.ZodNativeEnum<typeof BloodType>>; height: z.ZodOptional<z.ZodNumber>; weight: z.ZodOptional<z.ZodNumber>; bmi: z.ZodOptional<z.ZodNumber>; ethnicity: z.ZodOptional<z.ZodString>; nationality: z.ZodOptional<z.ZodString>; language: z.ZodOptional<z.ZodString>; occupation: z.ZodOptional<z.ZodString>; education: z.ZodOptional<z.ZodString>; maritalStatus: z.ZodOptional<z.ZodEnum<["single", "married", "divorced", "widowed", "separated"]>>; emergencyContact: z.ZodOptional<z.ZodObject<{ name: z.ZodString; relationship: z.ZodString; phoneNumber: z.ZodBranded<z.ZodString, "PhoneNumber">; email: z.ZodOptional<z.ZodString>; address: z.ZodOptional<z.ZodObject<{ street: z.ZodString; city: z.ZodString; state: z.ZodString; postalCode: z.ZodString; country: z.ZodString; type: z.ZodEnum<["home", "work", "mailing", "billing"]>; isVerified: z.ZodBoolean; verifiedAt: z.ZodOptional<z.ZodDate>; isPrimary: z.ZodBoolean; createdAt: z.ZodDate; }, "strip", z.ZodTypeAny, { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; }, { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; }>>; }, "strip", z.ZodTypeAny, { phoneNumber: string & z.BRAND<"PhoneNumber">; name: string; relationship: string; email?: string | undefined; address?: { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; } | undefined; }, { phoneNumber: string; name: string; relationship: string; email?: string | undefined; address?: { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; } | undefined; }>>; insurance: z.ZodOptional<z.ZodObject<{ provider: z.ZodString; policyNumber: z.ZodString; groupNumber: z.ZodOptional<z.ZodString>; subscriberName: z.ZodString; relationship: z.ZodString; effectiveDate: z.ZodDate; expiryDate: z.ZodOptional<z.ZodDate>; copay: z.ZodOptional<z.ZodNumber>; deductible: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { provider: string; relationship: string; policyNumber: string; subscriberName: string; effectiveDate: Date; expiryDate?: Date | undefined; groupNumber?: string | undefined; copay?: number | undefined; deductible?: number | undefined; }, { provider: string; relationship: string; policyNumber: string; subscriberName: string; effectiveDate: Date; expiryDate?: Date | undefined; groupNumber?: string | undefined; copay?: number | undefined; deductible?: number | undefined; }>>; preferences: z.ZodOptional<z.ZodObject<{ communicationMethod: z.ZodOptional<z.ZodEnum<["email", "sms", "phone", "mail"]>>; appointmentReminders: z.ZodOptional<z.ZodBoolean>; marketingConsent: z.ZodOptional<z.ZodBoolean>; privacyConsent: z.ZodOptional<z.ZodBoolean>; language: z.ZodOptional<z.ZodString>; timezone: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { language?: string | undefined; timezone?: string | undefined; communicationMethod?: "sms" | "email" | "phone" | "mail" | undefined; appointmentReminders?: boolean | undefined; marketingConsent?: boolean | undefined; privacyConsent?: boolean | undefined; }, { language?: string | undefined; timezone?: string | undefined; communicationMethod?: "sms" | "email" | "phone" | "mail" | undefined; appointmentReminders?: boolean | undefined; marketingConsent?: boolean | undefined; privacyConsent?: boolean | undefined; }>>; createdAt: z.ZodDate; updatedAt: z.ZodDate; createdBy: z.ZodOptional<z.ZodString>; updatedBy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string & z.BRAND<"PatientId">; createdAt: Date; updatedAt: Date; firstName: string; lastName: string; dateOfBirth: Date; gender: Gender; insurance?: { provider: string; relationship: string; policyNumber: string; subscriberName: string; effectiveDate: Date; expiryDate?: Date | undefined; groupNumber?: string | undefined; copay?: number | undefined; deductible?: number | undefined; } | undefined; createdBy?: string | undefined; updatedBy?: string | undefined; middleName?: string | undefined; bloodType?: BloodType | undefined; height?: number | undefined; weight?: number | undefined; bmi?: number | undefined; emergencyContact?: { phoneNumber: string & z.BRAND<"PhoneNumber">; name: string; relationship: string; email?: string | undefined; address?: { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; } | undefined; } | undefined; preferences?: { language?: string | undefined; timezone?: string | undefined; communicationMethod?: "sms" | "email" | "phone" | "mail" | undefined; appointmentReminders?: boolean | undefined; marketingConsent?: boolean | undefined; privacyConsent?: boolean | undefined; } | undefined; language?: string | undefined; education?: string | undefined; ethnicity?: string | undefined; nationality?: string | undefined; occupation?: string | undefined; maritalStatus?: "single" | "married" | "divorced" | "widowed" | "separated" | undefined; }, { id: string; createdAt: Date; updatedAt: Date; firstName: string; lastName: string; dateOfBirth: Date; gender: Gender; insurance?: { provider: string; relationship: string; policyNumber: string; subscriberName: string; effectiveDate: Date; expiryDate?: Date | undefined; groupNumber?: string | undefined; copay?: number | undefined; deductible?: number | undefined; } | undefined; createdBy?: string | undefined; updatedBy?: string | undefined; middleName?: string | undefined; bloodType?: BloodType | undefined; height?: number | undefined; weight?: number | undefined; bmi?: number | undefined; emergencyContact?: { phoneNumber: string; name: string; relationship: string; email?: string | undefined; address?: { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; } | undefined; } | undefined; preferences?: { language?: string | undefined; timezone?: string | undefined; communicationMethod?: "sms" | "email" | "phone" | "mail" | undefined; appointmentReminders?: boolean | undefined; marketingConsent?: boolean | undefined; privacyConsent?: boolean | undefined; } | undefined; language?: string | undefined; education?: string | undefined; ethnicity?: string | undefined; nationality?: string | undefined; occupation?: string | undefined; maritalStatus?: "single" | "married" | "divorced" | "widowed" | "separated" | undefined; }>; export declare const MedicalHistorySchema: z.ZodObject<{ id: z.ZodString; patientId: z.ZodBranded<z.ZodString, "PatientId">; allergies: z.ZodOptional<z.ZodArray<z.ZodObject<{ allergen: z.ZodString; severity: z.ZodEnum<["mild", "moderate", "severe"]>; reaction: z.ZodString; onsetDate: z.ZodOptional<z.ZodDate>; isActive: z.ZodBoolean; }, "strip", z.ZodTypeAny, { severity: "moderate" | "mild" | "severe"; isActive: boolean; allergen: string; reaction: string; onsetDate?: Date | undefined; }, { severity: "moderate" | "mild" | "severe"; isActive: boolean; allergen: string; reaction: string; onsetDate?: Date | undefined; }>, "many">>; medications: z.ZodOptional<z.ZodArray<z.ZodObject<{ name: z.ZodString; dosage: z.ZodString; frequency: z.ZodString; route: z.ZodEnum<["oral", "intravenous", "intramuscular", "subcutaneous", "topical", "inhalation"]>; startDate: z.ZodDate; endDate: z.ZodOptional<z.ZodDate>; isActive: z.ZodBoolean; prescribedBy: z.ZodOptional<z.ZodString>; notes: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; dosage: string; frequency: string; route: "oral" | "intravenous" | "intramuscular" | "subcutaneous" | "topical" | "inhalation"; startDate: Date; isActive: boolean; notes?: string | undefined; endDate?: Date | undefined; prescribedBy?: string | undefined; }, { name: string; dosage: string; frequency: string; route: "oral" | "intravenous" | "intramuscular" | "subcutaneous" | "topical" | "inhalation"; startDate: Date; isActive: boolean; notes?: string | undefined; endDate?: Date | undefined; prescribedBy?: string | undefined; }>, "many">>; conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{ name: z.ZodString; icd10Code: z.ZodOptional<z.ZodString>; diagnosisDate: z.ZodDate; severity: z.ZodEnum<["mild", "moderate", "severe"]>; isActive: z.ZodBoolean; notes: z.ZodOptional<z.ZodString>; diagnosedBy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; severity: "moderate" | "mild" | "severe"; isActive: boolean; diagnosisDate: Date; notes?: string | undefined; icd10Code?: string | undefined; diagnosedBy?: string | undefined; }, { name: string; severity: "moderate" | "mild" | "severe"; isActive: boolean; diagnosisDate: Date; notes?: string | undefined; icd10Code?: string | undefined; diagnosedBy?: string | undefined; }>, "many">>; surgeries: z.ZodOptional<z.ZodArray<z.ZodObject<{ procedure: z.ZodString; date: z.ZodDate; surgeon: z.ZodOptional<z.ZodString>; hospital: z.ZodOptional<z.ZodString>; notes: z.ZodOptional<z.ZodString>; complications: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { procedure: string; date: Date; hospital?: string | undefined; notes?: string | undefined; surgeon?: string | undefined; complications?: string | undefined; }, { procedure: string; date: Date; hospital?: string | undefined; notes?: string | undefined; surgeon?: string | undefined; complications?: string | undefined; }>, "many">>; immunizations: z.ZodOptional<z.ZodArray<z.ZodObject<{ vaccine: z.ZodString; date: z.ZodDate; nextDueDate: z.ZodOptional<z.ZodDate>; administeredBy: z.ZodOptional<z.ZodString>; lotNumber: z.ZodOptional<z.ZodString>; notes: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { date: Date; vaccine: string; notes?: string | undefined; nextDueDate?: Date | undefined; administeredBy?: string | undefined; lotNumber?: string | undefined; }, { date: Date; vaccine: string; notes?: string | undefined; nextDueDate?: Date | undefined; administeredBy?: string | undefined; lotNumber?: string | undefined; }>, "many">>; familyHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ relationship: z.ZodString; condition: z.ZodString; ageOfOnset: z.ZodOptional<z.ZodNumber>; isDeceased: z.ZodOptional<z.ZodBoolean>; notes: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { relationship: string; condition: string; notes?: string | undefined; ageOfOnset?: number | undefined; isDeceased?: boolean | undefined; }, { relationship: string; condition: string; notes?: string | undefined; ageOfOnset?: number | undefined; isDeceased?: boolean | undefined; }>, "many">>; socialHistory: z.ZodOptional<z.ZodObject<{ smoking: z.ZodOptional<z.ZodEnum<["never", "former", "current"]>>; alcohol: z.ZodOptional<z.ZodEnum<["never", "occasional", "moderate", "heavy"]>>; drugs: z.ZodOptional<z.ZodEnum<["never", "former", "current"]>>; exercise: z.ZodOptional<z.ZodEnum<["none", "light", "moderate", "heavy"]>>; diet: z.ZodOptional<z.ZodString>; occupation: z.ZodOptional<z.ZodString>; livingSituation: z.ZodOptional<z.ZodString>; notes: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { notes?: string | undefined; exercise?: "light" | "none" | "moderate" | "heavy" | undefined; occupation?: string | undefined; smoking?: "never" | "former" | "current" | undefined; alcohol?: "never" | "occasional" | "moderate" | "heavy" | undefined; drugs?: "never" | "former" | "current" | undefined; diet?: string | undefined; livingSituation?: string | undefined; }, { notes?: string | undefined; exercise?: "light" | "none" | "moderate" | "heavy" | undefined; occupation?: string | undefined; smoking?: "never" | "former" | "current" | undefined; alcohol?: "never" | "occasional" | "moderate" | "heavy" | undefined; drugs?: "never" | "former" | "current" | undefined; diet?: string | undefined; livingSituation?: string | undefined; }>>; createdAt: z.ZodDate; updatedAt: z.ZodDate; createdBy: z.ZodOptional<z.ZodString>; updatedBy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; createdAt: Date; updatedAt: Date; patientId: string & z.BRAND<"PatientId">; createdBy?: string | undefined; updatedBy?: string | undefined; allergies?: { severity: "moderate" | "mild" | "severe"; isActive: boolean; allergen: string; reaction: string; onsetDate?: Date | undefined; }[] | undefined; familyHistory?: { relationship: string; condition: string; notes?: string | undefined; ageOfOnset?: number | undefined; isDeceased?: boolean | undefined; }[] | undefined; immunizations?: { date: Date; vaccine: string; notes?: string | undefined; nextDueDate?: Date | undefined; administeredBy?: string | undefined; lotNumber?: string | undefined; }[] | undefined; socialHistory?: { notes?: string | undefined; exercise?: "light" | "none" | "moderate" | "heavy" | undefined; occupation?: string | undefined; smoking?: "never" | "former" | "current" | undefined; alcohol?: "never" | "occasional" | "moderate" | "heavy" | undefined; drugs?: "never" | "former" | "current" | undefined; diet?: string | undefined; livingSituation?: string | undefined; } | undefined; medications?: { name: string; dosage: string; frequency: string; route: "oral" | "intravenous" | "intramuscular" | "subcutaneous" | "topical" | "inhalation"; startDate: Date; isActive: boolean; notes?: string | undefined; endDate?: Date | undefined; prescribedBy?: string | undefined; }[] | undefined; conditions?: { name: string; severity: "moderate" | "mild" | "severe"; isActive: boolean; diagnosisDate: Date; notes?: string | undefined; icd10Code?: string | undefined; diagnosedBy?: string | undefined; }[] | undefined; surgeries?: { procedure: string; date: Date; hospital?: string | undefined; notes?: string | undefined; surgeon?: string | undefined; complications?: string | undefined; }[] | undefined; }, { id: string; createdAt: Date; updatedAt: Date; patientId: string; createdBy?: string | undefined; updatedBy?: string | undefined; allergies?: { severity: "moderate" | "mild" | "severe"; isActive: boolean; allergen: string; reaction: string; onsetDate?: Date | undefined; }[] | undefined; familyHistory?: { relationship: string; condition: string; notes?: string | undefined; ageOfOnset?: number | undefined; isDeceased?: boolean | undefined; }[] | undefined; immunizations?: { date: Date; vaccine: string; notes?: string | undefined; nextDueDate?: Date | undefined; administeredBy?: string | undefined; lotNumber?: string | undefined; }[] | undefined; socialHistory?: { notes?: string | undefined; exercise?: "light" | "none" | "moderate" | "heavy" | undefined; occupation?: string | undefined; smoking?: "never" | "former" | "current" | undefined; alcohol?: "never" | "occasional" | "moderate" | "heavy" | undefined; drugs?: "never" | "former" | "current" | undefined; diet?: string | undefined; livingSituation?: string | undefined; } | undefined; medications?: { name: string; dosage: string; frequency: string; route: "oral" | "intravenous" | "intramuscular" | "subcutaneous" | "topical" | "inhalation"; startDate: Date; isActive: boolean; notes?: string | undefined; endDate?: Date | undefined; prescribedBy?: string | undefined; }[] | undefined; conditions?: { name: string; severity: "moderate" | "mild" | "severe"; isActive: boolean; diagnosisDate: Date; notes?: string | undefined; icd10Code?: string | undefined; diagnosedBy?: string | undefined; }[] | undefined; surgeries?: { procedure: string; date: Date; hospital?: string | undefined; notes?: string | undefined; surgeon?: string | undefined; complications?: string | undefined; }[] | undefined; }>; export declare const PatientSchema: z.ZodObject<{ id: z.ZodBranded<z.ZodString, "PatientId">; code: z.ZodObject<{ value: z.ZodBranded<z.ZodString, "PatientCode">; format: z.ZodEnum<["numeric", "alphanumeric", "custom"]>; prefix: z.ZodOptional<z.ZodString>; sequence: z.ZodNumber; createdAt: z.ZodDate; }, "strip", z.ZodTypeAny, { value: string & z.BRAND<"PatientCode">; createdAt: Date; format: "custom" | "numeric" | "alphanumeric"; sequence: number; prefix?: string | undefined; }, { value: string; createdAt: Date; format: "custom" | "numeric" | "alphanumeric"; sequence: number; prefix?: string | undefined; }>; status: z.ZodNativeEnum<typeof PatientStatus>; profile: z.ZodObject<{ id: z.ZodBranded<z.ZodString, "PatientId">; firstName: z.ZodString; lastName: z.ZodString; middleName: z.ZodOptional<z.ZodString>; dateOfBirth: z.ZodDate; gender: z.ZodNativeEnum<typeof Gender>; bloodType: z.ZodOptional<z.ZodNativeEnum<typeof BloodType>>; height: z.ZodOptional<z.ZodNumber>; weight: z.ZodOptional<z.ZodNumber>; bmi: z.ZodOptional<z.ZodNumber>; ethnicity: z.ZodOptional<z.ZodString>; nationality: z.ZodOptional<z.ZodString>; language: z.ZodOptional<z.ZodString>; occupation: z.ZodOptional<z.ZodString>; education: z.ZodOptional<z.ZodString>; maritalStatus: z.ZodOptional<z.ZodEnum<["single", "married", "divorced", "widowed", "separated"]>>; emergencyContact: z.ZodOptional<z.ZodObject<{ name: z.ZodString; relationship: z.ZodString; phoneNumber: z.ZodBranded<z.ZodString, "PhoneNumber">; email: z.ZodOptional<z.ZodString>; address: z.ZodOptional<z.ZodObject<{ street: z.ZodString; city: z.ZodString; state: z.ZodString; postalCode: z.ZodString; country: z.ZodString; type: z.ZodEnum<["home", "work", "mailing", "billing"]>; isVerified: z.ZodBoolean; verifiedAt: z.ZodOptional<z.ZodDate>; isPrimary: z.ZodBoolean; createdAt: z.ZodDate; }, "strip", z.ZodTypeAny, { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; }, { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; }>>; }, "strip", z.ZodTypeAny, { phoneNumber: string & z.BRAND<"PhoneNumber">; name: string; relationship: string; email?: string | undefined; address?: { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; } | undefined; }, { phoneNumber: string; name: string; relationship: string; email?: string | undefined; address?: { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; } | undefined; }>>; insurance: z.ZodOptional<z.ZodObject<{ provider: z.ZodString; policyNumber: z.ZodString; groupNumber: z.ZodOptional<z.ZodString>; subscriberName: z.ZodString; relationship: z.ZodString; effectiveDate: z.ZodDate; expiryDate: z.ZodOptional<z.ZodDate>; copay: z.ZodOptional<z.ZodNumber>; deductible: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { provider: string; relationship: string; policyNumber: string; subscriberName: string; effectiveDate: Date; expiryDate?: Date | undefined; groupNumber?: string | undefined; copay?: number | undefined; deductible?: number | undefined; }, { provider: string; relationship: string; policyNumber: string; subscriberName: string; effectiveDate: Date; expiryDate?: Date | undefined; groupNumber?: string | undefined; copay?: number | undefined; deductible?: number | undefined; }>>; preferences: z.ZodOptional<z.ZodObject<{ communicationMethod: z.ZodOptional<z.ZodEnum<["email", "sms", "phone", "mail"]>>; appointmentReminders: z.ZodOptional<z.ZodBoolean>; marketingConsent: z.ZodOptional<z.ZodBoolean>; privacyConsent: z.ZodOptional<z.ZodBoolean>; language: z.ZodOptional<z.ZodString>; timezone: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { language?: string | undefined; timezone?: string | undefined; communicationMethod?: "sms" | "email" | "phone" | "mail" | undefined; appointmentReminders?: boolean | undefined; marketingConsent?: boolean | undefined; privacyConsent?: boolean | undefined; }, { language?: string | undefined; timezone?: string | undefined; communicationMethod?: "sms" | "email" | "phone" | "mail" | undefined; appointmentReminders?: boolean | undefined; marketingConsent?: boolean | undefined; privacyConsent?: boolean | undefined; }>>; createdAt: z.ZodDate; updatedAt: z.ZodDate; createdBy: z.ZodOptional<z.ZodString>; updatedBy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string & z.BRAND<"PatientId">; createdAt: Date; updatedAt: Date; firstName: string; lastName: string; dateOfBirth: Date; gender: Gender; insurance?: { provider: string; relationship: string; policyNumber: string; subscriberName: string; effectiveDate: Date; expiryDate?: Date | undefined; groupNumber?: string | undefined; copay?: number | undefined; deductible?: number | undefined; } | undefined; createdBy?: string | undefined; updatedBy?: string | undefined; middleName?: string | undefined; bloodType?: BloodType | undefined; height?: number | undefined; weight?: number | undefined; bmi?: number | undefined; emergencyContact?: { phoneNumber: string & z.BRAND<"PhoneNumber">; name: string; relationship: string; email?: string | undefined; address?: { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; } | undefined; } | undefined; preferences?: { language?: string | undefined; timezone?: string | undefined; communicationMethod?: "sms" | "email" | "phone" | "mail" | undefined; appointmentReminders?: boolean | undefined; marketingConsent?: boolean | undefined; privacyConsent?: boolean | undefined; } | undefined; language?: string | undefined; education?: string | undefined; ethnicity?: string | undefined; nationality?: string | undefined; occupation?: string | undefined; maritalStatus?: "single" | "married" | "divorced" | "widowed" | "separated" | undefined; }, { id: string; createdAt: Date; updatedAt: Date; firstName: string; lastName: string; dateOfBirth: Date; gender: Gender; insurance?: { provider: string; relationship: string; policyNumber: string; subscriberName: string; effectiveDate: Date; expiryDate?: Date | undefined; groupNumber?: string | undefined; copay?: number | undefined; deductible?: number | undefined; } | undefined; createdBy?: string | undefined; updatedBy?: string | undefined; middleName?: string | undefined; bloodType?: BloodType | undefined; height?: number | undefined; weight?: number | undefined; bmi?: number | undefined; emergencyContact?: { phoneNumber: string; name: string; relationship: string; email?: string | undefined; address?: { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; } | undefined; } | undefined; preferences?: { language?: string | undefined; timezone?: string | undefined; communicationMethod?: "sms" | "email" | "phone" | "mail" | undefined; appointmentReminders?: boolean | undefined; marketingConsent?: boolean | undefined; privacyConsent?: boolean | undefined; } | undefined; language?: string | undefined; education?: string | undefined; ethnicity?: string | undefined; nationality?: string | undefined; occupation?: string | undefined; maritalStatus?: "single" | "married" | "divorced" | "widowed" | "separated" | undefined; }>; medicalHistory: z.ZodOptional<z.ZodObject<{ id: z.ZodString; patientId: z.ZodBranded<z.ZodString, "PatientId">; allergies: z.ZodOptional<z.ZodArray<z.ZodObject<{ allergen: z.ZodString; severity: z.ZodEnum<["mild", "moderate", "severe"]>; reaction: z.ZodString; onsetDate: z.ZodOptional<z.ZodDate>; isActive: z.ZodBoolean; }, "strip", z.ZodTypeAny, { severity: "moderate" | "mild" | "severe"; isActive: boolean; allergen: string; reaction: string; onsetDate?: Date | undefined; }, { severity: "moderate" | "mild" | "severe"; isActive: boolean; allergen: string; reaction: string; onsetDate?: Date | undefined; }>, "many">>; medications: z.ZodOptional<z.ZodArray<z.ZodObject<{ name: z.ZodString; dosage: z.ZodString; frequency: z.ZodString; route: z.ZodEnum<["oral", "intravenous", "intramuscular", "subcutaneous", "topical", "inhalation"]>; startDate: z.ZodDate; endDate: z.ZodOptional<z.ZodDate>; isActive: z.ZodBoolean; prescribedBy: z.ZodOptional<z.ZodString>; notes: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; dosage: string; frequency: string; route: "oral" | "intravenous" | "intramuscular" | "subcutaneous" | "topical" | "inhalation"; startDate: Date; isActive: boolean; notes?: string | undefined; endDate?: Date | undefined; prescribedBy?: string | undefined; }, { name: string; dosage: string; frequency: string; route: "oral" | "intravenous" | "intramuscular" | "subcutaneous" | "topical" | "inhalation"; startDate: Date; isActive: boolean; notes?: string | undefined; endDate?: Date | undefined; prescribedBy?: string | undefined; }>, "many">>; conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{ name: z.ZodString; icd10Code: z.ZodOptional<z.ZodString>; diagnosisDate: z.ZodDate; severity: z.ZodEnum<["mild", "moderate", "severe"]>; isActive: z.ZodBoolean; notes: z.ZodOptional<z.ZodString>; diagnosedBy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { name: string; severity: "moderate" | "mild" | "severe"; isActive: boolean; diagnosisDate: Date; notes?: string | undefined; icd10Code?: string | undefined; diagnosedBy?: string | undefined; }, { name: string; severity: "moderate" | "mild" | "severe"; isActive: boolean; diagnosisDate: Date; notes?: string | undefined; icd10Code?: string | undefined; diagnosedBy?: string | undefined; }>, "many">>; surgeries: z.ZodOptional<z.ZodArray<z.ZodObject<{ procedure: z.ZodString; date: z.ZodDate; surgeon: z.ZodOptional<z.ZodString>; hospital: z.ZodOptional<z.ZodString>; notes: z.ZodOptional<z.ZodString>; complications: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { procedure: string; date: Date; hospital?: string | undefined; notes?: string | undefined; surgeon?: string | undefined; complications?: string | undefined; }, { procedure: string; date: Date; hospital?: string | undefined; notes?: string | undefined; surgeon?: string | undefined; complications?: string | undefined; }>, "many">>; immunizations: z.ZodOptional<z.ZodArray<z.ZodObject<{ vaccine: z.ZodString; date: z.ZodDate; nextDueDate: z.ZodOptional<z.ZodDate>; administeredBy: z.ZodOptional<z.ZodString>; lotNumber: z.ZodOptional<z.ZodString>; notes: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { date: Date; vaccine: string; notes?: string | undefined; nextDueDate?: Date | undefined; administeredBy?: string | undefined; lotNumber?: string | undefined; }, { date: Date; vaccine: string; notes?: string | undefined; nextDueDate?: Date | undefined; administeredBy?: string | undefined; lotNumber?: string | undefined; }>, "many">>; familyHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{ relationship: z.ZodString; condition: z.ZodString; ageOfOnset: z.ZodOptional<z.ZodNumber>; isDeceased: z.ZodOptional<z.ZodBoolean>; notes: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { relationship: string; condition: string; notes?: string | undefined; ageOfOnset?: number | undefined; isDeceased?: boolean | undefined; }, { relationship: string; condition: string; notes?: string | undefined; ageOfOnset?: number | undefined; isDeceased?: boolean | undefined; }>, "many">>; socialHistory: z.ZodOptional<z.ZodObject<{ smoking: z.ZodOptional<z.ZodEnum<["never", "former", "current"]>>; alcohol: z.ZodOptional<z.ZodEnum<["never", "occasional", "moderate", "heavy"]>>; drugs: z.ZodOptional<z.ZodEnum<["never", "former", "current"]>>; exercise: z.ZodOptional<z.ZodEnum<["none", "light", "moderate", "heavy"]>>; diet: z.ZodOptional<z.ZodString>; occupation: z.ZodOptional<z.ZodString>; livingSituation: z.ZodOptional<z.ZodString>; notes: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { notes?: string | undefined; exercise?: "light" | "none" | "moderate" | "heavy" | undefined; occupation?: string | undefined; smoking?: "never" | "former" | "current" | undefined; alcohol?: "never" | "occasional" | "moderate" | "heavy" | undefined; drugs?: "never" | "former" | "current" | undefined; diet?: string | undefined; livingSituation?: string | undefined; }, { notes?: string | undefined; exercise?: "light" | "none" | "moderate" | "heavy" | undefined; occupation?: string | undefined; smoking?: "never" | "former" | "current" | undefined; alcohol?: "never" | "occasional" | "moderate" | "heavy" | undefined; drugs?: "never" | "former" | "current" | undefined; diet?: string | undefined; livingSituation?: string | undefined; }>>; createdAt: z.ZodDate; updatedAt: z.ZodDate; createdBy: z.ZodOptional<z.ZodString>; updatedBy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; createdAt: Date; updatedAt: Date; patientId: string & z.BRAND<"PatientId">; createdBy?: string | undefined; updatedBy?: string | undefined; allergies?: { severity: "moderate" | "mild" | "severe"; isActive: boolean; allergen: string; reaction: string; onsetDate?: Date | undefined; }[] | undefined; familyHistory?: { relationship: string; condition: string; notes?: string | undefined; ageOfOnset?: number | undefined; isDeceased?: boolean | undefined; }[] | undefined; immunizations?: { date: Date; vaccine: string; notes?: string | undefined; nextDueDate?: Date | undefined; administeredBy?: string | undefined; lotNumber?: string | undefined; }[] | undefined; socialHistory?: { notes?: string | undefined; exercise?: "light" | "none" | "moderate" | "heavy" | undefined; occupation?: string | undefined; smoking?: "never" | "former" | "current" | undefined; alcohol?: "never" | "occasional" | "moderate" | "heavy" | undefined; drugs?: "never" | "former" | "current" | undefined; diet?: string | undefined; livingSituation?: string | undefined; } | undefined; medications?: { name: string; dosage: string; frequency: string; route: "oral" | "intravenous" | "intramuscular" | "subcutaneous" | "topical" | "inhalation"; startDate: Date; isActive: boolean; notes?: string | undefined; endDate?: Date | undefined; prescribedBy?: string | undefined; }[] | undefined; conditions?: { name: string; severity: "moderate" | "mild" | "severe"; isActive: boolean; diagnosisDate: Date; notes?: string | undefined; icd10Code?: string | undefined; diagnosedBy?: string | undefined; }[] | undefined; surgeries?: { procedure: string; date: Date; hospital?: string | undefined; notes?: string | undefined; surgeon?: string | undefined; complications?: string | undefined; }[] | undefined; }, { id: string; createdAt: Date; updatedAt: Date; patientId: string; createdBy?: string | undefined; updatedBy?: string | undefined; allergies?: { severity: "moderate" | "mild" | "severe"; isActive: boolean; allergen: string; reaction: string; onsetDate?: Date | undefined; }[] | undefined; familyHistory?: { relationship: string; condition: string; notes?: string | undefined; ageOfOnset?: number | undefined; isDeceased?: boolean | undefined; }[] | undefined; immunizations?: { date: Date; vaccine: string; notes?: string | undefined; nextDueDate?: Date | undefined; administeredBy?: string | undefined; lotNumber?: string | undefined; }[] | undefined; socialHistory?: { notes?: string | undefined; exercise?: "light" | "none" | "moderate" | "heavy" | undefined; occupation?: string | undefined; smoking?: "never" | "former" | "current" | undefined; alcohol?: "never" | "occasional" | "moderate" | "heavy" | undefined; drugs?: "never" | "former" | "current" | undefined; diet?: string | undefined; livingSituation?: string | undefined; } | undefined; medications?: { name: string; dosage: string; frequency: string; route: "oral" | "intravenous" | "intramuscular" | "subcutaneous" | "topical" | "inhalation"; startDate: Date; isActive: boolean; notes?: string | undefined; endDate?: Date | undefined; prescribedBy?: string | undefined; }[] | undefined; conditions?: { name: string; severity: "moderate" | "mild" | "severe"; isActive: boolean; diagnosisDate: Date; notes?: string | undefined; icd10Code?: string | undefined; diagnosedBy?: string | undefined; }[] | undefined; surgeries?: { procedure: string; date: Date; hospital?: string | undefined; notes?: string | undefined; surgeon?: string | undefined; complications?: string | undefined; }[] | undefined; }>>; phoneNumbers: z.ZodOptional<z.ZodArray<z.ZodObject<{ value: z.ZodBranded<z.ZodString, "PhoneNumber">; type: z.ZodEnum<["mobile", "home", "work", "emergency"]>; isVerified: z.ZodBoolean; verifiedAt: z.ZodOptional<z.ZodDate>; isPrimary: z.ZodBoolean; createdAt: z.ZodDate; }, "strip", z.ZodTypeAny, { value: string & z.BRAND<"PhoneNumber">; type: "mobile" | "emergency" | "home" | "work"; createdAt: Date; isVerified: boolean; isPrimary: boolean; verifiedAt?: Date | undefined; }, { value: string; type: "mobile" | "emergency" | "home" | "work"; createdAt: Date; isVerified: boolean; isPrimary: boolean; verifiedAt?: Date | undefined; }>, "many">>; addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{ street: z.ZodString; city: z.ZodString; state: z.ZodString; postalCode: z.ZodString; country: z.ZodString; type: z.ZodEnum<["home", "work", "mailing", "billing"]>; isVerified: z.ZodBoolean; verifiedAt: z.ZodOptional<z.ZodDate>; isPrimary: z.ZodBoolean; createdAt: z.ZodDate; }, "strip", z.ZodTypeAny, { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; }, { type: "home" | "billing" | "work" | "mailing"; street: string; city: string; country: string; createdAt: Date; isVerified: boolean; state: string; postalCode: string; isPrimary: boolean; verifiedAt?: Date | undefined; }>, "many">>; emergencyContacts: z.ZodOptional<z.ZodArray<z.ZodObject<{ name: z.ZodString; relationship: z.ZodString; phoneNumber: z.ZodObject<{ value: z.ZodBranded<z.ZodString, "PhoneNumber">; type: z.ZodEnum<["mobile", "home", "work", "emergency"]>; isVerified: z.ZodBoolean; verifiedAt: z.ZodOptional<z.ZodDate>; isPrimary: z.ZodBoolean; createdAt: z.ZodDate; }, "strip", z.ZodTypeAny, { value: string & z.BRAND<"PhoneNumber">; type: "mobile" | "emergency" | "home" | "wo