示例#1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Icd101::find();
     $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;
     }
     $query->andFilterWhere(['sex' => $this->sex]);
     $query->andFilterWhere(['like', 'code', $this->code])->andFilterWhere(['like', 'name', $this->name])->andFilterWhere(['like', 'spclty', $this->spclty])->andFilterWhere(['like', 'tname', $this->tname])->andFilterWhere(['like', 'code3', $this->code3])->andFilterWhere(['like', 'code4', $this->code4])->andFilterWhere(['like', 'code5', $this->code5])->andFilterWhere(['like', 'ipd_valid', $this->ipd_valid])->andFilterWhere(['like', 'icd10compat', $this->icd10compat])->andFilterWhere(['like', 'icd10tmcompat', $this->icd10tmcompat])->andFilterWhere(['like', 'active_status', $this->active_status])->andFilterWhere(['like', 'hos_guid', $this->hos_guid])->andFilterWhere(['like', 'hos_guid_ext', $this->hos_guid_ext]);
     return $dataProvider;
 }