|
@@ -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'));
|
|
|
}
|
|
|
|