import { api } from '../request'; // ── Lab Report (doctor view) ─────────────────────── export interface LabReportItem { id: string; report_date: string; report_type: string; status: string; abnormal_count?: number; reviewed_by?: string; reviewed_at?: string; doctor_notes?: string; version: number; } export interface LabReportDetail extends LabReportItem { items?: { name: string; value: number; unit?: string; reference_min?: number; reference_max?: number; is_abnormal?: boolean; }[]; image_urls?: string[]; } export async function listLabReports(patientId: string, params?: { page?: number; page_size?: number }) { return api.get<{ data: LabReportItem[]; total: number }>( `/health/patients/${patientId}/lab-reports`, params, ); } export async function getLabReport(patientId: string, reportId: string) { return api.get(`/health/patients/${patientId}/lab-reports/${reportId}`); } export async function reviewLabReport( patientId: string, reportId: string, data: { doctor_notes?: string; version: number }, ) { return api.put( `/health/patients/${patientId}/lab-reports/${reportId}/review`, data, ); }