package com.fs.watch.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.Objects;
import java.util.stream.Stream;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum WatchBkStatusEnum implements HealthStatusEnum{

    /**
     * //血酮正常值是0.05-0.34mmol/L。酮体是机体脂肪氧化代谢产生的中间代谢产物，正常值一般在0.05-0.34mmol/L，当糖代谢发生障碍，酮体血浓度超过肾阈值，可产生酮尿。
     *         //当血酮升高，>1.0mmol/L为高血酮，>3.0mmoL提示可有酸中毒，常见的有糖尿病酮症酸中毒。糖尿病酮症酸中毒时，纠正酮症常比纠正高血糖缓慢
     */
    NORMAL(0,"正常",null,null,null,null),
    LOWER(1,"异常",null,null,null,null);


    private Integer value;
    private String desc;
    private String prediction;
    //解析
    private String analysis;
    //治疗建议
    private String suggestion;
    //注意事项
    private String precautions;

    public static WatchBkStatusEnum toType(Integer value) {
        return Stream.of(WatchBkStatusEnum.values())
                .filter(p -> Objects.equals(p.value, value))
                .findAny()
                .orElse(null);
    }
}
