/**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Patient::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(['patient_id' => $this->patient_id, 'patient_birthday' => $this->patient_birthday, 'patient_ceckin' => $this->patient_ceckin, 'patient_room' => $this->patient_room, 'patient_doctor' => $this->patient_doctor]);
     $query->andFilterWhere(['like', 'patient_name', $this->patient_name])->andFilterWhere(['like', 'patient_gender', $this->patient_gender])->andFilterWhere(['like', 'patient_address', $this->patient_address])->andFilterWhere(['like', 'patient_phone', $this->patient_phone])->andFilterWhere(['like', 'patient_email', $this->patient_email])->andFilterWhere(['like', 'patient_status', $this->patient_status]);
     return $dataProvider;
 }