Element_OphCoTherapyapplication_PatientSuitability::getDecisionTreeForSide PHP Method

getDecisionTreeForSide() public method

get the decision tree for the element side $side.
public getDecisionTreeForSide ( string $side ) : OphCoTherapyapplication_DecisionTree
$side string
return OphCoTherapyapplication_DecisionTree
    public function getDecisionTreeForSide($side)
    {
        $side_id = $side == 'left' ? SplitEventTypeElement::LEFT : SplitEventTypeElement::RIGHT;
        if ($response = OphCoTherapyapplication_PatientSuitability_DecisionTreeNodeResponse::model()->find('patientsuit_id=? and eye_id=? and value != ?', array($this->id, $side_id, ''))) {
            return $response->node->decisiontree;
        }
        return;
    }