UNPKG

emr-types

Version:

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

59 lines 1.49 kB
/** * Address Value Object * * Represents a physical address with validation * * @interface Address * @description Address value object for domain entities */ export interface Address { /** The full address string */ value: string; /** Whether the address is valid */ isValid: boolean; /** Street address */ street: string; /** City */ city: string; /** Province/State */ province: string; /** Postal code */ postalCode: string; /** Country */ country: string; /** Formatted address for display */ formatted: string; /** Timestamp when address was validated */ validatedAt: Date; } /** * Address Factory Functions */ export declare const AddressFactory: { /** * Create an address from parts */ create: (street: string, city: string, province: string, postalCode: string, country?: string) => Address; /** * Create an address from string */ fromString: (addressString: string) => Address; }; /** * Address Validation Functions */ export declare const AddressValidator: { /** * Check if address has all required fields */ hasRequiredFields: (address: Address) => boolean; /** * Check if postal code is valid Vietnamese format */ isValidVietnamesePostalCode: (postalCode: string) => boolean; /** * Check if address is in Vietnam */ isVietnameseAddress: (address: Address) => boolean; }; //# sourceMappingURL=Address.d.ts.map