Element_OphCoTherapyapplication_PatientSuitability::isNonCompliant PHP Method

isNonCompliant() public method

returns null for invalid requests
public isNonCompliant ( string $side = 'both' ) : boolean | null
$side string
return boolean | null
    public function isNonCompliant($side = 'both')
    {
        if ($side == 'left') {
            if ($this->hasLeft()) {
                return !$this->left_nice_compliance;
            } else {
                return;
            }
        }
        if ($side == 'right') {
            if ($this->hasRight()) {
                return !$this->right_nice_compliance;
            } else {
                return;
            }
        }
        $res = null;
        if ($this->hasLeft()) {
            $res = !$this->left_nice_compliance;
        }
        if (!$res && $this->hasRight()) {
            $res = !$this->right_nice_compliance;
        }
        return $res;
    }