Quellcode durchsuchen

RM - launch and clean

Vijayakrishnan vor 3 Jahren
Ursprung
Commit
8cce738147

+ 26 - 0
app/Http/Controllers/PracticeManagementController.php

@@ -1392,7 +1392,33 @@ ORDER BY claim.created_at ASC
     }
 
     public function rmLaunchAndClean(Request  $request) {
+
         $keyNumbers = [];
+
+        $keyNumbers['careMonthsEligibleForBillGeneration'] = CareMonth::where('is_bill_closed', false)
+            ->whereNotNull('company_pro_id')
+            ->whereNotNull('company_pro_payer_id')
+            ->whereNotNull('company_location_id')
+            ->whereRaw('(SELECT count(id) FROM care_month_cm_rm_reason WHERE care_month_id = care_month.id) > 0')
+            ->where('rm_total_time_in_seconds', '>=', 1800)
+            ->count();
+
+        $keyNumbers['careMonthsWithoutCompanyProInfo'] = CareMonth::where('is_bill_closed', false)
+            ->where(function ($q) {
+                $q->whereNull('company_pro_id')
+                    ->orWhereNull('company_pro_payer_id')
+                    ->orWhereNull('company_location_id');
+            })
+            ->count();
+
+        $keyNumbers['careMonthsWithoutRMReasons'] = CareMonth::where('is_bill_closed', false)
+            ->whereRaw('(SELECT count(id) FROM care_month_cm_rm_reason WHERE care_month_id = care_month.id) = 0')
+            ->count();
+
+        $keyNumbers['careMonthsUnder30RMMinutes'] = CareMonth::where('is_bill_closed', false)
+            ->where('rm_total_time_in_seconds', '<', 1800)
+            ->count();
+
         return  view('app.practice-management.rm-launch-and-clean', compact('keyNumbers'));
     }
 

+ 20 - 0
resources/views/app/practice-management/rm-launch-and-clean.blade.php

@@ -7,6 +7,26 @@
                 RM - Launch &amp; Clean
             </div>
         </div>
+        <table class="table table-striped table-condensed table-bordered table-sm width-300px">
+            <tbody>
+            <tr>
+                <td>Care Months Eligible For Bill Generation</td>
+                <td class="text-success font-weight-bold">{{$keyNumbers['careMonthsEligibleForBillGeneration']}}</td>
+            </tr>
+            <tr>
+                <td>Care Months Without Company/Pro Info</td>
+                <td class="text-warning-mellow font-weight-bold">{{$keyNumbers['careMonthsWithoutCompanyProInfo']}}</td>
+            </tr>
+            <tr>
+                <td>Care Months Without RM Reasons</td>
+                <td class="text-warning-mellow font-weight-bold">{{$keyNumbers['careMonthsWithoutRMReasons']}}</td>
+            </tr>
+            <tr>
+                <td>Care Months Under 30 RM Minutes</td>
+                <td class="text-warning-mellow font-weight-bold">{{$keyNumbers['careMonthsUnder30RMMinutes']}}</td>
+            </tr>
+            </tbody>
+        </table>
         <button class="btn btn-sm btn-primary btn-launch px-3 font-weight-bold">Generate Claims</button>
         <div class="my-3 text-secondary text-sm text-monospace launch-result" style="white-space: pre;">