surat/frontend/modules/administrator/models/CytoPapDiagnosisSearch.php

158 lines
7.9 KiB
PHP

<?php
namespace frontend\modules\administrator\models;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\models\CytoPapDiagnosis;
/**
* CytoPapDiagnosisSearch represents the model behind the search form of `common\models\CytoPapDiagnosis`.
*/
class CytoPapDiagnosisSearch extends CytoPapDiagnosis
{
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['id', 'status_id', 'source_id', 'test_method_id', 'specimen_adequacy', 'specimen_adequacy_1', 'specimen_adequacy_2', 'general_categorization', 'general_categorization_1', 'pathologist_id', 'cytotech1_id', 'cytotech2_id', 'pathologist2_id', 'is_critical_diagnosis', 'is_first_cancer', 'reference_img_id', 'is_edit_patient_information', 'cyto_pap_diagnosis_id', 'is_no_comment', 'is_conference', 'is_review', 'patho_report_id', 'is_qa', 'qa_id', 'is_same', 'is_difference', 'hpv_specimen_id', 'hpv_test_method_id', 'hpv_test_id', 'hpv_type_id', 'hpv_note_id', 't6', 't11', 't42', 't43', 't44', 't16', 't18', 't31', 't33', 't35', 't39', 't45', 't51', 't52', 't53', 't56', 't58', 't59', 't66', 't68', 'cp8304', 'hpv_suggestion_id', 'is_ca_confirm', 'is_suggesstion_ihc', 'is_suggesstion_special_stain', 'is_suggesstion_other', 'is_ca_confirm_agree', 'is_reject', 'is_reject_list'], 'integer'],
[['id_case', 'report_type', 'specimen_adequacy_3', 'specimen_adequacy_4', 'adequacy_other', 'general_categorization_2', 'categorization_other', 'suggestion_list', 'suggestion', 'rev', 'rev_date', 'pathologist_at', 'cytotech1_at', 'cytotech2_at', 'pathologist2_at', 'microscopic_img', 'microscopic_img_caption', 'review_remark', 'conference_at', 'outlab_report', 'consult_outlab_report', 'hpv_test', 'hpv_type', 'hpv_note', 'hpv_suggestion', 'hpv_img', 'is_ca_confirm_at', 'ca_confirm_remark', 'suggesstion_ihc', 'suggesstion_special_stain', 'suggesstion_other'], 'safe'],
];
}
/**
* {@inheritdoc}
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = CytoPapDiagnosis::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
// grid filtering conditions
$query->andFilterWhere([
'id' => $this->id,
'status_id' => $this->status_id,
'source_id' => $this->source_id,
'test_method_id' => $this->test_method_id,
'specimen_adequacy' => $this->specimen_adequacy,
'specimen_adequacy_1' => $this->specimen_adequacy_1,
'specimen_adequacy_2' => $this->specimen_adequacy_2,
'general_categorization' => $this->general_categorization,
'general_categorization_1' => $this->general_categorization_1,
'pathologist_id' => $this->pathologist_id,
'cytotech1_id' => $this->cytotech1_id,
'cytotech2_id' => $this->cytotech2_id,
'pathologist_at' => $this->pathologist_at,
'cytotech1_at' => $this->cytotech1_at,
'cytotech2_at' => $this->cytotech2_at,
'pathologist2_id' => $this->pathologist2_id,
'pathologist2_at' => $this->pathologist2_at,
'is_critical_diagnosis' => $this->is_critical_diagnosis,
'is_first_cancer' => $this->is_first_cancer,
'reference_img_id' => $this->reference_img_id,
'is_edit_patient_information' => $this->is_edit_patient_information,
'cyto_pap_diagnosis_id' => $this->cyto_pap_diagnosis_id,
'is_no_comment' => $this->is_no_comment,
'is_conference' => $this->is_conference,
'is_review' => $this->is_review,
'conference_at' => $this->conference_at,
'patho_report_id' => $this->patho_report_id,
'is_qa' => $this->is_qa,
'qa_id' => $this->qa_id,
'is_same' => $this->is_same,
'is_difference' => $this->is_difference,
'hpv_specimen_id' => $this->hpv_specimen_id,
'hpv_test_method_id' => $this->hpv_test_method_id,
'hpv_test_id' => $this->hpv_test_id,
'hpv_type_id' => $this->hpv_type_id,
'hpv_note_id' => $this->hpv_note_id,
't6' => $this->t6,
't11' => $this->t11,
't42' => $this->t42,
't43' => $this->t43,
't44' => $this->t44,
't16' => $this->t16,
't18' => $this->t18,
't31' => $this->t31,
't33' => $this->t33,
't35' => $this->t35,
't39' => $this->t39,
't45' => $this->t45,
't51' => $this->t51,
't52' => $this->t52,
't53' => $this->t53,
't56' => $this->t56,
't58' => $this->t58,
't59' => $this->t59,
't66' => $this->t66,
't68' => $this->t68,
'cp8304' => $this->cp8304,
'hpv_suggestion_id' => $this->hpv_suggestion_id,
'is_ca_confirm' => $this->is_ca_confirm,
'is_ca_confirm_at' => $this->is_ca_confirm_at,
'is_suggesstion_ihc' => $this->is_suggesstion_ihc,
'is_suggesstion_special_stain' => $this->is_suggesstion_special_stain,
'is_suggesstion_other' => $this->is_suggesstion_other,
'is_ca_confirm_agree' => $this->is_ca_confirm_agree,
'is_reject' => $this->is_reject,
'is_reject_list' => $this->is_reject_list,
]);
$query->andFilterWhere(['like', 'id_case', $this->id_case])
->andFilterWhere(['like', 'report_type', $this->report_type])
->andFilterWhere(['like', 'specimen_adequacy_3', $this->specimen_adequacy_3])
->andFilterWhere(['like', 'specimen_adequacy_4', $this->specimen_adequacy_4])
->andFilterWhere(['like', 'adequacy_other', $this->adequacy_other])
->andFilterWhere(['like', 'general_categorization_2', $this->general_categorization_2])
->andFilterWhere(['like', 'categorization_other', $this->categorization_other])
->andFilterWhere(['like', 'suggestion_list', $this->suggestion_list])
->andFilterWhere(['like', 'suggestion', $this->suggestion])
->andFilterWhere(['like', 'rev', $this->rev])
->andFilterWhere(['like', 'rev_date', $this->rev_date])
->andFilterWhere(['like', 'microscopic_img', $this->microscopic_img])
->andFilterWhere(['like', 'microscopic_img_caption', $this->microscopic_img_caption])
->andFilterWhere(['like', 'review_remark', $this->review_remark])
->andFilterWhere(['like', 'outlab_report', $this->outlab_report])
->andFilterWhere(['like', 'consult_outlab_report', $this->consult_outlab_report])
->andFilterWhere(['like', 'hpv_test', $this->hpv_test])
->andFilterWhere(['like', 'hpv_type', $this->hpv_type])
->andFilterWhere(['like', 'hpv_note', $this->hpv_note])
->andFilterWhere(['like', 'hpv_suggestion', $this->hpv_suggestion])
->andFilterWhere(['like', 'hpv_img', $this->hpv_img])
->andFilterWhere(['like', 'ca_confirm_remark', $this->ca_confirm_remark])
->andFilterWhere(['like', 'suggesstion_ihc', $this->suggesstion_ihc])
->andFilterWhere(['like', 'suggesstion_special_stain', $this->suggesstion_special_stain])
->andFilterWhere(['like', 'suggesstion_other', $this->suggesstion_other]);
return $dataProvider;
}
}