feat(health): Track 3 医疗阈值 — warning 种子 + 患者端只读 API
- 新增 6 条 warning 级别阈值种子数据(血压/心率/血糖参考范围) - 新增 GET /health/critical-value-thresholds/public 患者端只读接口 - 扩展 indicator 验证支持 blood_sugar_fasting/postprandial 等新指标
This commit is contained in:
@@ -109,3 +109,16 @@ where
|
||||
.await?;
|
||||
Ok(Json(ApiResponse::ok(())))
|
||||
}
|
||||
|
||||
/// 患者端只读接口 — 返回当前租户所有活跃阈值,仅需认证。
|
||||
pub async fn list_public_thresholds<S>(
|
||||
State(state): State<HealthState>,
|
||||
Extension(ctx): Extension<TenantContext>,
|
||||
) -> Result<Json<ApiResponse<Vec<crate::entity::critical_value_threshold::Model>>>, AppError>
|
||||
where
|
||||
HealthState: FromRef<S>,
|
||||
S: Clone + Send + Sync + 'static,
|
||||
{
|
||||
let list = critical_value_threshold_service::find_thresholds(&state.db, ctx.tenant_id).await?;
|
||||
Ok(Json(ApiResponse::ok(list)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user