package thyyxxk.webserver.constants.sidicts;

/**
 * @description: 结算类别（自建）
 * @author: DingJie
 * @create: 2021/8/2310:07
 */
public enum SetlType {

    INPATIENT(21, "住院"),

    OUTPATIENT(11, "门诊");

    private final int code;
    private final String name;

    SetlType(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static SetlType get(int code) {
        for (SetlType setlType : SetlType.values()) {
            if (code == setlType.getCode()) {
                return setlType;
            }
        }
        return null;
    }
}
