feat(calculator): 营养计算结果返回校验规则集(test-0415 反馈2-1)
- NutritionCalculateResponse 新增 validations: List<ValidationRule>
- ValidationRule = { name, value, targetRange, status, reference }
- 当前覆盖 4 条核心规则:
· BMI(WS/T 428-2013)
· eGFR(KDIGO 2012 CKD 评估指南)
· 蛋白质摄入量(KDOQI 2020,按是否透析切换 0.6-0.8 / 1.0-1.2 g/kg)
· 能量摄入量(KDOQI 2020,30-35 kcal/kg)
- status: normal / below / above / unknown,前端可在结果页给徽标提示
- 用户/医生可据此核对推荐数值是否落在临床指南区间内
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,9 @@ public class NutritionCalculateResponse implements Serializable {
|
||||
@ApiModelProperty(value = "重要提示列表")
|
||||
private List<String> importantTips;
|
||||
|
||||
@ApiModelProperty(value = "校验规则集(test-0415 反馈2-1):暴露推荐计算所依据的临床指南范围,方便用户与医生核验")
|
||||
private List<ValidationRule> validations;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@@ -120,6 +123,31 @@ public class NutritionCalculateResponse implements Serializable {
|
||||
private List<Dish> dinner;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验规则项(test-0415 反馈2-1)
|
||||
* 让用户/医生可以一眼看出每个推荐数值落在哪个临床指南区间,是否「在范围内 / 偏低 / 偏高」
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(description = "校验规则项")
|
||||
public static class ValidationRule implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "指标名称", example = "蛋白质摄入量")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "当前推荐值", example = "0.8 g/kg")
|
||||
private String value;
|
||||
|
||||
@ApiModelProperty(value = "目标范围", example = "0.6-0.8 g/kg")
|
||||
private String targetRange;
|
||||
|
||||
@ApiModelProperty(value = "状态:normal / below / above / unknown", example = "normal")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "参考依据", example = "KDOQI 2020 营养指南")
|
||||
private String reference;
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜品信息
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user