新增医生端完整 API 调用层:alerts / appointment / consultation / dashboard / followup / labReport / patient
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
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<LabReportDetail>(`/health/patients/${patientId}/lab-reports/${reportId}`);
|
|
}
|
|
|
|
export async function reviewLabReport(
|
|
patientId: string,
|
|
reportId: string,
|
|
data: { doctor_notes?: string; version: number },
|
|
) {
|
|
return api.put<LabReportDetail>(
|
|
`/health/patients/${patientId}/lab-reports/${reportId}/review`,
|
|
data,
|
|
);
|
|
}
|