UNPKG

emr-types

Version:

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

76 lines 4.11 kB
export * from './entities/Appointment'; export * from './value-objects/AppointmentId'; export * from './events/AppointmentDomainEvent'; import type { Appointment, AppointmentSlot, AppointmentLocation } from './entities/Appointment'; export type { Appointment, AppointmentSlot, AppointmentLocation, AppointmentInsuranceInfo, AppointmentBillingInfo, ReminderSettings, AppointmentNotificationPreferences, CancellationPolicy, RescheduleRecord, PatientSatisfaction, QualityMetrics, OperatingHours, RecurrencePattern, CreateAppointmentRequest, UpdateAppointmentRequest, AppointmentSearchFilters, AppointmentSearchResult, AppointmentStatistics } from './entities/Appointment'; export type { AppointmentId, AppointmentIdFactory, AppointmentIdValidator, AppointmentIdUtils, isAppointmentId, isValidAppointmentIdString, APPOINTMENT_ID_FORMATS, DEFAULT_APPOINTMENT_ID_FORMAT, AppointmentIdExamples } from './value-objects/AppointmentId'; export { AppointmentStatus, AppointmentType, SlotType, BookingMethod, LocationType, FacilityType, AppointmentInsuranceType, BillingStatus, AppointmentPaymentMethod, ReminderMethod, AppointmentContactMethod, RefundPolicy, ReschedulePolicy, NoShowPolicy, ApprovalStatus, TreatmentEffectiveness, PatientCompliance, ReadmissionRisk, RecurrenceFrequency, DayOfWeek } from './entities/Appointment'; export type { AppointmentDomainEvent, AppointmentScheduledEvent, AppointmentConfirmedEvent, AppointmentCheckedInEvent, AppointmentStartedEvent, AppointmentCompletedEvent, AppointmentCancelledEvent, AppointmentNoShowEvent, AppointmentRescheduledEvent, AppointmentOnHoldEvent, AppointmentReminderSentEvent, AppointmentInsuranceUpdatedEvent, AppointmentBillingUpdatedEvent, AppointmentQualityMetricsRecordedEvent, AppointmentSatisfactionSurveyCompletedEvent, AppointmentLocationChangedEvent, AppointmentParticipantsUpdatedEvent, AppointmentMedicalInfoUpdatedEvent, AppointmentReminderSettingsUpdatedEvent, AppointmentCancellationPolicyUpdatedEvent, AppointmentEvent, AppointmentEventFactory, isAppointmentScheduledEvent, isAppointmentConfirmedEvent, isAppointmentCancelledEvent, isAppointmentDomainEvent } from './events/AppointmentDomainEvent'; /** * Appointment domain utilities for common operations */ export declare const AppointmentDomainUtils: { /** * Calculate appointment duration in minutes */ calculateDuration(startTime: Date, endTime: Date): number; /** * Check if appointment is overdue */ isOverdue(appointment: { startTime: Date; status: string; }): boolean; /** * Check if appointment is within cancellation window */ isWithinCancellationWindow(appointment: { startTime: Date; }, cancellationWindowHours: number): boolean; /** * Generate appointment code */ generateAppointmentCode(tenantId: string, sequence: number): string; /** * Validate appointment data */ validateAppointmentData(appointment: { startTime: Date; endTime: Date; patientId: string; doctorId: string; appointmentType: string; }): { isValid: boolean; errors: string[]; }; /** * Calculate wait time in minutes */ calculateWaitTime(checkInTime: Date, appointmentStartTime: Date): number; /** * Check if appointment is in progress */ isInProgress(appointment: { startTime: Date; endTime: Date; status: string; }): boolean; /** * Get appointment status category */ getStatusCategory(status: string): "scheduled" | "active" | "completed" | "cancelled"; }; /** * Type guard to check if a value is an Appointment entity */ export declare function isAppointment(value: unknown): value is Appointment; /** * Type guard to check if a value is an AppointmentSlot */ export declare function isAppointmentSlot(value: unknown): value is AppointmentSlot; /** * Type guard to check if a value is an AppointmentLocation */ export declare function isAppointmentLocation(value: unknown): value is AppointmentLocation; //# sourceMappingURL=index.d.ts.map