Esempio n. 1
0
 /**
  * @param Request $request
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function preview_dental_billform(Request $request)
 {
     $rules = ['exam_from' => 'required|date|before:exam_to', 'exam_to' => 'required|date|after:exam_from', 'dentist_id' => 'required'];
     $this->validate($request, $rules);
     $from = Carbon::parse($request->input('exam_from'));
     $to = Carbon::parse($request->input('exam_to'));
     $dents = Dental::getBilling($request->input('dentist_id'), $from, $to)->get();
     $data = ['data' => $dents, 'from' => $from, 'to' => $to, 'rspan' => 8, 'rptTitle' => 'Billing Report', 'pageTitle' => 'ODRMS - Reports - Dental Billing Report'];
     return view('reports.dental-billing', $data);
 }
Esempio n. 2
0
 public function dentalform($pid, $tno)
 {
     $dental = Dental::with('patient.agency', 'dentist')->where('trans_no', '=', $tno)->firstOrFail();
     $data = ['res' => $dental, 'pageTitle' => 'Dental Form - ' . $dental->patient->name];
     return view('reports.dental', $data);
 }
Esempio n. 3
0
 public static function getBilling($dentist, $from, $to)
 {
     return Dental::with('patient.agency', 'dentist')->where('dentist_id', '=', $dentist)->where('exam_dt', '>=', $from)->where('exam_dt', '<=', $to);
 }