@extends ('layouts/template')

@section('content')
    <div class="p-3 mcp-theme-1">
        <div class="card">
            <div class="card-header p-3 d-flex align-items-center">
                <strong class="mr-4">
                    <i class="fas fa-user-injured"></i>
                    Remote Monitoring Report
                </strong>
            </div>
            <div class="card-body p-0">
                <table class="table table-sm table-condensed p-0 m-0" style="table-layout: fixed">
                    <thead class="bg-light">
                        <tr>
                            <th class="px-3 border-0">Patient</th>
                            <th class="border-0">Month/Year</th>
                            <th class="border-0"># Days with Measurements</th>
                            <th class="border-0">HCP</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach($rows as $row)
                            <tr>
                                <td>
                                    <a href="/patients/view/{{ $row->uid }}">
                                        <b>{{ implode(", ", [$row->name_last, $row->name_first]) }}</b>
                                    </a>
                                </td>
                                <td>
                                        {{ $row->year_month }}
                                </td>
                                <td>
                                	{{ $row->num_of_days_with_measurement }}
				</td>
				<td>
                                        <b>{{ implode(", ", [$row->mcp_pro_lname, $row->mcp_pro_fname]) }}</b>
				</td>
                            </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>
@endsection
