Example #1
0
 public function getDiags()
 {
     $diags = DB::connection("centraldb")->select('select * from `MR' . $_POST["uid"] . '` where `type`= "bldp" and `flag` = "0"');
     if ($diags == null) {
         return redirect("diag");
     }
     $diags = $diags[0];
     $id = $diags->id;
     $docId = $diags->docid;
     $patient = General::getPatient($_POST["uid"]);
     return view("diag.diagnose", compact("id", "patient", "docId"));
 }
Example #2
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");
     }
 }
Example #3
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);
 }