feat(health): 新增小程序专用今日体征摘要端点 GET /health/vital-signs/today
This commit is contained in:
@@ -171,3 +171,31 @@ pub struct MiniTrendResp {
|
||||
/// 数据点列表(按日期升序)
|
||||
pub data_points: Vec<DataPoint>,
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 小程序今日体征摘要
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// 单个指标摘要
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
pub struct IndicatorSummary {
|
||||
/// 指标数值
|
||||
pub value: f64,
|
||||
/// 状态: "normal" | "high" | "low"
|
||||
pub status: String,
|
||||
/// 参考范围,如 "60-100"
|
||||
pub reference_range: Option<String>,
|
||||
/// 收缩压(仅血压指标)
|
||||
pub systolic: Option<f64>,
|
||||
/// 舒张压(仅血压指标)
|
||||
pub diastolic: Option<f64>,
|
||||
}
|
||||
|
||||
/// 小程序今日体征摘要响应
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
pub struct MiniTodayResp {
|
||||
pub blood_pressure: Option<IndicatorSummary>,
|
||||
pub heart_rate: Option<IndicatorSummary>,
|
||||
pub blood_sugar: Option<IndicatorSummary>,
|
||||
pub weight: Option<IndicatorSummary>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user