Files
hms/apps/miniprogram/src/services/doctor/labReport.ts
iven 70322e4132 feat(miniprogram): 医生端 API 服务层 — 7 个模块
新增医生端完整 API 调用层:alerts / appointment / consultation /
dashboard / followup / labReport / patient
2026-05-03 19:31:51 +08:00

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,
);
}