package com.openhis.common.enums.ybenums;

import com.github.pagehelper.util.StringUtil;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 触发场景
 *
 * @author Thanking
 */
@Getter
@AllArgsConstructor
public enum YbTrigScen {

    /**
     * 门诊挂号
     */
    OUTPATIENT_REGISTRATION("1", "门诊挂号"),
    /**
     * 门诊收费登记
     */
    OUTPATIENT_CHARGE_REGISTRATION("2", "门诊收费登记"),
    /**
     * 住院登记
     */
    HOSPITALIZATION_REGISTRATION("3", "住院登记"),
    /**
     * 住院收费登记
     */
    HOSPITALIZATION_CHARGE_REGISTRATION("4", "住院收费登记"),
    /**
     * 住院执行医嘱
     */
    HOSPITALIZATION_ORDER_EXECUTION("5", "住院执行医嘱"),
    /**
     * 门诊结算
     */
    OUTPATIENT_SETTLEMENT("6", "门诊结算"),
    /**
     * 门诊预结算
     */
    OUTPATIENT_PRE_SETTLEMENT("7", "门诊预结算"),
    /**
     * 住院结算
     */
    HOSPITALIZATION_SETTLEMENT("8", "住院结算"),
    /**
     * 住院预结算
     */
    HOSPITALIZATION_PRE_SETTLEMENT("9", "住院预结算"),
    /**
     * 药店划卡
     */
    PHARMACY_CARD("10", "药店划卡");

    private String value;
    private String description;

    public static YbTrigScen getByValue(String value) {
        if (StringUtil.isEmpty(value)) {
            return null;
        }
        for (YbTrigScen val : values()) {
            if (val.getValue().equals(value)) {
                return val;
            }
        }
        return null;
    }
}
