<div class="d-flex align-items-stretch m-0 h-100">
    {{--@if(!request()->input('not-enrolled'))
        <div class="overflow-auto border-right h-100 rpm-matrix-left-column">
            @if(request()->input('f_mcp'))
                @include('app.stat-tree.summary', ['slug' => 'rm-tree-mcp', 'showForPro' => $pro, 'noDropVisualize' => true, 'stParams' => ['start_date' => $rcmStartDate]])
            @else
                @include('app.stat-tree.summary', ['slug' => 'rm-tree-admin', 'noDropVisualize' => true, 'stParams' => ['start_date' => $rcmStartDate]])
            @endif
        </div>
    @endif--}}
    <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-striped table-hover p-0 m-0 min-width-1100px" id="table-rm-matrix">
            <thead class="bg-light">
            <tr>
                <th class="border-0 pr-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'key' => '__clear_sort__'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Month', 'key' => 'start_date'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Name', 'key' => 'client_name'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Insurance', 'key' => 'payer_name'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'State', 'key' => 'mailing_address_state'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'CM MCP', 'key' => 'mcp_name'])</th>
                <th class="border-0 text-secondary">BP</th>
                <th class="border-0 text-secondary">Scale</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'DSLM', 'key' => 'dslm'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'DSLV', 'key' => 'days_between_most_recent_mcp_note_date_and_end_of_care_month'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Next<br>Visit', 'key' => 'next_visit_date'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => '<i class="text-sm fa fa-phone rotateh"></i> MCP', 'key' => 'has_mcp_interacted_with_client_about_rm'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['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_v2', ['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_v2', ['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_v2', ['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_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Total<br>Mins.', 'key' => 'rm_total_time_in_seconds'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'MCP', 'key' => 'is_billable_by_mcp'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'RMM', 'key' => 'is_billable_by_rmm'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Can<br>454', 'key' => 'is_99454_claimable'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Done<br>454', 'key' => 'is_99454_claimed'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Can<br>457', 'key' => 'is_99457_claimable'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Done<br>457', 'key' => 'is_99457_claimed'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Can<br>458', 'key' => 'is_99458_claimable'])</th>
                <th class="border-0">@include('app.practice-management._sort_header_multi_v2', ['route' => route("practice-management.rpm-matrix-admin"), 'label' => 'Done<br>458', 'key' => 'is_99458_claimed'])</th>
            </tr>
            </thead>
            <tbody>
            <?php $trIndex = 0; ?>
            @foreach ($patients as $iPatient)
                @include('app.practice-management.remote-monitoring-row-markup-for-admin')
                <?php $trIndex++; ?>
            @endforeach
            </tbody>
        </table>
    </div>
  
</div>
