public static function recordPatientGeneralDetail2($input) { $patientId = $input['patient']; $appointment = appointment::where('patientId', $patientId)->first(); // $input['appointmentId'] = $appointment->appointmentId; $input['nurseId'] = 16; $input['appointmentId'] = 12; // $physicalRecord = physicalRecord::create($input); // return $physicalRecord; }
public function diagRecordPdf(Request $request) { $appId = $request['appointmentId']; $app = appointment::where('appointmentId', $appId)->first(); $general = $app->physicalRecord; $diag = $app->diagnosisRecord; $prescription = $app->prescription; $data = ['date' => $app->diagDate(), 'HN' => $app->patient->hospitalNo, 'patName' => $app->patient->name(), 'patLast' => $app->patient->surname(), 'sex' => $app->patient->sex, 'bloodType' => $app->patient->bloodGroup, 'age' => $app->age(), 'doctorName' => $app->doctor()->fullname(), 'department' => $app->department()->departmentName, 'diagDate' => $app->diagDate(), 'diagTime' => $app->diagTime(), 'symptom' => $app->symptom, 'diag' => $diag->diagnosisDetail, 'medicine' => $prescription->medicines, 'weight' => $general->weight, 'height' => $general->height, 'sysBlood' => $general->sysBlood, 'diBlood' => $general->diBlood, 'heartRate' => $general->heartRate]; $pdf = PDF::loadView('patient/diagRecordPdf', $data)->setOption('page-size', 'A4'); return $pdf->stream(); }
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 function showPatientProfileToDoctor($patientId) { $patient = patient::where('userId', $patientId)->first(); $appointments = appointment::getRecordedAppointments($patientId); return view('doctor.patientProfileByDoctor')->with('patient', $patient)->with('appointments', $appointments); }
public static function delayAppointment($request) { $appointmentId = $request['appointmentId']; $appointment = appointment::where('appointmentId', $appointmentId)->first(); $appointment->scheduleId = $request['scheduleId']; $appointment->save(); // appointment::where('appointmentId',$appointmentId)->update(array( // 'scheduleId' => $request['scheduleId'] // )); return $appointment; }
public function viewDoctorAppointment(Request $request) { // if(Auth::user()->userType == "doctor") // $doctorId = Auth::user()->userId; // else $doctorId = $request->doctor; $doctorId = $request->doctor; $appointments = appointment::viewDoctorAppointment($doctorId); }
public function recordPrescriptionShow($patientId) { $appointment = appointment::toBePrescribe($patientId); $prescription = $appointment->prescription; return view('pharmacist.recordPrescriptionHistory2')->with('appointment', $appointment)->with('prescription', $prescription); }