package cn.hnthyy.thmz.enums;

import java.util.Arrays;
import java.util.List;

/**
 * 住院收费状态:1 未接收 0 接收 2 无效 5 科室确认 6 科室录入 7 拒绝确认 8 医技未确认 9：未提交药单
 */
public enum ZyChargeStatusEnum {
    ACCEPT("0","接收"),
    UN_ACCEPT("1","未接收"),
    INVALID("2","无效"),
    DEPARTMENT_CONFIRMED("5","未确认药"),
    DEPARTMENT_ENTRY("6","未接收"),
    DECLINED_TO_CONFIRM("7","拒绝确认"),
    MEDICAL_TECHNIQUE_NOT_CONFIRMED("8","医技未确认"),
    NO_DRUG_LIST_SUBMITTED("9","未提交药单");

    public String code;
    public String name;

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

    /**
     * 根据编码查询对应的类型
     * @param code
     * @return
     */
    public static ZyChargeStatusEnum geteZyChargeStatusByCode(String code){
        List<ZyChargeStatusEnum> classCodeEnums= Arrays.asList(values());
        for (ZyChargeStatusEnum classCode:classCodeEnums){
            if(classCode.code.equals(code)){
                return classCode;
            }
        }
        return null;
    }
}
