<div class="p-3 mcp-theme-1">
    <div class="card">

        <div class="card-header px-2 py-1 hide-inside-popup border-bottom-0">
            <strong class="mr-4">
                <i class="fas fa-box"></i>
                Patients Awaiting RPM Interaction
            </strong>
        </div>

        <div class="card-body p-0 border-top-0 pb-0">

            <table class="table table-sm table-striped mb-0">
                <thead class="bg-light">
                <tr>
                    <th class="border-0 text-secondary">Patient</th>
                    <th class="border-0 text-secondary">Gender, Age</th>
                    <th class="border-0 text-secondary">Care Month</th>
                    <th class="border-0 text-secondary">Days with measurements</th>
                </tr>
                </thead>
                <tbody>
                @foreach($records as $record)
                    <tr>
                        <td>
                            <a native target="_blank" href="/mc/patients/view/{{$record->client_uid}}">{{$record->client_name}}</a>
                        </td>
                        <td>{{$record->sex}} {{$record->age_in_years}} years</td>
                        <td>
                            <a native target="_blank" href="/mc/patients/view/{{$record->client_uid}}/care-months/view/{{$record->care_month_uid}}">{{$record->start_date}}</a>
                        </td>
                        <td>
                            {{$record->number_of_days_with_remote_measurements ?: 0}}
                        </td>
                    </tr>
                @endforeach
                @if(!count($records))
                    <tr>
                        <td colspan="6">No records found.</td>
                    </tr>
                @endif
                </tbody>
            </table>

        </div>
    </div>
</div>
