feat: 仪表盘角色自适应重构 — 4角色视图 + 后端个人工作量API
后端: - 新增 GET /health/admin/statistics/personal-stats 接口 - PersonalStatsResp: 13个个人维度统计字段 - 按医生/护士/管理员/运营角色聚合工作量数据 前端: - useDashboardRole hook: 按优先级 doctor>nurse>admin>operator 匹配角色 - DoctorDashboard: 今日工作台(日程/审核/消息/统计卡) - NurseDashboard: 随访监控台(异常提醒/队列/上报率) - AdminDashboard: 管理中心(5KPI + 健康数据Tab) - OperatorDashboard: 运营中心(积分/文章/活动) - StatisticsDashboard.tsx 重写为角色路由组件 - 删除旧区块:快捷入口/积分排行Top10/最近活动
This commit is contained in:
@@ -115,6 +115,28 @@ pub struct HealthDataStatsResp {
|
||||
pub vital_signs_report_rate: VitalSignsReportRateResp,
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 个人维度统计
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// 当前用户个人维度的工作量统计
|
||||
#[derive(Debug, Serialize, Deserialize, ToSchema)]
|
||||
pub struct PersonalStatsResp {
|
||||
pub my_patients: i64,
|
||||
pub new_patients_this_month: i64,
|
||||
pub follow_up_rate: f64,
|
||||
pub consultations_this_month: i64,
|
||||
pub pending_consultations: i64,
|
||||
pub vital_signs_report_rate: f64,
|
||||
pub today_appointments: i64,
|
||||
pub overdue_follow_ups: i64,
|
||||
pub today_follow_ups: i64,
|
||||
pub abnormal_vital_signs: i64,
|
||||
pub vital_signs_reported: i64,
|
||||
pub vital_signs_total: i64,
|
||||
pub pending_lab_reviews: i64,
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 通用结构
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user