|
@@ -417,6 +417,42 @@ class PracticeManagementController extends Controller
|
|
|
'view_treatment_service_utilization_by_patient'));
|
|
|
}
|
|
|
|
|
|
+ public function processingBillMatrix(Request $request, $proUid = null)
|
|
|
+ {
|
|
|
+ $proUid = $proUid ? $proUid : $request->get('pro-uid');
|
|
|
+ $performerPro = $this->performer->pro;
|
|
|
+ $targetPro = null;
|
|
|
+ $allPros = [];
|
|
|
+ if ($performerPro->pro_type == 'ADMIN') {
|
|
|
+ $allPros = Pro::all();
|
|
|
+ $targetPro = Pro::where('uid', $proUid)->first();
|
|
|
+ } else {
|
|
|
+ $targetPro = $performerPro;
|
|
|
+ }
|
|
|
+ $bills = [];
|
|
|
+ if ($targetPro) {
|
|
|
+ $bills = Bill::where('hcp_pro_id', $targetPro->id)->
|
|
|
+ where('has_hcp_been_paid', false)->
|
|
|
+ where('is_cancelled', false)->
|
|
|
+ where('is_signed_by_hcp', true)->
|
|
|
+ orderBy('effective_date', 'desc')->paginate();
|
|
|
+ } else {
|
|
|
+ $bills = Bill::where('has_hcp_been_paid', false)->
|
|
|
+ where('is_cancelled', false)->
|
|
|
+ where('is_signed_by_hcp', true)->
|
|
|
+ orderBy('effective_date', 'desc')->
|
|
|
+ paginate();
|
|
|
+ }
|
|
|
+ $viewData = [
|
|
|
+ 'bills' => $bills,
|
|
|
+ 'allPros' => $allPros,
|
|
|
+ 'targetPro' => $targetPro,
|
|
|
+ 'performerPro' => $performerPro,
|
|
|
+ 'proUid' => $proUid
|
|
|
+ ];
|
|
|
+ return view('app.practice-management.processing-bill-matrix', $viewData);
|
|
|
+ }
|
|
|
+
|
|
|
public function hcpBillMatrix(Request $request, $proUid = null)
|
|
|
{
|
|
|
$proUid = $proUid ? $proUid : $request->get('pro-uid');
|