Przeglądaj źródła

RPM admin matrix updates

Vijayakrishnan 3 lat temu
rodzic
commit
1c8c653a58

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

@@ -2152,6 +2152,7 @@ SELECT client.name_first, client.name_last,
        rmmPro.rmm_payment_amount,
        client.mailing_address_state,
        care_month.most_recent_cellular_weight_measurement_at,
+       care_month.days_between_most_recent_mcp_note_date_and_end_of_care_month,
        cpc.plan_type,
        cpc.auto_medicare_is_partbprimary,
        (CASE 
@@ -2160,6 +2161,7 @@ SELECT client.name_first, client.name_last,
        END) as payer_name,
        (SELECT COUNT(*) FROM claim_line where claim_line.cpt = '99454' AND claim_line.claim_id IN (SELECT claim.id FROM claim WHERE claim.care_month_id = care_month.id AND claim.status != 'CANCELLED')) as claim_454,
        (SELECT COUNT(*) FROM claim_line where claim_line.cpt = '99457' AND claim_line.claim_id IN (SELECT claim.id FROM claim WHERE claim.care_month_id = care_month.id AND claim.status != 'CANCELLED')) as claim_457,
+       (SELECT COUNT(*) FROM claim_line where claim_line.cpt = '99458' AND claim_line.claim_id IN (SELECT claim.id FROM claim WHERE claim.care_month_id = care_month.id AND claim.status != 'CANCELLED')) as claim_458,
        {$genericBillIdColumns}
 FROM care_month join client on care_month.client_id = client.id 
     left join note mrnote on client.most_recent_completed_mcp_note_id = mrnote.id

+ 38 - 9
resources/views/app/practice-management/remote-monitoring-row-markup-for-admin.blade.php

@@ -1,3 +1,4 @@
+<?php $lastVisitWithin90Days = !is_null($iPatient->days_between_most_recent_mcp_note_date_and_end_of_care_month) && $iPatient->days_between_most_recent_mcp_note_date_and_end_of_care_month <= 120; ?>
 <tr data-client-uid="{{$iPatient->client_uid}}" data-care-month-uid="{{$iPatient->care_month_uid}}">
     <td>{{ $trIndex + 1 }}</td>
     <td class="pl-2">
@@ -56,7 +57,7 @@
     <td>
         <div class="d-flex align-items-baseline">
             <i class="mr-1 text-sm fa {{$lastVisitWithin90Days ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>
-            <span class="sort-data">{{$daysDiff !== -1 ? $daysDiff : '-'}}</span>
+            <span class="sort-data">{{!is_null($iPatient->days_between_most_recent_mcp_note_date_and_end_of_care_month) ? $iPatient->days_between_most_recent_mcp_note_date_and_end_of_care_month : '-'}}</span>
         </div>
     </td>
 
@@ -93,13 +94,13 @@
         </div>
     </td>
 
-    <td>
-        <div class="d-flex align-items-baseline">
-            <i class="mr-1 text-sm fa {{$iPatient->rm_total_time_in_seconds_by_rmm_pro >= 1200 ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>
-            <span class="text-nowrap">{{round($iPatient->rm_total_time_in_seconds_by_rmm_pro / 60)}}:{{round($iPatient->rm_total_time_in_seconds_by_rmm_pro % 60)}}</span>
-            <span class="sort-data d-none">{{$iPatient->rm_total_time_in_seconds_by_rmm_pro}}</span>
-        </div>
-    </td>
+{{--    <td>--}}
+{{--        <div class="d-flex align-items-baseline">--}}
+{{--            <i class="mr-1 text-sm fa {{$iPatient->rm_total_time_in_seconds_by_rmm_pro >= 1200 ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>--}}
+{{--            <span class="text-nowrap">{{round($iPatient->rm_total_time_in_seconds_by_rmm_pro / 60)}}:{{round($iPatient->rm_total_time_in_seconds_by_rmm_pro % 60)}}</span>--}}
+{{--            <span class="sort-data d-none">{{$iPatient->rm_total_time_in_seconds_by_rmm_pro}}</span>--}}
+{{--        </div>--}}
+{{--    </td>--}}
 
     <td>
         @if($lastVisitWithin90Days && $iPatient->has_mcp_interacted_with_client_about_rm && $iPatient->number_of_days_with_remote_measurements >= 16 && $iPatient->rm_total_time_in_seconds_by_mcp >= 1200)
@@ -114,7 +115,7 @@
         @endif
     </td>
     <td>
-        @if($lastVisitWithin90Days && $iPatient->has_mcp_interacted_with_client_about_rm && $iPatient->number_of_days_with_remote_measurements >= 16 && $iPatient->rm_total_time_in_seconds_by_rmm_pro >= 1200)
+        @if($lastVisitWithin90Days && $iPatient->has_mcp_interacted_with_client_about_rm && $iPatient->number_of_days_with_remote_measurements >= 16)
             <span class="text-success">
                 <i class="fa fa-check text-sm"></i>{{--
                 ${{friendly_money($pro->rmm_payment_amount, 0)}}--}}
@@ -179,4 +180,32 @@
             </span>
         @endif
     </td>
+    <td>
+        <?php
+        $codeStatus = 'No';
+        if($iPatient->number_of_days_with_remote_measurements >= 16 && $iPatient->has_anyone_interacted_with_client_about_rm &&
+            $lastVisitWithin90Days &&
+            ($iPatient->rm_total_time_in_seconds_by_mcp + $iPatient->rm_total_time_in_seconds_by_rmm_pro) >= 2400) {
+            $codeStatus = 'Ready';
+            if($iPatient->claim_458) {
+                $codeStatus = 'Claimed';
+            }
+        }
+        ?>
+        @if($codeStatus === 'No')
+            <span class="text-nowrap text-danger font-weight-normal">
+                {{$codeStatus}}
+            </span>
+        @elseif($codeStatus === 'Ready')
+            <span class="text-nowrap text-dark">
+                <i class="fa fa-thumbs-up text-sm"></i>
+                {{$codeStatus}}
+            </span>
+        @elseif($codeStatus === 'Claimed')
+            <span class="text-nowrap text-success">
+                <i class="fa fa-check text-sm"></i>
+                {{$codeStatus}}
+            </span>
+        @endif
+    </td>
 </tr>

+ 2 - 12
resources/views/app/practice-management/rpm-matrix-for-admin-table.blade.php

@@ -38,27 +38,17 @@
                 <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '<i class="text-sm fa fa-phone rotateh"></i> Any', 'key' => 'has_anyone_interacted_with_client_about_rm'])</th>
                 <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#Meas.<br>Days', 'key' => 'number_of_days_with_remote_measurements'])</th>
                 <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#MCP<br>Mins.', 'key' => 'rm_total_time_in_seconds_by_mcp'])</th>
-                <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#RMM<br>Mins.', 'key' => 'rm_total_time_in_seconds_by_rmm_pro'])</th>
+{{--                <th class="border-0">@include('app.practice-management._sort_header_multi', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#RMM<br>Mins.', 'key' => 'rm_total_time_in_seconds_by_rmm_pro'])</th>--}}
                 <th class="border-0 text-secondary">MCP</th>
                 <th class="border-0 text-secondary">RMM</th>
                 <th class="border-0 text-secondary">454</th>
                 <th class="border-0 text-secondary">457</th>
+                <th class="border-0 text-secondary">458</th>
             </tr>
             </thead>
             <tbody>
             <?php $trIndex = 0; ?>
             @foreach ($patients as $iPatient)
-                <?php
-
-                $daysDiff = -1;
-                if ($iPatient->most_recent_completed_mcp_note_date) {
-                    $careMonthLastDay = date_add(date_create($rcmStartDate), date_interval_create_from_date_string("1 month"));
-                    $careMonthLastDay = date_sub($careMonthLastDay, date_interval_create_from_date_string("1 day"));
-                    $daysDiff = date_diff($careMonthLastDay, date_create($iPatient->most_recent_completed_mcp_note_date))->days;
-                }
-                $lastVisitWithin90Days = ($daysDiff !== -1 && $daysDiff <= 90);
-
-                ?>
                 @include('app.practice-management.remote-monitoring-row-markup-for-admin')
                 <?php $trIndex++; ?>
             @endforeach