public function availableOrPk($id)
{
$alias = $this->getTableAlias(true);
$criteria = new CDbCriteria();
$criteria->compare('drug.active', true);
$criteria->compare("{$alias}.active", true);
$criteria->addCondition("{$alias}.decisiontree_id is not null");
$criteria->compare("{$alias}." . $this->metadata->tableSchema->primaryKey, $id, false, 'OR');
$this->dbCriteria->mergeWith($criteria);
return $this;
}