Esempio n. 1
0
 public function index()
 {
     $aryDrug = Drug::all();
     $objJson = array();
     foreach ($aryDrug as $drug) {
         switch ($drug->type) {
             case 1:
                 $objJson[] = array("type" => $drug->type, "defaults" => array("morning" => $drug->morning, "lunch" => $drug->lunch, "afternoon" => $drug->afternoon, "night" => $drug->night), 'total' => -1);
                 break;
             case 2:
             case 3:
                 $objJson[] = array("type" => $drug->type, "fixed" => $drug->fixed, "special" => $drug->special);
                 break;
             case 4:
                 $objJson[] = array("type" => $drug->type, "fixed" => $drug->fixed);
                 break;
         }
     }
     return View::make('medical.medical', array('address' => Address::all(), 'diseases' => Disease::all(), 'drugs' => Drug::all(), 'current_day' => Config::get('constants.current_day', 3), 'max_day' => Config::get('constants.max_day', 7), 'drug' => json_encode($objJson)));
 }
Esempio n. 2
0
 public function index()
 {
     return View::make('statistics.statistics', array('drugs' => Drug::all()));
 }
Esempio n. 3
0
 public function index()
 {
     return Response::json(array('address' => Address::all(), 'diseases' => Disease::all(), 'drugs' => Drug::all(), 'current_day' => Config::get('constants.current_day', 3), 'max_day' => Config::get('constants.max_day', 7)));
 }