Ejemplo n.º 1
0
 public function actionView($id)
 {
     $diag = new ActiveDataProvider(['query' => Ovstdiag::find()->where(['vn' => $id])->orderBy('diagtype'), 'pagination' => ['pageSize' => 20]]);
     $drug = new ActiveDataProvider(['query' => Opitemrece::find()->join('LEFT OUTER JOIN', 's_drugitems', 'opitemrece.icode =s_drugitems.icode')->where(['vn' => $id]), 'pagination' => ['pageSize' => 20]]);
     $lab = new ActiveDataProvider(['query' => Laborder::find()->join('LEFT OUTER JOIN', 'lab_head', 'lab_order.lab_order_number =lab_head.lab_order_number')->join('LEFT OUTER JOIN', 'lab_items', 'lab_order.lab_items_code =lab_items.lab_items_code')->where(['vn' => $id]), 'pagination' => ['pageSize' => 20]]);
     return $this->render('view', ['model' => $this->findModel($id), 'dataProvider' => $drug, 'dataProviderLab' => $lab, 'dataProviderDiag' => $diag]);
 }
Ejemplo n.º 2
0
 /** Relations
  *  
  */
 public function getLaborder()
 {
     return $this->hasOne(Laborder::className(), ['lab_order_number' => 'lab_order_number']);
 }