emr-types
Version:
Comprehensive TypeScript Types Library for Electronic Medical Record (EMR) Applications - Domain-Driven Design with Zod Validation
160 lines • 5.2 kB
TypeScript
/**
* Patient status enum representing the current status of a patient
*/
export declare enum PatientStatus {
ACTIVE = "active",
INACTIVE = "inactive",
PENDING = "pending",
SUSPENDED = "suspended",
DECEASED = "deceased",
TRANSFERRED = "transferred",
DISCHARGED = "discharged",
ARCHIVED = "archived"
}
/**
* Patient status categories for grouping and filtering
*/
export declare const PatientStatusCategories: {
readonly ACTIVE: readonly [PatientStatus.ACTIVE];
readonly INACTIVE: readonly [PatientStatus.INACTIVE, PatientStatus.SUSPENDED];
readonly PENDING: readonly [PatientStatus.PENDING];
readonly TERMINATED: readonly [PatientStatus.DECEASED, PatientStatus.TRANSFERRED, PatientStatus.DISCHARGED];
readonly ARCHIVED: readonly [PatientStatus.ARCHIVED];
};
/**
* Patient status priority levels
*/
export declare enum PatientStatusPriority {
HIGH = "high",
MEDIUM = "medium",
LOW = "low"
}
/**
* Patient status descriptions
*/
export declare const PatientStatusDescriptions: {
readonly active: "Patient is currently active and receiving care";
readonly inactive: "Patient is inactive but may return for care";
readonly pending: "Patient registration is pending approval";
readonly suspended: "Patient access is temporarily suspended";
readonly deceased: "Patient has passed away";
readonly transferred: "Patient has been transferred to another facility";
readonly discharged: "Patient has been discharged from care";
readonly archived: "Patient record has been archived";
};
/**
* Utility functions for PatientStatus
*/
export declare const PatientStatusUtils: {
/**
* Get the category of a patient status
*/
getCategory(status: PatientStatus): keyof typeof PatientStatusCategories;
/**
* Get the priority of a patient status
*/
getPriority(status: PatientStatus): PatientStatusPriority;
/**
* Check if a status is active
*/
isActive(status: PatientStatus): boolean;
/**
* Check if a status is inactive
*/
isInactive(status: PatientStatus): boolean;
/**
* Check if a status is pending
*/
isPending(status: PatientStatus): boolean;
/**
* Check if a status is terminated
*/
isTerminated(status: PatientStatus): boolean;
/**
* Check if a status is archived
*/
isArchived(status: PatientStatus): boolean;
/**
* Get the display name for a status
*/
getDisplayName(status: PatientStatus): string;
/**
* Get the description for a status
*/
getDescription(status: PatientStatus): string;
/**
* Get all statuses in a category
*/
getStatusesInCategory(category: keyof typeof PatientStatusCategories): PatientStatus[];
/**
* Get all available statuses
*/
getAllStatuses(): PatientStatus[];
/**
* Get statuses that allow patient access
*/
getAccessibleStatuses(): PatientStatus[];
/**
* Get statuses that require attention
*/
getAttentionRequiredStatuses(): PatientStatus[];
};
/**
* Type guard to check if a value is a valid PatientStatus
*/
export declare function isPatientStatus(value: unknown): value is PatientStatus;
/**
* Type guard to check if a status is in a specific category
*/
export declare function isStatusInCategory(status: PatientStatus, category: keyof typeof PatientStatusCategories): boolean;
/**
* Default patient status
*/
export declare const DEFAULT_PATIENT_STATUS = PatientStatus.PENDING;
/**
* Patient status transitions
*/
export declare const PATIENT_STATUS_TRANSITIONS: {
readonly pending: readonly [PatientStatus.ACTIVE, PatientStatus.SUSPENDED];
readonly active: readonly [PatientStatus.INACTIVE, PatientStatus.SUSPENDED, PatientStatus.DECEASED, PatientStatus.TRANSFERRED, PatientStatus.DISCHARGED];
readonly inactive: readonly [PatientStatus.ACTIVE, PatientStatus.SUSPENDED, PatientStatus.ARCHIVED];
readonly suspended: readonly [PatientStatus.ACTIVE, PatientStatus.INACTIVE, PatientStatus.ARCHIVED];
readonly deceased: readonly [PatientStatus.ARCHIVED];
readonly transferred: readonly [PatientStatus.ARCHIVED];
readonly discharged: readonly [PatientStatus.ARCHIVED];
readonly archived: readonly [];
};
/**
* Example usage of PatientStatus
*/
export declare const PatientStatusExamples: {
/**
* Check if status is active
*/
isActive: (status: PatientStatus) => boolean;
/**
* Get status category
*/
getCategory: (status: PatientStatus) => "ACTIVE" | "INACTIVE" | "PENDING" | "TERMINATED" | "ARCHIVED";
/**
* Get status priority
*/
getPriority: (status: PatientStatus) => PatientStatusPriority;
/**
* Get display name
*/
getDisplayName: (status: PatientStatus) => string;
/**
* Get description
*/
getDescription: (status: PatientStatus) => string;
/**
* Get accessible statuses
*/
getAccessibleStatuses: () => PatientStatus[];
/**
* Get attention required statuses
*/
getAttentionRequiredStatuses: () => PatientStatus[];
};
//# sourceMappingURL=PatientStatus.d.ts.map