OEModule\OphCoCvi\components\OphCoCvi_API::isVaBelowThreshold PHP Method

isVaBelowThreshold() public method

Checks whether the VA value(s) is below the threshold
public isVaBelowThreshold ( integer | array $va_base_value ) : boolean
$va_base_value integer | array
return boolean true if value below the threshold
    public function isVaBelowThreshold($va_base_value)
    {
        $threshold = $this->yii->params['thresholds']['visualAcuity']['alert_base_value'];
        if (is_array($va_base_value)) {
            foreach ($va_base_value as $value) {
                if (is_numeric($value) && $value < $threshold) {
                    return true;
                }
            }
            return false;
        } else {
            return is_numeric($va_base_value) && $va_base_value < $threshold;
        }
    }