package com.zhyc.module.biosafety.enums;

/**
 * 治疗状态枚举
 */
public enum TreatmentStatus {

    ABANDONED(-1, "放弃", 0),
    IN_TREATMENT(0, "治疗中", 1),
    TREATMENT_COMPLETED(1, "治疗完成", 2),
    CURED(2, "已治愈", 3);

    private final int code;
    private final String desc;
    private final int sort;

    TreatmentStatus(int code, String desc, int sort) {
        this.code = code;
        this.desc = desc;
        this.sort = sort;
    }

    public static String getDescByCode(Integer code) {
        for (TreatmentStatus status : values()) {
            if (status.code == code) {
                return status.desc;
            }
        }
        return "未知";
    }
}