package com.xinelu.common.enums;

import lombok.Getter;

/**
 * @Author mengkuiliang
 * @Description 随访参数枚举
 * @Date 2022-01-14 9:12
 * @Param
 * @return
 **/
@Getter
public enum FollowupType {

    /** 高血压随访参数 */
    FOLLOWUP_HBP("28",  "sfysqm",  "jmqm"),

    /** 糖尿病随访参数 */
    FOLLOWUP_T2DM("29",  "sfysqm",  "jmqm"),

    /** 高血压高危人群随访参数 */
    FOLLOWUP_HBPHIGH("30",  "sfysqm",  ""),

    /** 精神障碍个人信息补充参数 */
    FOLLOWUP_SMI_REPLENISH("31",  "ysqm",  "hzjsqm"),

    /** 精神障碍随访参数 */
    FOLLOWUP_SMI("32",  "ysqm",  "hzjsqm"),

    /** 孕产妇产后访视随访参数 */
    FOLLOWUP_MATERNAL("12",  "sfysqm",  "jmjsqm"),

    /** 新生儿随访参数 */
    FOLLOWUP_NEONATE("14",  "sfysqm",  "jzqm"),

    /** 脑卒中随访参数 */
    FOLLOWUP_CVA("100",  "",  ""),

    /** 冠心病随访参数 */
    FOLLOWUP_CHD("101",  "",  ""),

    /** 听力、言语残疾随访参数 */
    FOLLOWUP_HI("102",  "",  ""),

    /** 言语残疾随访参数 */
    FOLLOWUP_SD("103",  "",  ""),

    /** 肢体残疾随访参数 */
    FOLLOWUP_PD("104",  "",  ""),

    /** 智力残疾随访参数 */
    FOLLOWUP_ID("105",  "",  ""),

    /** 视力残疾随访参数 */
    FOLLOWUP_VI("106",  "",  ""),

    NONE("", "", "");


    /** 随访类型 */
    private final String tableName;
    /** 医生签名类型 */
    private final String userSignColumn;
    /** 居民签名类型 */
    private final String residentSignColumn;

    FollowupType(String tableName, String userSignColumn, String residentSignColumn) {
        this.tableName = tableName;
        this.userSignColumn = userSignColumn;
        this.residentSignColumn = residentSignColumn;
    }

    public static FollowupType getFolllowupTypeByCode(String tableName) {
        for(FollowupType followupType : FollowupType.values()) {
            if (tableName.equals(followupType.getTableName())) {
                return followupType;
            }
        }
        return FollowupType.NONE;
    }
}
