feat(web): Web 前端功能完善 — API 扩展 + 组件优化
- 新增 AI 透析分析 API + 药物提醒 API - MediaPicker/ThemeSwitcher/usePaginatedData 优化 - 健康管理页面组件增强(Banner/Consultation/Doctor/MediaLibrary 等) - PluginCRUDPage 导入优化
This commit is contained in:
@@ -86,3 +86,32 @@ export const alertRuleApi = {
|
||||
deactivate: (id: string, version: number) =>
|
||||
client.put(`/health/alert-rules/${id}/deactivate`, { version }).then((r) => r.data.data as AlertRule),
|
||||
};
|
||||
|
||||
// --- Critical Alerts API ---
|
||||
|
||||
export interface CriticalAlert {
|
||||
id: string;
|
||||
patient_id: string;
|
||||
patient_name?: string;
|
||||
alert_type: string;
|
||||
severity: string;
|
||||
title: string;
|
||||
detail?: Record<string, unknown>;
|
||||
status: string;
|
||||
acknowledged_by?: string;
|
||||
acknowledged_at?: string;
|
||||
notes?: string;
|
||||
created_at: string;
|
||||
version: number;
|
||||
}
|
||||
|
||||
export const criticalAlertApi = {
|
||||
list: (params?: { page?: number; page_size?: number }) =>
|
||||
client.get('/health/critical-alerts', { params }).then((r) => r.data.data as PaginatedResponse<CriticalAlert>),
|
||||
|
||||
get: (id: string) =>
|
||||
client.get(`/health/critical-alerts/${id}`).then((r) => r.data.data as CriticalAlert),
|
||||
|
||||
acknowledge: (id: string, req: { notes?: string }) =>
|
||||
client.post(`/health/critical-alerts/${id}/acknowledge`, req).then((r) => r.data),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user