|
@@ -1404,6 +1404,17 @@ ORDER BY claim.created_at ASC
|
|
|
->where('has_anyone_interacted_with_client_about_rm_outside_note', '=', true)
|
|
|
->count();
|
|
|
|
|
|
+ $keyNumbers['careMonthsEligibleForBillGeneration_RM30_HCP_PLUS_40_ifHadInteraction'] = 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_by_mcp', '>=', 1800)
|
|
|
+ ->where('rm_total_time_in_seconds', '>=', 4200) // at 4200 (70 minutes, it becomes eligible for plus40)
|
|
|
+ ->where('number_of_days_with_remote_measurements', '>=', 16 )
|
|
|
+ ->where('has_anyone_interacted_with_client_about_rm_outside_note', '=', false)
|
|
|
+ ->count();
|
|
|
+
|
|
|
$keyNumbers['careMonthsEligibleForBillGeneration_RM30_HCP_PLUS_20'] = CareMonth::where('is_bill_closed', false)
|
|
|
->whereNotNull('company_pro_id')
|
|
|
->whereNotNull('company_pro_payer_id')
|
|
@@ -1416,6 +1427,18 @@ ORDER BY claim.created_at ASC
|
|
|
->where('has_anyone_interacted_with_client_about_rm_outside_note', '=', true)
|
|
|
->count();
|
|
|
|
|
|
+ $keyNumbers['careMonthsEligibleForBillGeneration_RM30_HCP_PLUS_20_ifHadInteraction'] = 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_by_mcp', '>=', 1800)
|
|
|
+ ->where('rm_total_time_in_seconds', '<', 4200)
|
|
|
+ ->where('rm_total_time_in_seconds', '>=', 3000) // at 3000 (50 minutes, it becomes eligible for plus20)
|
|
|
+ ->where('number_of_days_with_remote_measurements', '>=', 16 )
|
|
|
+ ->where('has_anyone_interacted_with_client_about_rm_outside_note', '=', false)
|
|
|
+ ->count();
|
|
|
+
|
|
|
$keyNumbers['careMonthsEligibleForBillGeneration_RM30_HCP'] = CareMonth::where('is_bill_closed', false)
|
|
|
->whereNotNull('company_pro_id')
|
|
|
->whereNotNull('company_pro_payer_id')
|