|
@@ -89,6 +89,27 @@ class PracticeManagementController extends Controller
|
|
return view ('app.practice-management.remote-monitoring-report', compact('rows', 'isAdmin'));
|
|
return view ('app.practice-management.remote-monitoring-report', compact('rows', 'isAdmin'));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function dailyTreatmentServices(Request $request) {
|
|
|
|
+ $type = $request->input('t');
|
|
|
|
+ $fPro = null;
|
|
|
|
+ if($type === 'pro') {
|
|
|
|
+ $fPro = Pro::where('uid', $request->input('p'))->first();
|
|
|
|
+ $rows = DB::select(DB::raw("
|
|
|
|
+SELECT effective_date, hcp_pro_id, p.name_first, p.name_last, count(*), sum(number_of_units) as units
|
|
|
|
+FROM bill JOIN pro p on p.id = bill.hcp_pro_id
|
|
|
|
+WHERE code = 'Treatment Services'
|
|
|
|
+GROUP BY effective_date, hcp_pro_id, p.name_first, p.name_last
|
|
|
|
+ORDER BY effective_date DESC, p.name_first ASC, p.name_last ASC
|
|
|
|
+"));
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ $rows = DB::select(DB::raw("
|
|
|
|
+SELECT effective_date, count(*), sum(number_of_units) as units FROM bill WHERE code = 'Treatment Services' GROUP BY effective_date ORDER BY effective_date DESC
|
|
|
|
+"));
|
|
|
|
+ }
|
|
|
|
+ return view ('app.practice-management.daily-treatment-services', compact('rows'));
|
|
|
|
+ }
|
|
|
|
+
|
|
public function billingReport(Request $request)
|
|
public function billingReport(Request $request)
|
|
{
|
|
{
|
|
|
|
|