Browse Source

RPM manager - combined into index

Vijayakrishnan 2 years ago
parent
commit
152d43ac90

+ 368 - 1
resources/views/app/practice-management/rpm-manager/index.blade.php

@@ -78,7 +78,373 @@
                         </div>
                     @endif
                 </div>
-                @include('app.practice-management.rpm-manager.table', compact('viewingAs'))
+                <div class="d-flex align-items-stretch m-0 h-100">
+                    <div class="flex-grow-1 px-0 overflow-auto h-100 rpm-matrix-right-column">
+                        <table class="table table-sm table-bordered table-striped table-hover p-0 m-0 min-width-1100px border-0" id="table-rm-matrix">
+                            <thead class="bg-light">
+                            <tr>
+                                <th class="border-top-0 border-bottom-0 border-left-0"></th>
+                                <th class="border-top-0 border-bottom-0"></th>
+                                <th class="border-top-0 border-bottom-0"></th>
+                                <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
+                                <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
+                                <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
+                                <th class="border-top-0 border-bottom-0 bg-aliceblue text-nowrap" colspan="3"># Meas. Days</th>
+                                <th class="border-top-0 border-bottom-0"></th>
+                                <th class="border-top-0 border-bottom-0"></th>
+                                @if($viewingAs !== 'RME')
+                                    <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="2">Entries</th>
+                                @endif
+                                <th class="border-top-0 border-bottom-0"></th>
+                                @if($viewingAs !== 'RME')
+                                    <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="{{$viewingAs === 'ADMIN' ? 3 : 1}}">Time</th>
+                                @endif
+                                <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="{{$viewingAs === 'ADMIN' ? 3 : 1}}">Reimbursement</th>
+                                @if($viewingAs === 'ADMIN')
+                                    <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="3">Claim</th>
+                                @endif
+                                <th class="border-top-0 border-bottom-0"></th>
+                                <th class="border-top-0 border-bottom-0 border-right-0"></th>
+                            </tr>
+                            <tr>
+                                <th class="border-bottom-0 border-top border-left-0">Name</th>
+                                <th class="border-bottom-0 border-top">DOB</th>
+                                <th class="border-bottom-0 border-top">MCP</th>
+                                <th class="border-bottom-0 border-top">RMM</th>
+                                <th class="border-bottom-0 border-top">RME</th>
+                                <th class="border-bottom-0 border-top">DSLV</th>
+
+                                <!--# Meas. Days-->
+                                <th class="border-bottom-0 border-top">All</th>
+                                <th class="border-bottom-0 border-top">BP</th>
+                                <th class="border-bottom-0 border-top">WT</th>
+
+                                <th class="border-bottom-0 border-top">BP</th>
+                                <th class="border-bottom-0 border-top">WT</th>
+
+                                @if($viewingAs !== 'RME')
+                                    <th class="border-bottom-0 border-top">Mine</th>
+                                    <th class="border-bottom-0 border-top">Others</th>
+                                @endif
+
+                                <th class="border-bottom-0 border-top">Comm.</th>
+
+                                <!--Time-->
+                                @if($viewingAs !== 'RME')
+                                    @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
+                                        <th class="border-bottom-0 border-top">MCP</th>
+                                    @endif
+                                    @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
+                                        <th class="border-bottom-0 border-top">RMM</th>
+                                    @endif
+                                    @if($viewingAs === 'ADMIN')
+                                        <th class="border-bottom-0 border-top">Total</th>
+                                    @endif
+                                @endif
+
+                                <!--Reimb.-->
+                                @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
+                                    <th class="border-bottom-0 border-top">MCP</th>
+                                @endif
+                                @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
+                                    <th class="border-bottom-0 border-top">RMM</th>
+                                @endif
+                                @if($viewingAs === 'ADMIN' || $viewingAs === 'RME')
+                                    <th class="border-bottom-0 border-top">RME</th>
+                                @endif
+
+                                <!--Claim-->
+                                @if($viewingAs === 'ADMIN')
+                                    <th class="border-bottom-0 border-top">454</th>
+                                    <th class="border-bottom-0 border-top">457</th>
+                                    <th class="border-bottom-0 border-top">458</th>
+                                @endif
+
+                                <th class="border-bottom-0 border-top">Next</th>
+                                <th class="border-bottom-0 border-top border-right-0"></th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <?php
+                            $daysRemaining = date('t') - date('j');
+                            ?>
+                            @foreach ($patients as $iPatient)
+                                <tr data-client-uid="{{$iPatient->client_uid}}" data-care-month-uid="{{$iPatient->care_month_uid}}">
+
+                                    <td class="border-left-0">
+                                        <a href="/mc/patients/view/{{ $iPatient->client_uid }}"
+                                           native target="_blank"
+                                           class="text-nowrap d-block max-width-170px overflow-hidden text-ellipsis"
+                                        >{{ $iPatient->client_name }}</a>
+                                    </td>
+                                    <td><span class="text-nowrap">{{$iPatient->dob}}</span></td>
+                                    <td class="rmgr-name-column"><div class="rmgr-name-element" title="{{$iPatient->mcp_name ?: ''}}">{{$iPatient->mcp_name ?: '-'}}</div></td>
+                                    <td class="rmgr-name-column"><div class="rmgr-name-element" title="{{$iPatient->rmm_name ?: ''}}">{{$iPatient->rmm_name ?: '-'}}</div></td>
+                                    <td class="rmgr-name-column"><div class="rmgr-name-element" title="{{$iPatient->rme_name ?: ''}}">{{$iPatient->rme_name ?: '-'}}</div></td>
+                                    <td>{{$iPatient->days_between_most_recent_mcp_note_date_and_end_of_care_month}}</td>
+
+                                    <!--# Meas. Days-->
+                                    <td>
+                                        <?php
+                                        $icon = '';
+                                        $label = '';
+                                        if($iPatient->number_of_days_with_remote_measurements>=16) {
+                                            $icon = '<i class="ml-1 fa fa-check text-success opacity-35"></i>';
+                                        }
+                                        else {
+                                            if(intval(date('m')) === intval(request()->input('m')) || !request()->input('m')) {
+                                                if($daysRemaining < 16 - $iPatient->number_of_days_with_remote_measurements) {
+                                                    $icon = '<i class="ml-1 fas fa-ban text-secondary opacity-35"></i>';
+                                                    $label = 'Not possible. Not enough days left to reach 16.';
+                                                }
+                                                elseif($daysRemaining > 16 - $iPatient->number_of_days_with_remote_measurements) {
+                                                    $icon = '<i class="ml-1 fa fa-bolt text-primary"></i>';
+                                                    $label = 'Possible. Ensure ' . (16 - $iPatient->number_of_days_with_remote_measurements) . ' days with measurements before the end of the month.';
+                                                }
+                                                elseif($daysRemaining === 16 - $iPatient->number_of_days_with_remote_measurements) {
+                                                    $icon = '<i class="ml-1 fa fa-exclamation-triangle text-danger"></i>';
+                                                    $label = 'Possible. Ensure a measurement every day for the rest of the month.';
+                                                }
+                                            }
+                                            else {
+                                                $icon = '<i class="ml-1 fas fa-ban text-secondary opacity-35"></i>';
+                                                $label = 'Not possible. Past month.';
+                                            }
+                                        }
+                                        ?>
+                                        <div class="d-flex align-items-baseline flex-nowrap" title="{{$label}}">
+                                            <?php $iPatient->number_of_days_with_remote_measurements = $iPatient->number_of_days_with_remote_measurements ?: 0; ?>
+                                            <span>{{$iPatient->number_of_days_with_remote_measurements}}</span>
+                                            {!! $icon !!}
+                                        </div>
+                                    </td>
+                                    <td>{{$iPatient->number_of_days_with_remote_bp_measurements}}</td>
+                                    <td>{{$iPatient->number_of_days_with_remote_weight_measurements}}</td>
+
+                                    <td class="text-nowrap">
+                                        @if(!$iPatient->has_cellular_bp_device)
+                                            @if($iPatient->has_cellular_bp_meter_been_ordered)
+                                                <span class="text-info">Ordered</span>
+                                            @else
+                                                <span class="text-warning-dark">Not Ordered</span>
+                                            @endif
+                                        @else
+                                            @if($iPatient->most_recent_cellular_bp_sbp_mm_hg && $iPatient->most_recent_cellular_bp_dbp_mm_hg)
+                                                <div class="text-nowrap d-flex align-items-baseline flex-nowrap">
+                                                    <span class="sort-data">{{$iPatient->most_recent_cellular_bp_sbp_mm_hg}}</span>/{{$iPatient->most_recent_cellular_bp_dbp_mm_hg}}
+                                                    @if($iPatient->most_recent_cellular_bp_measurement_at)
+                                                        <span class="text-sm text-secondary text-nowrap ml-1"
+                                                              title="{{friendly_date_time($iPatient->most_recent_cellular_bp_measurement_at)}}">{{friendly_date_est_compact($iPatient->most_recent_cellular_bp_measurement_at)}}</span>
+                                                    @endif
+                                                    <span class="mx-1 text-secondary text-sm">|</span>
+                                                    <a href="#">All</a>
+                                                </div>
+                                            @else
+                                                <span class="text-danger opacity-60">Not used yet</span>
+                                            @endif
+                                        @endif
+                                    </td>
+                                    <td class="text-nowrap">
+                                        @if(!$iPatient->has_cellular_bp_device)
+                                            @if($iPatient->has_cellular_bp_meter_been_ordered)
+                                                <span class="text-info">Ordered</span>
+                                            @else
+                                                <span class="text-warning-dark">Not Ordered</span>
+                                            @endif
+                                        @else
+                                            @if($iPatient->most_recent_cellular_weight_value)
+                                                <div class="text-nowrap">
+                                                    <span class="sort-data">{{round($iPatient->most_recent_cellular_weight_value, 1)}}</span>
+                                                    @if($iPatient->most_recent_cellular_weight_measurement_at)
+                                                        <span class="text-sm text-secondary text-nowrap"
+                                                              title="{{friendly_date_time($iPatient->most_recent_cellular_weight_measurement_at)}}">{{friendly_date_est_compact($iPatient->most_recent_cellular_weight_measurement_at)}}</span>
+                                                    @endif
+                                                    <span class="mx-1 text-secondary text-sm">|</span>
+                                                    <a href="#" class="btn-measurements-popup"
+                                                       data-uid="{{$iPatient->care_month_uid}}">All</a>
+                                                </div>
+                                            @else
+                                                <span class="text-danger opacity-60">Not used yet</span>
+                                            @endif
+                                        @endif
+                                    </td>
+
+                                    @if($viewingAs !== 'RME')
+                                        <td>my entries</td>
+                                        <td>other entries</td>
+                                    @endif
+
+                                    <td>
+                                        @if($viewingAs === 'ADMIN')
+                                            <div class="d-flex align-items-baseline flex-nowrap">
+                                                <i class="fa fa-circle text-sm opacity-35 {{$iPatient->has_mcp_interacted_with_client_about_rm ? 'text-success' : 'text-danger'}}"></i>
+                                                <span class="ml-1 mr-2 text-sm">MCP</span>
+                                                <i class="fa fa-circle text-sm opacity-35 {{$iPatient->has_rmm_interacted_with_client_about_rm ? 'text-success' : 'text-danger'}}"></i>
+                                                <span class="ml-1 mr-2 text-sm">RMM</span>
+                                                <i class="fa fa-circle text-sm opacity-35 {{$iPatient->has_admin_interacted_with_client_about_rm ? 'text-success' : 'text-danger'}}"></i>
+                                                <span class="ml-1 mr-2 text-sm">Admin</span>
+                                            </div>
+                                        @elseif($viewingAs === 'MCP')
+                                            <div class="d-flex align-items-baseline flex-nowrap">
+                                                <i class="fa fa-circle text-sm opacity-35 {{$iPatient->has_mcp_interacted_with_client_about_rm ? 'text-success' : 'text-danger'}}"></i>
+                                                <span class="ml-1 mr-2 text-sm">Yes</span>
+                                            </div>
+                                        @elseif($viewingAs === 'RMM')
+                                            <div class="d-flex align-items-baseline flex-nowrap">
+                                                <i class="fa fa-circle text-sm opacity-35 {{$iPatient->has_mcp_interacted_with_client_about_rm ? 'text-success' : 'text-danger'}}"></i>
+                                                <span class="ml-1 mr-2 text-sm">Yes</span>
+                                            </div>
+                                        @endif
+                                    </td>
+
+                                    <!--Time-->
+                                    @if($viewingAs !== 'RME')
+                                        @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
+                                            <td>
+                                                <div class="d-flex align-items-baseline">
+                                                    <i class="mr-1 text-sm fa fa-circle opacity-35 {{$iPatient->rm_total_time_in_seconds_by_mcp >= 1200 ? 'text-success' : 'text-danger'}}"></i>
+                                                    <span class="text-nowrap">{{round($iPatient->rm_total_time_in_seconds_by_mcp / 60)}}:{{round($iPatient->rm_total_time_in_seconds_by_mcp % 60)}}</span>
+                                                    <span class="sort-data d-none">{{$iPatient->rm_total_time_in_seconds_by_mcp}}</span>
+                                                </div>
+                                            </td>
+                                        @endif
+                                        @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
+                                            <td>
+                                                <div class="d-flex align-items-baseline">
+                                                    <i class="mr-1 text-sm fa fa-circle opacity-35 {{$iPatient->rm_total_time_in_seconds_by_rmm_pro >= 1200 ? 'text-success' : 'text-danger'}}"></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>
+                                        @endif
+                                        @if($viewingAs === 'ADMIN')
+                                            <td>
+                                                <div class="d-flex align-items-baseline">
+                                                    <i class="mr-1 text-sm fa fa-circle opacity-35 {{$iPatient->rm_total_time_in_seconds >= 1200 ? 'text-success' : 'text-danger'}}"></i>
+                                                    <span class="text-nowrap">{{round($iPatient->rm_total_time_in_seconds / 60)}}:{{round($iPatient->rm_total_time_in_seconds % 60)}}</span>
+                                                    <span class="sort-data d-none">{{$iPatient->rm_total_time_in_seconds}}</span>
+                                                </div>
+                                            </td>
+                                        @endif
+                                    @endif
+
+                                    <!--Reimb.-->
+                                    @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
+                                        <td>
+                                            @if($iPatient->is_billable_by_mcp)
+                                                @if($iPatient->is_billed_by_mcp)
+                                                    Billed
+                                                @else
+                                                    Billable
+                                                @endif
+                                            @else
+                                                Not Billable
+                                            @endif
+                                        </td>
+                                    @endif
+                                    @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
+                                        <td>
+                                            @if($iPatient->is_billable_by_rmm)
+                                                @if($iPatient->is_billed_by_rmm)
+                                                    Billed
+                                                @else
+                                                    Billable
+                                                @endif
+                                            @else
+                                                Not Billable
+                                            @endif
+                                        </td>
+                                    @endif
+                                    @if($viewingAs === 'ADMIN' || $viewingAs === 'RME')
+                                        <td>
+                                            @if($iPatient->is_billable_by_rme)
+                                                @if($iPatient->is_billed_by_rme)
+                                                    Billed
+                                                @else
+                                                    Billable
+                                                @endif
+                                            @else
+                                                Not Billable
+                                            @endif
+                                        </td>
+                                    @endif
+
+                                    <!--Claim-->
+                                    @if($viewingAs === 'ADMIN')
+                                        <td>
+                                            @if($iPatient->is_99454_claiming_waived)
+                                                <span title="{{$iPatient->why_claiming_99454_waived ?: ''}}">Waived</span>
+                                            @else
+                                                @if($iPatient->is_99454_claimable)
+                                                    @if($iPatient->is_99454_claimed)
+                                                        Claimed
+                                                    @else
+                                                        Claimable
+                                                    @endif
+                                                @else
+                                                    <span title="{{$iPatient->why_99454_not_claimable_reason ?: ''}}"></span>Not Claimable
+                                                @endif
+                                            @endif
+                                        </td>
+                                        <td>
+                                            @if($iPatient->is_99457_claiming_waived)
+                                                <span title="{{$iPatient->why_claiming_99457_waived ?: ''}}">Waived</span>
+                                            @else
+                                                @if($iPatient->is_99457_claimable)
+                                                    @if($iPatient->is_99457_claimed)
+                                                        Claimed
+                                                    @else
+                                                        Claimable
+                                                    @endif
+                                                @else
+                                                    <span title="{{$iPatient->why_99457_not_claimable_reason ?: ''}}"></span>Not Claimable
+                                                @endif
+                                            @endif
+                                        </td>
+                                        <td>
+                                            @if($iPatient->is_99458_claiming_waived)
+                                                <span title="{{$iPatient->why_claiming_99458_waived ?: ''}}">Waived</span>
+                                            @else
+                                                @if($iPatient->is_99458_claimable)
+                                                    @if($iPatient->is_99458_claimed)
+                                                        Claimed
+                                                    @else
+                                                        Claimable
+                                                    @endif
+                                                @else
+                                                    <span title="{{$iPatient->why_99458_not_claimable_reason ?: ''}}"></span>Not Claimable
+                                                @endif
+                                            @endif
+                                        </td>
+                                    @endif
+
+                                    <td><span class="text-nowrap">{{$iPatient->next_visit_date ?: '-'}}</span></td>
+
+                                    <td class="border-right-0"></td>
+
+                                </tr>
+
+                            @endforeach
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="stag-popup tall overflow-visible dynamic-popup draggable resizable mcp-theme-1"
+             stag-popup-key="rpm-manager-measurements-popup">
+            <div class="stag-popup-content p-0">
+                <h3 class="stag-popup-title mb-0 mt-3 mx-3 pb-0 border-bottom-0">
+                    <span class="rpm-manager-measurements-popup-title">xxx</span>
+                    <a href="#" class="ml-auto text-secondary" onclick="return closeStagPopup()">
+                        <i class="fa fa-times-circle"></i>
+                    </a>
+                </h3>
+                <div class="stag-popup-content-inner">
+                    <div class="popup-content-container">
+                        Hello
+                    </div>
+                </div>
             </div>
         </div>
     </div>
@@ -88,6 +454,7 @@
             function init() {
                 let parent = $('#practice-rpm-manager');
 
+                // showStagPopup('rpm-manager-measurements-popup');
                 // TODO:
             }
 

+ 0 - 254
resources/views/app/practice-management/rpm-manager/row.blade.php

@@ -1,254 +0,0 @@
-<?php $lastVisitWithinDays = !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 class="border-left-0">
-        <a href="/mc/patients/view/{{ $iPatient->client_uid }}"
-           native target="_blank"
-           class="text-nowrap d-block max-width-170px overflow-hidden text-ellipsis"
-        >{{ $iPatient->client_name }}</a>
-    </td>
-    <td><span class="text-nowrap">{{$iPatient->dob}}</span></td>
-    <td class="rmgr-name-column"><div class="rmgr-name-element" title="{{$iPatient->mcp_name ?: ''}}">{{$iPatient->mcp_name ?: '-'}}</div></td>
-    <td class="rmgr-name-column"><div class="rmgr-name-element" title="{{$iPatient->rmm_name ?: ''}}">{{$iPatient->rmm_name ?: '-'}}</div></td>
-    <td class="rmgr-name-column"><div class="rmgr-name-element" title="{{$iPatient->rme_name ?: ''}}">{{$iPatient->rme_name ?: '-'}}</div></td>
-    <td>{{$iPatient->days_between_most_recent_mcp_note_date_and_end_of_care_month}}</td>
-
-    <!--# Meas. Days-->
-    <td>
-        <?php
-        $icon = '';
-        $label = '';
-        if($iPatient->number_of_days_with_remote_measurements>=16) {
-            $icon = '<i class="ml-1 fa fa-check text-success opacity-35"></i>';
-        }
-        else {
-            if(intval(date('m')) === intval(request()->input('m')) || !request()->input('m')) {
-                if($daysRemaining < 16 - $iPatient->number_of_days_with_remote_measurements) {
-                    $icon = '<i class="ml-1 fas fa-ban text-secondary opacity-35"></i>';
-                    $label = 'Not possible. Not enough days left to reach 16.';
-                }
-                elseif($daysRemaining > 16 - $iPatient->number_of_days_with_remote_measurements) {
-                    $icon = '<i class="ml-1 fa fa-bolt text-primary"></i>';
-                    $label = 'Possible. Ensure ' . (16 - $iPatient->number_of_days_with_remote_measurements) . ' days with measurements before the end of the month.';
-                }
-                elseif($daysRemaining === 16 - $iPatient->number_of_days_with_remote_measurements) {
-                    $icon = '<i class="ml-1 fa fa-exclamation-triangle text-danger"></i>';
-                    $label = 'Possible. Ensure a measurement every day for the rest of the month.';
-                }
-            }
-            else {
-                $icon = '<i class="ml-1 fas fa-ban text-secondary opacity-35"></i>';
-                $label = 'Not possible. Past month.';
-            }
-        }
-        ?>
-        <div class="d-flex align-items-baseline flex-nowrap" title="{{$label}}">
-            <?php $iPatient->number_of_days_with_remote_measurements = $iPatient->number_of_days_with_remote_measurements ?: 0; ?>
-            <span>{{$iPatient->number_of_days_with_remote_measurements}}</span>
-            {!! $icon !!}
-        </div>
-    </td>
-    <td>{{$iPatient->number_of_days_with_remote_bp_measurements}}</td>
-    <td>{{$iPatient->number_of_days_with_remote_weight_measurements}}</td>
-
-    <td class="text-nowrap">
-        @if(!$iPatient->has_cellular_bp_device)
-            @if($iPatient->has_cellular_bp_meter_been_ordered)
-                <span class="text-info">Ordered</span>
-            @else
-                <span class="text-warning-dark">Not Ordered</span>
-            @endif
-        @else
-            @if($iPatient->most_recent_cellular_bp_sbp_mm_hg && $iPatient->most_recent_cellular_bp_dbp_mm_hg)
-                <div class="text-nowrap d-flex align-items-baseline flex-nowrap">
-                    <span class="sort-data">{{$iPatient->most_recent_cellular_bp_sbp_mm_hg}}</span>/{{$iPatient->most_recent_cellular_bp_dbp_mm_hg}}
-                    @if($iPatient->most_recent_cellular_bp_measurement_at)
-                        <span class="text-sm text-secondary text-nowrap ml-1"
-                              title="{{friendly_date_time($iPatient->most_recent_cellular_bp_measurement_at)}}">{{friendly_date_est_compact($iPatient->most_recent_cellular_bp_measurement_at)}}</span>
-                    @endif
-                    <span class="mx-1 text-secondary text-sm">|</span>
-                    <a href="#">All</a>
-                </div>
-            @else
-                <span class="text-danger opacity-60">Not used yet</span>
-            @endif
-        @endif
-    </td>
-    <td class="text-nowrap">
-        @if(!$iPatient->has_cellular_bp_device)
-            @if($iPatient->has_cellular_bp_meter_been_ordered)
-                <span class="text-info">Ordered</span>
-            @else
-                <span class="text-warning-dark">Not Ordered</span>
-            @endif
-        @else
-            @if($iPatient->most_recent_cellular_weight_value)
-                <div class="text-nowrap">
-                    <span class="sort-data">{{round($iPatient->most_recent_cellular_weight_value, 1)}}</span>
-                    @if($iPatient->most_recent_cellular_weight_measurement_at)
-                        <span class="text-sm text-secondary text-nowrap"
-                              title="{{friendly_date_time($iPatient->most_recent_cellular_weight_measurement_at)}}">{{friendly_date_est_compact($iPatient->most_recent_cellular_weight_measurement_at)}}</span>
-                    @endif
-                    <span class="mx-1 text-secondary text-sm">|</span>
-                    <a href="#">All</a>
-                </div>
-            @else
-                <span class="text-danger opacity-60">Not used yet</span>
-            @endif
-        @endif
-    </td>
-
-    @if($viewingAs !== 'RME')
-        <td>my entries</td>
-        <td>other entries</td>
-    @endif
-
-    <td>
-        @if($viewingAs === 'ADMIN')
-            <div class="d-flex align-items-baseline flex-nowrap">
-                <i class="fa fa-circle text-sm opacity-35 {{$iPatient->has_mcp_interacted_with_client_about_rm ? 'text-success' : 'text-danger'}}"></i>
-                <span class="ml-1 mr-2 text-sm">MCP</span>
-                <i class="fa fa-circle text-sm opacity-35 {{$iPatient->has_rmm_interacted_with_client_about_rm ? 'text-success' : 'text-danger'}}"></i>
-                <span class="ml-1 mr-2 text-sm">RMM</span>
-                <i class="fa fa-circle text-sm opacity-35 {{$iPatient->has_admin_interacted_with_client_about_rm ? 'text-success' : 'text-danger'}}"></i>
-                <span class="ml-1 mr-2 text-sm">Admin</span>
-            </div>
-        @elseif($viewingAs === 'MCP')
-            <div class="d-flex align-items-baseline flex-nowrap">
-                <i class="fa fa-circle text-sm opacity-35 {{$iPatient->has_mcp_interacted_with_client_about_rm ? 'text-success' : 'text-danger'}}"></i>
-                <span class="ml-1 mr-2 text-sm">Yes</span>
-            </div>
-        @elseif($viewingAs === 'RMM')
-            <div class="d-flex align-items-baseline flex-nowrap">
-                <i class="fa fa-circle text-sm opacity-35 {{$iPatient->has_mcp_interacted_with_client_about_rm ? 'text-success' : 'text-danger'}}"></i>
-                <span class="ml-1 mr-2 text-sm">Yes</span>
-            </div>
-        @endif
-    </td>
-
-    <!--Time-->
-    @if($viewingAs !== 'RME')
-        @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
-            <td>
-                <div class="d-flex align-items-baseline">
-                    <i class="mr-1 text-sm fa fa-circle opacity-35 {{$iPatient->rm_total_time_in_seconds_by_mcp >= 1200 ? 'text-success' : 'text-danger'}}"></i>
-                    <span class="text-nowrap">{{round($iPatient->rm_total_time_in_seconds_by_mcp / 60)}}:{{round($iPatient->rm_total_time_in_seconds_by_mcp % 60)}}</span>
-                    <span class="sort-data d-none">{{$iPatient->rm_total_time_in_seconds_by_mcp}}</span>
-                </div>
-            </td>
-        @endif
-        @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
-            <td>
-                <div class="d-flex align-items-baseline">
-                    <i class="mr-1 text-sm fa fa-circle opacity-35 {{$iPatient->rm_total_time_in_seconds_by_rmm_pro >= 1200 ? 'text-success' : 'text-danger'}}"></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>
-        @endif
-        @if($viewingAs === 'ADMIN')
-            <td>
-                <div class="d-flex align-items-baseline">
-                    <i class="mr-1 text-sm fa fa-circle opacity-35 {{$iPatient->rm_total_time_in_seconds >= 1200 ? 'text-success' : 'text-danger'}}"></i>
-                    <span class="text-nowrap">{{round($iPatient->rm_total_time_in_seconds / 60)}}:{{round($iPatient->rm_total_time_in_seconds % 60)}}</span>
-                    <span class="sort-data d-none">{{$iPatient->rm_total_time_in_seconds}}</span>
-                </div>
-            </td>
-        @endif
-    @endif
-
-    <!--Reimb.-->
-    @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
-        <td>
-            @if($iPatient->is_billable_by_mcp)
-                @if($iPatient->is_billed_by_mcp)
-                    Billed
-                @else
-                    Billable
-                @endif
-            @else
-                Not Billable
-            @endif
-        </td>
-    @endif
-    @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
-        <td>
-            @if($iPatient->is_billable_by_rmm)
-                @if($iPatient->is_billed_by_rmm)
-                    Billed
-                @else
-                    Billable
-                @endif
-            @else
-                Not Billable
-            @endif
-        </td>
-    @endif
-    @if($viewingAs === 'ADMIN' || $viewingAs === 'RME')
-        <td>
-            @if($iPatient->is_billable_by_rme)
-                @if($iPatient->is_billed_by_rme)
-                    Billed
-                @else
-                    Billable
-                @endif
-            @else
-                Not Billable
-            @endif
-        </td>
-    @endif
-
-    <!--Claim-->
-    @if($viewingAs === 'ADMIN')
-        <td>
-            @if($iPatient->is_99454_claiming_waived)
-                <span title="{{$iPatient->why_claiming_99454_waived ?: ''}}">Waived</span>
-            @else
-                @if($iPatient->is_99454_claimable)
-                    @if($iPatient->is_99454_claimed)
-                        Claimed
-                    @else
-                        Claimable
-                    @endif
-                @else
-                    <span title="{{$iPatient->why_99454_not_claimable_reason ?: ''}}"></span>Not Claimable
-                @endif
-            @endif
-        </td>
-        <td>
-            @if($iPatient->is_99457_claiming_waived)
-                <span title="{{$iPatient->why_claiming_99457_waived ?: ''}}">Waived</span>
-            @else
-                @if($iPatient->is_99457_claimable)
-                    @if($iPatient->is_99457_claimed)
-                        Claimed
-                    @else
-                        Claimable
-                    @endif
-                @else
-                    <span title="{{$iPatient->why_99457_not_claimable_reason ?: ''}}"></span>Not Claimable
-                @endif
-            @endif
-        </td>
-        <td>
-            @if($iPatient->is_99458_claiming_waived)
-                <span title="{{$iPatient->why_claiming_99458_waived ?: ''}}">Waived</span>
-            @else
-                @if($iPatient->is_99458_claimable)
-                    @if($iPatient->is_99458_claimed)
-                        Claimed
-                    @else
-                        Claimable
-                    @endif
-                @else
-                    <span title="{{$iPatient->why_99458_not_claimable_reason ?: ''}}"></span>Not Claimable
-                @endif
-            @endif
-        </td>
-    @endif
-
-    <td><span class="text-nowrap">{{$iPatient->next_visit_date ?: '-'}}</span></td>
-
-    <td class="border-right-0"></td>
-
-</tr>

+ 0 - 103
resources/views/app/practice-management/rpm-manager/table.blade.php

@@ -1,103 +0,0 @@
-<div class="d-flex align-items-stretch m-0 h-100">
-    <div class="flex-grow-1 px-0 overflow-auto h-100 rpm-matrix-right-column">
-        <?php $trIndex = 0; ?>
-        @foreach ($patients as $iPatient)
-            <?php $trIndex++; ?>
-        @endforeach
-        <table class="table table-sm table-bordered table-striped table-hover p-0 m-0 min-width-1100px border-0" id="table-rm-matrix">
-            <thead class="bg-light">
-            <tr>
-                <th class="border-top-0 border-bottom-0 border-left-0"></th>
-                <th class="border-top-0 border-bottom-0"></th>
-                <th class="border-top-0 border-bottom-0"></th>
-                <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
-                <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
-                <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
-                <th class="border-top-0 border-bottom-0 bg-aliceblue text-nowrap" colspan="3"># Meas. Days</th>
-                <th class="border-top-0 border-bottom-0"></th>
-                <th class="border-top-0 border-bottom-0"></th>
-                @if($viewingAs !== 'RME')
-                    <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="2">Entries</th>
-                @endif
-                <th class="border-top-0 border-bottom-0"></th>
-                @if($viewingAs !== 'RME')
-                    <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="{{$viewingAs === 'ADMIN' ? 3 : 1}}">Time</th>
-                @endif
-                <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="{{$viewingAs === 'ADMIN' ? 3 : 1}}">Reimbursement</th>
-                @if($viewingAs === 'ADMIN')
-                    <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="3">Claim</th>
-                @endif
-                <th class="border-top-0 border-bottom-0"></th>
-                <th class="border-top-0 border-bottom-0 border-right-0"></th>
-            </tr>
-            <tr>
-                <th class="border-bottom-0 border-top border-left-0">Name</th>
-                <th class="border-bottom-0 border-top">DOB</th>
-                <th class="border-bottom-0 border-top">MCP</th>
-                <th class="border-bottom-0 border-top">RMM</th>
-                <th class="border-bottom-0 border-top">RME</th>
-                <th class="border-bottom-0 border-top">DSLV</th>
-
-                <!--# Meas. Days-->
-                <th class="border-bottom-0 border-top">All</th>
-                <th class="border-bottom-0 border-top">BP</th>
-                <th class="border-bottom-0 border-top">WT</th>
-
-                <th class="border-bottom-0 border-top">BP</th>
-                <th class="border-bottom-0 border-top">WT</th>
-
-                @if($viewingAs !== 'RME')
-                    <th class="border-bottom-0 border-top">Mine</th>
-                    <th class="border-bottom-0 border-top">Others</th>
-                @endif
-
-                <th class="border-bottom-0 border-top">Comm.</th>
-
-                <!--Time-->
-                @if($viewingAs !== 'RME')
-                    @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
-                        <th class="border-bottom-0 border-top">MCP</th>
-                    @endif
-                    @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
-                        <th class="border-bottom-0 border-top">RMM</th>
-                    @endif
-                    @if($viewingAs === 'ADMIN')
-                        <th class="border-bottom-0 border-top">Total</th>
-                    @endif
-                @endif
-
-                <!--Reimb.-->
-                @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
-                    <th class="border-bottom-0 border-top">MCP</th>
-                @endif
-                @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
-                    <th class="border-bottom-0 border-top">RMM</th>
-                @endif
-                @if($viewingAs === 'ADMIN' || $viewingAs === 'RME')
-                    <th class="border-bottom-0 border-top">RME</th>
-                @endif
-
-                <!--Claim-->
-                @if($viewingAs === 'ADMIN')
-                    <th class="border-bottom-0 border-top">454</th>
-                    <th class="border-bottom-0 border-top">457</th>
-                    <th class="border-bottom-0 border-top">458</th>
-                @endif
-
-                <th class="border-bottom-0 border-top">Next</th>
-                <th class="border-bottom-0 border-top border-right-0"></th>
-            </tr>
-            </thead>
-            <tbody>
-            <?php
-            $trIndex = 0;
-            $daysRemaining = date('t') - date('j');
-            ?>
-            @foreach ($patients as $iPatient)
-                @include('app.practice-management.rpm-manager.row', compact('viewingAs', 'daysRemaining'))
-                <?php $trIndex++; ?>
-            @endforeach
-            </tbody>
-        </table>
-    </div>
-</div>