feat(miniprogram): 医生端 API 服务层 — 7 个模块
新增医生端完整 API 调用层:alerts / appointment / consultation / dashboard / followup / labReport / patient
This commit is contained in:
49
apps/miniprogram/src/services/doctor/labReport.ts
Normal file
49
apps/miniprogram/src/services/doctor/labReport.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
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,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user