示例#1
0
 /**
  * home page of patient , accessible only when logged in
  */
 public function home()
 {
     session(["hospid" => 2]);
     if (MyAuth::check(MyAuth::$isPatient)) {
         $id = session("loggedUserId");
         $patient = General::getPatient($id);
         $ilns = General::getMedRecIllns($id);
         $proc = General::getMedRecProc($id);
         $pres = General::getMedRecPres($id);
         $patient = General::getPatient(session("loggedUserId"));
         return view("patient.home", compact("patient", "ilns", "proc", "pres", "patient"));
     } else {
         return redirect("patient/login");
     }
 }
示例#2
0
 public function getPatDets()
 {
     $id = $_POST["uid"];
     $patient = General::getPatient($id);
     $ilns = General::getMedRecIllns($id);
     $proc = General::getMedRecProc($id);
     $pres = General::getMedRecPres($id);
     $arr = ["patient" => $patient, "ilns" => $ilns, "proc" => $proc, "pres" => $pres];
     return json_encode($arr);
 }