Răsfoiți Sursa

Merge branch 'master' into dev-vj

Vijayakrishnan 3 ani în urmă
părinte
comite
24c0394ecc

+ 8 - 4
app/Http/Controllers/PracticeManagementController.php

@@ -1404,7 +1404,7 @@ ORDER BY claim.created_at DESC
             ->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')
+            //->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 )
@@ -1426,7 +1426,7 @@ ORDER BY claim.created_at DESC
             ->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')
+            //->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)
@@ -1438,7 +1438,7 @@ ORDER BY claim.created_at DESC
             ->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')
+            //->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)
@@ -1452,10 +1452,14 @@ ORDER BY claim.created_at DESC
             ->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', '<', 3000)
+            ->whereRaw('(rm_total_time_in_seconds < 1800 OR (rm_total_time_in_seconds > 1800 AND is_rm_interaction_waived IS TRUE))')
             ->where('number_of_days_with_remote_measurements', '>=', 16 )
             ->count();
 
+        $keyNumbers['careMonthsWith16OrMoreMeasurementDays'] = CareMonth::where('is_bill_closed', false)
+            ->where('number_of_days_with_remote_measurements', '>=', 16 )
+
+            ->count();
 
         return  view('app.practice-management.rm-launch-and-clean', compact('keyNumbers'));
     }

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

@@ -31,6 +31,11 @@
                 <td class="text-nowrap">Care Months Eligible For <b>RM30 HCP + 20 EXTRA IF HAD INTERACTION</b></td>
                 <td class="text-success font-weight-bold text-right">{{$keyNumbers['careMonthsEligibleForBillGeneration_RM30_HCP_PLUS_20_ifHadInteraction']}}</td>
             </tr>
+
+            <tr>
+                <td class="text-nowrap">Care Months With <b>16+ Measurement Days</b></td>
+                <td class="text-success font-weight-bold text-right">{{$keyNumbers['careMonthsWith16OrMoreMeasurementDays']}}</td>
+            </tr>
            
             </tbody>
         </table>