Esempio n. 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Monitoringbp24data::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(['id_monitor' => $this->id_monitor, 'time' => $this->time, 'SBPbr' => $this->SBPbr, 'dia' => $this->dia, 'pulse' => $this->pulse, 'SBPao' => $this->SBPao, 'AIXao' => $this->AIXao, 'AIXbr' => $this->AIXbr, 'PWVao' => $this->PWVao, 'PWVsd' => $this->PWVsd, 'fk_person' => $this->fk_person, 'date_creation' => $this->date_creation, 'fk_id24h' => $this->fk_id24h, 'fk_study_no' => $this->fk_study_no]);
     $query->andFilterWhere(['like', 'comments', $this->comments]);
     return $dataProvider;
 }
Esempio n. 2
0
 public function pull24hoursdata($id)
 {
     $query = Monitoringbp24data::find()->where(['fk_id24h' => $id]);
     $provider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 10]]);
     return $provider;
 }
 /**
  * Finds the Monitoringbp24data model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Monitoringbp24data the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Monitoringbp24data::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }