/*
 * File: dashboard.ts
 * Description: Dashboard and ER-related type definitions
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */

import { Patient, PatientStatus, AlertPriority } from './patient';

export interface ERDashboard {
  totalPatients: number;
  criticalPatients: number;
  pendingScans: number;
  recentReports: number;
  bedOccupancy: number;
  departmentStats: DepartmentStats;
  shiftInfo: ShiftInfo;
  lastUpdated: Date;
}

export interface DepartmentStats {
  emergency: number;
  trauma: number;
  cardiac: number;
  neurology: number;
  pediatrics: number;
  icu: number;
}

export interface ShiftInfo {
  currentShift: 'DAY' | 'NIGHT' | 'EVENING';
  startTime: Date;
  endTime: Date;
  attendingPhysician: string;
  residents: string[];
  nurses: string[];
}

export interface PatientList {
  patients: Patient[];
  filters: PatientFilters;
  sortBy: PatientSortBy;
  isLoading: boolean;
  error: string | null;
}

export interface PatientFilters {
  status: PatientStatus[];
  priority: AlertPriority[];
  department: string[];
  bedNumber?: string;
  attendingPhysician?: string;
}

export type PatientSortBy = 
  | 'PRIORITY'
  | 'NAME'
  | 'BED_NUMBER'
  | 'ADMISSION_DATE'
  | 'LAST_UPDATED';

export interface QuickAction {
  id: string;
  title: string;
  icon: string;
  action: () => void;
  isEnabled: boolean;
  requiresConfirmation?: boolean;
}

export interface DashboardMetrics {
  responseTime: number; // average response time in minutes
  patientSatisfaction: number; // percentage
  criticalAlertsResolved: number;
  scansReviewed: number;
  patientsDischarged: number;
}

/*
 * End of File: dashboard.ts
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */ 