feat(mp): 医护端告警列表/详情页 + DoctorHome 告警 banner 增强
- 新增告警列表页:按状态筛选、分页、严重程度/状态标签 - 新增告警详情页:完整信息展示 + 确认/忽略/恢复操作 - doctor.ts 新增 listAlerts/acknowledgeAlert/dismissAlert/resolveAlert API - DoctorHome 告警 banner 跳转目标改为告警列表页 - 注册 alerts/index + alerts/detail/index 到 doctor subPackage
This commit is contained in:
@@ -304,3 +304,41 @@ export async function getConsultationStats() {
|
||||
export async function getFollowUpStats() {
|
||||
return api.get<FollowUpStats>('/health/admin/statistics/follow-ups');
|
||||
}
|
||||
|
||||
// ── Alerts (doctor view) ────────────────────────────
|
||||
|
||||
export interface Alert {
|
||||
id: string;
|
||||
patient_id: string;
|
||||
rule_id: string;
|
||||
severity: string;
|
||||
title: string;
|
||||
detail?: Record<string, unknown>;
|
||||
status: string;
|
||||
acknowledged_by?: string;
|
||||
acknowledged_at?: string;
|
||||
resolved_at?: string;
|
||||
created_at: string;
|
||||
version: number;
|
||||
}
|
||||
|
||||
export async function listAlerts(params?: {
|
||||
patient_id?: string;
|
||||
status?: string;
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
}) {
|
||||
return api.get<{ data: Alert[]; total: number }>('/health/alerts', params);
|
||||
}
|
||||
|
||||
export async function acknowledgeAlert(id: string, version: number) {
|
||||
return api.put<Alert>(`/health/alerts/${id}/acknowledge`, { version });
|
||||
}
|
||||
|
||||
export async function dismissAlert(id: string, version: number) {
|
||||
return api.put<Alert>(`/health/alerts/${id}/dismiss`, { version });
|
||||
}
|
||||
|
||||
export async function resolveAlert(id: string, version: number) {
|
||||
return api.put<Alert>(`/health/alerts/${id}/resolve`, { version });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user