|
@@ -864,6 +864,10 @@ class PracticeManagementController extends Controller
|
|
|
$notesTotalWithBillingClosed = DB::select(DB::raw("SELECT COUNT(*) FROM note WHERE is_cancelled IS NOT TRUE AND is_bill_closed IS TRUE"))[0]->count;
|
|
|
$notesTotalWithClaimingClosed = DB::select(DB::raw("SELECT COUNT(*) FROM note WHERE is_cancelled IS NOT TRUE AND is_claim_closed IS TRUE"))[0]->count;
|
|
|
|
|
|
+ $patientsTotal = DB::select(DB::raw("SELECT COUNT(*) FROM client WHERE is_active IS TRUE"))[0]->count;
|
|
|
+ $patientsTotalWithBillingClosed = DB::select(DB::raw("SELECT COUNT(*) FROM client WHERE is_active IS TRUE AND (SELECT COUNT(*) FROM note WHERE is_cancelled IS NOT TRUE AND is_bill_closed IS NOT TRUE AND note.client_id = client.id) = 0"))[0]->count;
|
|
|
+ $patientsTotalWithClaimingClosed = DB::select(DB::raw("SELECT COUNT(*) FROM client WHERE is_active IS TRUE AND (SELECT COUNT(*) FROM note WHERE is_cancelled IS NOT TRUE AND is_claim_closed IS NOT TRUE AND note.client_id = client.id) = 0"))[0]->count;
|
|
|
+
|
|
|
$performerPro = $this->performer->pro;
|
|
|
$allPros = [];
|
|
|
if ($performerPro->pro_type == 'ADMIN') {
|
|
@@ -897,7 +901,10 @@ class PracticeManagementController extends Controller
|
|
|
'allPros' => $allPros,
|
|
|
'notesTotal' => $notesTotal,
|
|
|
'notesTotalWithBillingClosed' => $notesTotalWithBillingClosed,
|
|
|
- 'notesTotalWithClaimingClosed' => $notesTotalWithClaimingClosed
|
|
|
+ 'notesTotalWithClaimingClosed' => $notesTotalWithClaimingClosed,
|
|
|
+ 'patientsTotal' => $patientsTotal,
|
|
|
+ 'patientsTotalWithBillingClosed' => $patientsTotalWithBillingClosed,
|
|
|
+ 'patientsTotalWithClaimingClosed' => $patientsTotalWithClaimingClosed
|
|
|
];
|
|
|
|
|
|
return view('app.practice-management.patient-claim-summary', $data);
|