Quellcode durchsuchen

RPM admin logic/ui updates

Vijayakrishnan vor 3 Jahren
Ursprung
Commit
f5d0f30374

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

@@ -1845,6 +1845,7 @@ SELECT client.name_first, client.name_last,
        care_month.rm_total_time_in_seconds_by_rmm_pro,
        care_month.number_of_days_with_remote_measurements,
        care_month.has_mcp_interacted_with_client_about_rm,
+       care_month.has_anyone_interacted_with_client_about_rm,
        care_month.rm_num_measurements_not_stamped_by_mcp,
        care_month.rm_num_measurements_not_stamped_by_non_hcp,
        care_month.rm_num_measurements_not_stamped_by_rmm,
@@ -1863,8 +1864,11 @@ SELECT client.name_first, client.name_last,
        care_month.most_recent_cellular_weight_measurement_at,
        mcpPro.mcp_rpm_payment_strategy,
        mcpPro.mcp_rpm_payment_amount,
+       (mcpPro.name_first || ' ' || mcpPro.name_last) as mcp_name,
        rmmPro.rmm_payment_strategy,
        rmmPro.rmm_payment_amount,
+       (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,
        {$genericBillIdColumns}
 FROM care_month join client on care_month.client_id = client.id 
     join note mrnote on client.most_recent_completed_mcp_note_id = mrnote.id

+ 2 - 2
resources/views/app/practice-management/_sort_header.blade.php

@@ -1,6 +1,6 @@
-<div class="d-flex align-items-baseline flex-wrap">
+<div class="d-flex align-items-end flex-wrap">
     <a href="{{ $route }}?{{queryLineExcept(['sort_by', 'sort_dir'])}}&sort_by={{$key}}&sort_dir={{request()->input('sort_by') === $key && request()->input('sort_dir') === 'ASC' ? 'DESC' : 'ASC'}}" class="text-decoration-none">
-        <b class="{{request()->input('sort_by') === $key ? 'text-primary' : 'text-secondary'}}">{{$label}}</b>
+        <b class="{{request()->input('sort_by') === $key ? 'text-primary' : 'text-secondary'}}">{!! $label !!}</b>
         <span class="ml-1 d-inline-flex align-items-baseline">
             <i class="text-sm fa fa-chevron-up {{request()->input('sort_by') === $key && request()->input('sort_dir') === 'DESC' ? '' : 'on-hover-opaque text-secondary'}}"></i>
             <i class="ml-1 text-sm fa fa-chevron-down {{request()->input('sort_by') === $key && request()->input('sort_dir') === 'ASC' ? '' : 'on-hover-opaque text-secondary'}}"></i>

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

@@ -10,7 +10,7 @@
            class="text-nowrap d-block max-width-170px overflow-hidden text-ellipsis"
         ><span class="sort-data">{{ $iPatient->client_name }}</span></a>
     </td>
-
+    <td>{{$iPatient->mcp_name}}</td>
     <td>{{friendly_date($iPatient->dob)}}</td>
     {{--<td>{!! $iPatient->is_enrolled_in_rm === 'YES' ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>--}}
     <td>{!! $iPatient->is_assigned_cellular_bp_device ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
@@ -56,6 +56,13 @@
         </div>
     </td>
 
+    <td>
+        <div class="d-flex align-items-baseline">
+            <i class="mr-1 text-sm fa {{$iPatient->has_anyone_interacted_with_client_about_rm ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>
+            <span class="sort-data">{{$iPatient->has_anyone_interacted_with_client_about_rm ? 'Yes' : 'No'}}</span>
+        </div>
+    </td>
+
     <td>
         <div class="d-flex align-items-baseline">
             <i class="mr-1 text-sm fa {{$iPatient->number_of_days_with_remote_measurements >= 16 ? 'fa-check text-success' : 'fa-exclamation-triangle text-danger on-hover-opaque'}}"></i>
@@ -89,8 +96,8 @@
 
     <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)
-            <span class="text-success font-weight-bold">
-                <i class="fa fa-check"></i>
+            <span class="text-success">
+                <i class="fa fa-check text-sm"></i>
                 ${{friendly_money($pro->mcp_rpm_payment_amount, 0)}}
             </span>
         @else
@@ -101,8 +108,8 @@
     </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)
-            <span class="text-success font-weight-bold">
-                <i class="fa fa-check"></i>
+            <span class="text-success">
+                <i class="fa fa-check text-sm"></i>
                 ${{friendly_money($pro->rmm_payment_amount, 0)}}
             </span>
         @else
@@ -111,4 +118,58 @@
             </span>
         @endif
     </td>
+    <td>
+        <?php
+        $codeStatus = 'No';
+        if($iPatient->number_of_days_with_remote_measurements >= 16 && $lastVisitWithin90Days) {
+            $codeStatus = 'Ready';
+            if($iPatient->claim_454) {
+                $codeStatus = 'Billed';
+            }
+        }
+        ?>
+        @if($codeStatus === 'No')
+            <span class="text-danger font-weight-normal">
+                {{$codeStatus}}
+            </span>
+        @elseif($codeStatus === 'Ready')
+            <span class="text-dark">
+                <i class="fa fa-thumbs-up text-sm"></i>
+                {{$codeStatus}}
+            </span>
+        @elseif($codeStatus === 'Billed')
+            <span class="text-success">
+                <i class="fa fa-check text-sm"></i>
+                {{$codeStatus}}
+            </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) >= 1200) {
+            $codeStatus = 'Ready';
+            if($iPatient->claim_457) {
+                $codeStatus = 'Billed';
+            }
+        }
+        ?>
+        @if($codeStatus === 'No')
+            <span class="text-danger font-weight-normal">
+                {{$codeStatus}}
+            </span>
+        @elseif($codeStatus === 'Ready')
+            <span class="text-dark">
+                <i class="fa fa-thumbs-up text-sm"></i>
+                {{$codeStatus}}
+            </span>
+        @elseif($codeStatus === 'Billed')
+            <span class="text-success">
+                <i class="fa fa-check text-sm"></i>
+                {{$codeStatus}}
+            </span>
+        @endif
+    </td>
 </tr>

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

@@ -17,29 +17,25 @@
             <tr>
 
                 <th class="border-0 pl-2">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Name', 'key' => 'client_name'])</th>
+                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'CM MCP', 'key' => 'mcp_name'])</th>
                 <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'DOB', 'key' => 'dob'])</th>
                 {{--<th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'RPM?', 'key' => 'is_enrolled_in_rm'])</th>--}}
                 <th class="border-0 text-secondary">BP?</th>
                 <th class="border-0 text-secondary">Scale?</th>
                 <th class="border-0 text-secondary">Latest BP</th>
                 <th class="border-0 text-secondary">Latest Wt</th>
-                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Days Since Last Visit', 'key' => 'most_recent_completed_mcp_note_date'])</th>
-                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Comm?', 'key' => 'has_mcp_interacted_with_client_about_rm'])</th>
-                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#Meas. Days', 'key' => 'number_of_days_with_remote_measurements'])</th>
-                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#MCP Unst.', 'key' => 'rm_num_measurements_not_stamped_by_mcp'])</th>
-                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#RMM Unst.', 'key' => 'rm_num_measurements_not_stamped_by_rmm'])</th>
-                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#MCP Mins.', 'key' => 'rm_total_time_in_seconds_by_mcp'])</th>
-                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#RMM Mins.', 'key' => 'rm_total_time_in_seconds_by_rmm_pro'])</th>
-                @if(!request()->input('f_mcp_billable') || request()->input('f_mcp_billable') === 'all')
-                    <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'MCP Bill', 'key' => 'mcp_rm_generic_bill_id'])</th>
-                @else
-                    <th class="border-0 text-secondary">MCP Bill</th>
-                @endif
-                @if(!request()->input('f_rmm_billable') || request()->input('f_rmm_billable') === 'all')
-                    <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'RMM Bill', 'key' => 'rmm_rm_generic_bill_id'])</th>
-                @else
-                    <th class="border-0 text-secondary">RMM Bill</th>
-                @endif
+                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Days Since<br>Last Visit', 'key' => 'most_recent_completed_mcp_note_date'])</th>
+                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'MCP<br>Comm?', 'key' => 'has_mcp_interacted_with_client_about_rm'])</th>
+                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Any<br>Comm?', 'key' => 'has_anyone_interacted_with_client_about_rm'])</th>
+                <th class="border-0">@include('app.practice-management._sort_header', ['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', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#MCP<br>Unst.', 'key' => 'rm_num_measurements_not_stamped_by_mcp'])</th>
+                <th class="border-0">@include('app.practice-management._sort_header', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '#RMM<br>Unst.', 'key' => 'rm_num_measurements_not_stamped_by_rmm'])</th>
+                <th class="border-0">@include('app.practice-management._sort_header', ['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', ['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>
             </tr>
             </thead>
             <tbody>

+ 1 - 1
resources/views/app/practice-management/rpm-matrix-for-admin.blade.php

@@ -149,7 +149,7 @@
                         </div>
 
                         <div>
-                            <label class="mb-0 text-sm {{request()->input('f_lmb') && request()->input('f_lmb') !== 'ACTIVE' ? 'font-weight-bold text-info' : 'text-secondary'}}">LMB</label>
+                            <label class="mb-0 text-sm {{request()->input('f_lmb') && request()->input('f_lmb') !== 'any' ? 'font-weight-bold text-info' : 'text-secondary'}}">LMB</label>
                             <select name="f_lmb" class="mr-2 form-control form-control-sm min-width-unset width-70px pl-0">
                                 <option {{request()->input('f_lmb') === 'any' ? 'selected' : ''}} value="any">Any</option>
                                 <option {{request()->input('f_lmb') === '1' ? 'selected' : ''}} value="1">1 day</option>

+ 3 - 4
routes/web.php

@@ -340,7 +340,10 @@ Route::middleware('pro.auth')->group(function () {
             Route::get('generic-bills', 'PracticeManagementController@genericBills')->name('generic-bills');
             Route::get('mc-code-checks', 'PracticeManagementController@mcCodeChecks')->name('mc-code-checks');
 
+            Route::get('remote-monitoring-admin', 'PracticeManagementController@remoteMonitoringAdmin')->name('remote-monitoring-admin');
+            Route::get('remote-monitoring-admin-count', 'PracticeManagementController@remoteMonitoringAdminCount')->name('remote-monitoring-admin-count');
 
+            Route::get('rpm-admin', 'PracticeManagementController@rpmMatrixForAdmin')->name('rpm-matrix-admin');
         });
 
         Route::get('supply-orders/cancelled-but-unacknowledged', 'PracticeManagementController@supplyOrdersCancelledButUnacknowledged')->name('supply-orders-cancelled-but-unacknowledged');
@@ -349,13 +352,9 @@ Route::middleware('pro.auth')->group(function () {
         Route::get('remote-monitoring', 'PracticeManagementController@remoteMonitoring')->name('remote-monitoring');
         Route::get('remote-monitoring-count', 'PracticeManagementController@remoteMonitoringCount')->name('remote-monitoring-count');
 
-        Route::get('remote-monitoring-admin', 'PracticeManagementController@remoteMonitoringAdmin')->name('remote-monitoring-admin');
-        Route::get('remote-monitoring-admin-count', 'PracticeManagementController@remoteMonitoringAdminCount')->name('remote-monitoring-admin-count');
-
         Route::get('rpm-mcp', 'PracticeManagementController@remoteMonitoringMCP')->name('rpm-matrix-mcp');
         Route::get('rpm-rmm', 'PracticeManagementController@remoteMonitoringRMM')->name('rpm-matrix-rmm');
         Route::get('rpm-rme', 'PracticeManagementController@remoteMonitoringRME')->name('rpm-matrix-rme');
-        Route::get('rpm-admin', 'PracticeManagementController@rpmMatrixForAdmin')->name('rpm-matrix-admin');
 
 
         //stat tree stuff