package com.xinelu.common.enums;

import lombok.Getter;

/**
 * @Description 管理路径节点名称
 * @Author zh
 * @Date 2024-04-18
 */
@Getter
public enum RouteNodeNameEnum {

    /**
     * 出院后
     */
    AFTER_DISCHARGE("AFTER_DISCHARGE", "出院后"),

    /**
     * 入院后
     */
    AFTER_ADMISSION("AFTER_ADMISSION", "入院后"),

    /**
     * 就诊后
     */
    AFTER_CONSULTATION("AFTER_CONSULTATION", "就诊后"),

    /**
     * 就诊/出院后
     */
    AFTER_VISIT_DISCHARGE("AFTER_VISIT_DISCHARGE", "就诊/出院后"),

    /**
     * 术前
     */
    PREOPERATIVE("PREOPERATIVE", "术前"),

    /**
     * 术后
     */
    POSTOPERATIVE("POSTOPERATIVE", "术后"),
    ;

    final private String info;
	final private String name;

    RouteNodeNameEnum(String info, String name) {
        this.info = info;
		this.name = name;
    }

	public String getName() {
		return name;
	}

	public static RouteNodeNameEnum getNameByInfo(String info) {
		for (RouteNodeNameEnum routeNodeName : RouteNodeNameEnum.values()) {
			if (info.equals(routeNodeName.getInfo())) {
				return routeNodeName;
			}
		}
		return RouteNodeNameEnum.AFTER_VISIT_DISCHARGE;
	}
}