public function getPres() { $id = $_POST["uid"]; $pat = patient::find($id); if ($pat == null) { redirect("phar"); } $patRecs = DB::connection("centraldb")->select('select * from `MR' . $id . '` where `type` = "pres" and `flag` = "0" '); session(["patId" => $pat->uid]); return view("pharmacy.buy", compact("patRecs", "pat")); }
public function testfunc() { echo '<!DOCTYPE html> <meta charset="utf-8">'; $pp = patient::where('userId', 3)->first(); $app = appointment::where('appointmentId', 1)->first(); $doc = doctor::where('userId', 4)->first(); $schedule = schedule::where('scheduleId', 1)->first(); $dep = department::where('departmentId', 2)->first(); // $doc->getScheduleInRange(2015, 12); $results = $doc->getDiagStats(2015, 12); foreach ($results as $date) { echo $date['date'] . ' ' . $date['morning'] . ' ' . $date['afternoon'] . ' ' . $date['sum'] . '<br>'; } // return view('testSearch')->with('patient', $pp)->with('ap', $app)->with('doctor', $doc)->with('sc', $schedule)->with('idd', $schedule->scheduleId)->with('department', $dep); }
public static function editPatientProfile($request) { $userId = $request['userId']; $addressStr = ""; if ($request['addressNo'] != null) { $addressSet = array($request['addressNo'], $request['moo'], $request['street'], $request['subdistrict'], $request['district'], $request['province'], $request['zipcode']); $addressStr = join(",,", $addressSet); } User::where('userId', $userId)->update(array('email' => $request['email'], 'name' => $request['name'], 'surname' => $request['surname'])); patient::where('userId', $userId)->update(array('telHome' => $request['telHome'], 'telMobile' => $request['telMobile'], 'address' => $addressStr, 'bloodGroup' => $request['bloodGroup'])); }
public function patientProfileByPharmacist($patientId) { $patient = patient::where('userId', $patientId)->first(); return view('pharmacist.patientProfileByPharmacist')->with('patient', $patient); }
public function addPatient() { $input = $_POST; $input["age"] = date("Y") - $input["yob"]; general::addPat($input); $pat = patient::where("uid", $input["uid"])->first(); $pat->password = bcrypt(session("password")); $pat->save(); session()->flash("error", "Successfully registered, You can sign in now."); return redirect("patient/login"); }
public function show($hospitalNo) { $patient = patient::findOrFail($hospitalNo); return view('patient.profile', compact('patient')); }
public function manageAppointmentShow($patientId) { $patient = patient::where('userId', $patientId)->first(); $appointments = $patient->appointmentSorted(); return view('staff.manageAppointmentForPatient2')->with('patient', $patient)->with('appointments', $appointments); }
public function searchPatient($url) { $query = e(Input::get('q', '')); if (!$query && $query == '') { return Response::json(array(), 400); } $patient = patient::searchPatient($query)->take(5)->get(array('patient.userId', 'name', 'surname')); $patient = $this->appendClass($patient, 'patient'); $patient = $this->appendUrl($patient, $url); return Response::json(array('data' => $patient)); }
/** * @param $uid * @return mixed */ public static function getPatient($uid) { $pat = patient::find($uid); return $pat; }