export type UserRole = 'doctor'| 'super_admin';

export interface User {
  User: {
    email: string;
    id: string;
    name: string;
    role: string;
  }
  doctor_id: number;
  full_name: string;
  role: UserRole;
  department?: string;
  gender?: 'Male' | 'Female' | 'Other';
  designation?: string;
  registration_Number?: string;
  status?: 'Active' | 'Inactive' | 'On Leave';
  contact?: string;
  profile_summary?: string;
  qualification?: string;
  clinical_Summary?: string;
  reviewerId?: number;
  reviewerName?: string;
}

export interface Patient {
  patient_id: number;
  forename: string;
  surname: string;
  nhs_number: string;
  hospital_number: string;
  mrn_number: string;
  gender: string;
  date_of_birth: string;
  diagnosis?: any;
  createdAt?: string;
  updatedAt?: string;
}

export interface ClinicalNote {
  id: number;
  patient_id: string;
  doctor_id: number;

  title: string;
  type: string;
  history_presenting_complaints: string;
  past_medical_history: string;
  medication: string;
  family_history: string;
  social_history: string;
  clinical_examination_findings: string;
  clinical_impression: string;
  full_blood_count: string;
  u_and_es: string;
  lft: string;
  ldh: string;
  uric_acid: string;
  viral_serology_results: string;
  echo: string;
  additional_comments: string;

  createdAt: string;
  updatedAt: string;
}

export interface ImagingReport {
  id: string;
  patientId: string;
  title: string;
  type: 'PET-CT' | 'CT' | 'MRI' | 'X-Ray' | 'Ultrasound';
  fileName: string;
  fileSize: number;
  uploadedAt: string;
  uploadedBy: string;
  description?: string;
}


export interface HistologyReport {
  id: number;                
  patient_id: string;        
  doctor_id?: number; 
  doctorName?: string;
  title: string;
  specimen?: string | null;
  histological_findings?: string | null;
  url?: string | null;
  notes?: string | null;
  context?: string | null;   
  filesize?: number | null;  
  createdAt: string;         
  updatedAt: string;
}

// export interface MDTReport {
//   id: string;
//   patientId: string;
//   title: string;
//   status: 'draft' | 'pending_review' | 'approved' | 'finalized' | 'rejected';
//   generatedAt: string;
//   generatedBy: string;
//   reviewedBy?: string;
//   approvedAt?: string | null;
//   mdtDate: string;
//   previouslyDiscussed?: string;
//   oncologyHistory: {
//     condition: string;
//     initialDiagnosis: string;
//     diagnosisDate: string;
//   };
//   reasonForReferral: string;
//   boneMarrowFindings: {
//     aspirate: string;
//     trephine: string;
//     date: string;
//   };
//   diagnosticMarrow: {
//     fish: string;
//     ngs: string;
//     date: string;
//   };
//   responseAssessment: string;
//   recommendations: string[];
//   content: {
//     diagnosis: string;
//     staging: string;
//     aiRecommendation: string;
//     consultantCommentary: string;
//     treatmentPlan: string;
//   };
//   selectedClinicalNotes: string[];
//   selectedImagingReports: string[];
//   selectedHistologyReports: string[];
// }

export interface MDTReportContext {
  mdt_report: string;
  model_name: string;
}

export type MDTReportStatus =
  | "draft"
  | "submitted"
  | "pending"
  | "approved"
  | "rejected";


export interface MDTReport {
  id: number;
  patient: {patient_id : string};
  patient_id: string;

  created_by: { name: string };
  reviewed_by?: { name: string };

  context: MDTReportContext;
  status: MDTReportStatus;

  reviewed_at?: string | null;
  createdAt: string;
  updatedAt: string;
}

// export interface Appointment {
//   id: string;
//   patientId: string;
//   date: string;
//   time: string;
//   type: 'consultation' | 'follow-up' | 'treatment' | 'review';
//   status: 'scheduled' | 'completed' | 'cancelled';
//   notes?: string;
// }

// export interface ConsentForm {
//   id: string;
//   patientId: string;
//   type: string;
//   status: 'pending' | 'signed' | 'expired';
//   generatedAt: string;
//   signedAt?: string;
// }
export interface DoctorProfile {
  userId: number;
  name: string;
  medicalLicenseNumber: string | null;
  email: string;
  role: "DOCTOR";
  active: boolean;
  department?: string;
}

export interface ApiResponse<T> {
  success: boolean;
  data: T;
  message?: string;
}
