public function getTextOperationName() { if ($rule = OphTrOperationbooking_Operation_Name_Rule::model()->find('theatre_id=?', array($this->booking->session->theatre_id))) { return $this->getPatient()->childPrefix . $rule->name; } if ($rule = OphTrOperationbooking_Operation_Name_Rule::model()->find('theatre_id is null')) { return $this->getPatient()->childPrefix . $rule->name; } return $this->getPatient()->childPrefix . 'operation'; }