package com.ruoyi.web.modules.industryservice.support;

/**
 * 健康源数据分析与预警生成规则。
 */
public final class YakDiseaseWarningAnalysisRules
{
    public static final int RECORD_TYPE_QUARANTINE = 1;

    public static final int RECORD_TYPE_DIAGNOSIS = 2;

    public static final int RECORD_TYPE_BREEDING = 3;

    public static final int WARNING_TYPE_QUARANTINE = 3;

    public static final int WARNING_TYPE_DIAGNOSIS = 4;

    public static final String ANALYZED_NO = "0";

    public static final String ANALYZED_YES = "1";

    /** 同一地区同一自然日内异常/发病条数达到该阈值则生成健康预警 */
    public static final int CONCENTRATION_THRESHOLD = 3;

    private YakDiseaseWarningAnalysisRules()
    {
    }

    public static boolean isAbnormalQuarantineResult(String result)
    {
        if (result == null || result.trim().isEmpty())
        {
            return false;
        }
        String text = result.trim();
        return text.contains("异常") || text.contains("阳性")
                || "abnormal".equalsIgnoreCase(text) || "positive".equalsIgnoreCase(text);
    }
}
