package com.openhis.common.enums.ybenums;

import com.github.pagehelper.util.StringUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 医保费用结算类型
 *
 * @author YourName
 * @date 2025-04-22
 */
@Getter
@AllArgsConstructor
public enum YbHiFeesetlType {

    /**
     * 非医疗保险结算
     */
    CHIEF_PHYSICIAN("0", "非医疗保险结算"),

    /**
     * 本地医疗保险结算
     */
    ATTENDING_PHYSICIAN("1", "本地医疗保险结算"),

    /**
     * 异地医疗保险结算
     */
    DEPUTY_CHIEF_PHYSICIAN("2", "异地医疗保险结算");


    private String code;
    private String description;

    public static YbHiFeesetlType getByValue(String code) {
        if (StringUtil.isEmpty(code)) {
            return null;
        }
        for (YbHiFeesetlType title : values()) {
            if (title.getCode().equals(code)) {
                return title;
            }
        }
        return null;
    }
}