public function prescription()
 {
     $i = 1;
     while ($_POST['med' . $i]) {
         $prescription[$i][0] = $_POST['med' . $i];
         $prescription[$i][1] = $_POST['dose' . $i];
         $i++;
     }
     //var_dump($prescription);
     require_once 'model/appt.php';
     Appt::update($prescription, $_POST['diagnosis']);
 }
 public function appt_approve()
 {
     session_start();
     require_once 'model/appt.php';
     if (isset($_GET['pid'])) {
         if ($pid = $_GET['pid']) {
             $a = $_GET['app'];
             Appt::approve($pid, $a);
         }
     }
     $_SESSION['appts'] = Appt::display();
     header('location: view/doctor/appt_approve.php');
 }
Ejemplo n.º 3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     // delete
     $appt = Appt::find($id);
     $appt->delete();
     // redirect
     Session::flash('message', 'Successfully deleted the appointment!');
     return Redirect::to('/');
 }
 public function medication()
 {
     require_once 'model/appt.php';
     $_SESSION['medi'] = Appt::medication();
     header('location: view/patient/medication_patient.php');
 }
Ejemplo n.º 5
0
            // 	// Attendee List
            // 	$getAttendees = $pdo->prepare("SELECT rv_attendees.id AS 'attendees_id', rv_appts.start AS 'appt_start', rv_appts.id AS 'appt_id', rv_users.id AS 'user_id', username, email, title, description FROM rv_appts, rv_users, rv_attendees WHERE rv_users.id=rv_attendees.user_id AND rv_appts.id=rv_attendees.appt_id AND rv_appts.id='$appt->id' ORDER BY rv_attendees.id ASC;");
            // 	$getAttendees->execute();
            // 	$app->getAttendeesCount = $getAttendees->rowCount();
            //
            // 	//DelegateID
            // 	$getDelegateID = $pdo->prepare("SELECT rv_attendees.id AS 'attendees_id', rv_attendees.user_id AS 'attendees_user_id', rv_appts.start AS 'appt_start', rv_appts.id AS 'appt_id', rv_users.id 'user_id', username, email, title, description FROM rv_appts, rv_users, rv_attendees WHERE rv_users.id=rv_attendees.user_id AND rv_appts.id=rv_attendees.appt_id AND rv_appts.id='$appt->id' ORDER BY rv_attendees.id ASC;");
            // 	$getDelegateID->execute();
            // 	$app->$getDelegateCount = $getDelegateID->rowCount();
            //
            // 	//conflict calculator
            // 	$conflictCounter = $pdo->prepare("SELECT COUNT(*) FROM rv_attendees, rv_users, rv_appts WHERE rv_attendees.user_id = rv_users.id AND rv_attendees.appt_id = rv_appts.id AND rv_users.id='$app->user' AND start < '$appt->end' AND end > '$appt->start';");
            // 	$conflictCounter->execute();
            // 	$app->conflictTotal = $conflictCounter->rowCount();
            // }
            $app->approvalCount = Appt::where('approval', '=', '0')->count();
        }
        return $app;
    });
    $app = App::make('myApp');
    View::share('myApp', $app);
});
App::after(function ($request, $response) {
    //
});
/*
|--------------------------------------------------------------------------
| Authentication Filters
|--------------------------------------------------------------------------
|
| The following filters are used to verify that the user of the current