예제 #1
0
 public function print_test()
 {
     $id = Input::get('id');
     $test = Labtest::findOrFail($id);
     $patient = $test->appointment->patient;
     $date = date('j F, Y', strtotime($test->appointment->date));
     $time = date('H:i:s', strtotime($test->appointment->time));
     $doctor_name = $test->appointment->employee->name;
     $html = "<html><body>" . " <img src='./images/logo_new1.jpg'/>\n                <center>\n                    <h1><u> Lab Test Report </u></h1>\n                </center>\n                <table style='width: 80%; border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n\n                    <tr>\n                        <td height='20'><label>Patient Name:</label></td>\n                        <td><label> {$patient->name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Patient ID:</label></td>\n                        <td><label> {$patient->patient_id} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Visit Date:</label></td>\n                        <td><label> {$date} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Visit Time:</label></td>\n                        <td><label> {$time} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Doctor Name:</label></td>\n                        <td><label> {$doctor_name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Test Name:</label></td>\n                        <td><label> {$test->test_name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Description:</label></td>\n                        <td><label> {$test->test_description} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'> <label>Test Results:</label></td>\n                        <td><label> {$test->test_results} </label></td>\n                    </tr>\n                </table>" . "</body></html>";
     return PDF::load($html, 'A4', 'portrait')->show($patient->name . ' Test Report');
 }
예제 #2
0
 /**
  * Remove the specified labtest from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Labtest::destroy($id);
     return Redirect::route('labtests.index');
 }
예제 #3
0
     $doctor_name = $prescription->appointment->employee->name;
     $patient = $prescription->appointment->patient;
     $medicines = [];
     foreach (explode(',', $prescription->medicines) as $id) {
         array_push($medicines, Medicine::find($id));
     }
     return View::make('printables.prescription_print', compact('prescription', 'date', 'time', 'doctor_name', 'patient', 'medicines'));
 });
 Route::get('app_test_print', function () {
     $appointments = Appointment::has('labtests')->get();
     $flag = "test_print";
     return View::make('appointment_based_data.appointments', compact('appointments', 'flag'));
 });
 Route::get('test_print', function () {
     $id = Input::get('id');
     $test = Labtest::findOrFail($id);
     $patient = $test->appointment->patient;
     $date = date('j F, Y', strtotime($test->appointment->date));
     $time = date('H:i:s', strtotime($test->appointment->time));
     $doctor_name = $test->appointment->employee->name;
     return View::make('printables.test_print', compact('test', 'date', 'time', 'doctor_name', 'patient'));
 });
 Route::get('app_checkup_fee_print', function () {
     $appointments = Appointment::has('checkupfee')->get();
     $flag = "checkup_invoice";
     return View::make('appointment_based_data.appointments', compact('appointments', 'flag'));
 });
 Route::get('checkup_invoice_print', function () {
     $id = Input::get('id');
     $fee = Checkupfee::findOrFail($id);
     $patient = $fee->appointment->patient;