package thyyxxk.webserver.constants.frntsheet;

public enum Hbsag {
    NOT_EXAMINED("0", "4"),

    NEGATIVE("1", "1"),

    POSITIVE("2", "2"),

    UNKNOWN("3", "3");


    private final String hisCode;
    private final String wjwCode;

    Hbsag(String hisCode, String wjwCode) {
        this.hisCode = hisCode;
        this.wjwCode = wjwCode;
    }

    public String getHisCode() {
        return hisCode;
    }

    public String getWjwCode() {
        return wjwCode;
    }

    public static String getWjwCodeByHisCode(String hisCode) {
        if (null == hisCode) {
            return NOT_EXAMINED.getWjwCode();
        }
        for (Hbsag sag : Hbsag.values()) {
            if (sag.getHisCode().equals(hisCode)) {
                return sag.getWjwCode();
            }
        }
        return NOT_EXAMINED.getWjwCode();
    }
}
