public function search()
{
// @todo Please modify the following code to remove attributes that should not be searched.
$criteria = new CDbCriteria();
$criteria->compare('id', $this->id);
$criteria->compare('primary_id', $this->primary_id, true);
$criteria->compare('primary_hos_num', $this->primary_hos_num, true);
$criteria->compare('primary_nhsnum', $this->primary_nhsnum, true);
$criteria->compare('primary_dob', $this->primary_dob, true);
$criteria->compare('primary_gender', $this->primary_gender, true);
$criteria->compare('secondary_id', $this->secondary_id, true);
$criteria->compare('secondary_hos_num', $this->secondary_hos_num, true);
$criteria->compare('secondary_nhsnum', $this->secondary_nhsnum, true);
$criteria->compare('secondary_dob', $this->secondary_dob, true);
$criteria->compare('secondary_gender', $this->secondary_gender, true);
$criteria->compare('merge_json', $this->merge_json, true);
$criteria->compare('comment', $this->comment, true);
$criteria->compare('status', $this->status);
$criteria->compare('last_modified_user_id', $this->last_modified_user_id, true);
$criteria->compare('last_modified_date', $this->last_modified_date, true);
$criteria->compare('created_user_id', $this->created_user_id, true);
$criteria->compare('created_date', $this->created_date, true);
return new CActiveDataProvider($this, array('criteria' => $criteria));
}