Browse Source

fixed launch queries

= 3 năm trước cách đây
mục cha
commit
789d2c2efe
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      app/Http/Controllers/PracticeManagementController.php

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

@@ -1400,6 +1400,7 @@ ORDER BY claim.created_at ASC
             ->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 )
             ->count();
 
         $keyNumbers['careMonthsEligibleForBillGeneration_RM30_HCP_PLUS_NONHCP20'] = CareMonth::where('is_bill_closed', false)
@@ -1410,6 +1411,7 @@ ORDER BY claim.created_at ASC
             ->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 )
             ->count();
 
         $keyNumbers['careMonthsEligibleForBillGeneration_RM30_HCP'] = CareMonth::where('is_bill_closed', false)
@@ -1419,6 +1421,7 @@ ORDER BY claim.created_at ASC
             ->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', '<', 3000)
+            ->where('number_of_days_with_remote_measurements', '>=', 16 )
             ->count();
 
         $keyNumbers['careMonthsWithoutCompanyProInfo'] = CareMonth::where('is_bill_closed', false)