public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(array('patient_id, allergy_id', 'required'), array('id, name', 'safe', 'on' => 'search'), array('comments', 'default', 'setOnEmpty' => true, 'value' => null));
}