export interface PatientRecord {
  id: number;
  mrn: string;
  firstName: string;
  lastName: string;
  dateOfBirth: string;
  gender: string;
  phone: string | null;
  email: string | null;
  allergies: string | null;
  codeStatus: string | null;
  insuranceName: string | null;
  insuranceStatus: string | null;
  pcpId: number | null;
  appStatus: string | null;
  appLastLogin: string | null;
  roomNumber: string | null;
  photoUrl: string | null;
  createdAt: string;
  pcp: { firstName: string; lastName: string } | null;
}

export interface Problem {
  id: number;
  patientId: number;
  name: string;
  icdCode: string | null;
  status: string;
  controlStatus: string | null;
  lastResult: string | null;
  patientReported: string | null;
  aiRecommendation: string | null;
  onsetDate: string | null;
  createdAt: string;
}

export interface Medication {
  id: number;
  patientId: number;
  name: string;
  dose: string;
  route: string;
  frequency: string;
  prescriberId: number | null;
  startDate: string | null;
  indication: string | null;
  adherenceRate: number | null;
  fillStatus: string | null;
  isActive: boolean | null;
  createdAt: string;
}

export interface LabResult {
  id: number;
  patientId: number;
  testName: string;
  value: string;
  unit: string | null;
  referenceRange: string | null;
  status: string;
  category: string | null;
  resultDate: string;
  isAcknowledged: boolean | null;
  aiInterpretation: string | null;
  createdAt: string;
}

export interface Order {
  id: number;
  patientId: number;
  providerId: number;
  orderName: string;
  orderType: string;
  status: string;
  priority: string | null;
  orderedAt: string;
  createdAt: string;
}

export interface CareGoal {
  id: number;
  patientId: number;
  goalName: string;
  targetValue: string | null;
  currentValue: string | null;
  unit: string | null;
  trend: string | null;
  status: string | null;
  createdAt: string;
}

export interface Vital {
  id: number;
  patientId: number;
  type: string;
  value: string;
  unit: string | null;
  recordedAt: string;
  source: string | null;
  createdAt: string;
}

export interface ClinicalNote {
  id: number;
  patientId: number;
  providerId: number;
  noteType: string;
  content: string;
  status: string | null;
  visitDate: string;
  createdAt: string;
}

export interface PatientData {
  patient: PatientRecord;
  problems: Problem[];
  medications: Medication[];
  labs: LabResult[];
  orders: Order[];
  goals: CareGoal[];
  vitals: Vital[];
  notes: ClinicalNote[];
}
