@extends ('layouts/template')

@section('content')

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

        <div class="card">

            <div class="card-header px-3 py-2 d-flex align-items-center">
                <strong class="mr-4">
                    <i class="fas fa-user-injured"></i>
                    HCP Bill Matrix
                </strong>
                <select class="ml-auto max-width-300px form-control form-control-sm"
                        onchange="fastLoad('/practice-management/hcp-bill-matrix/' + this.value, true, false, false)">
                    <option value="" {{ $proUid === '' ? 'selected' : '' }}>All Pros</option>
                    @foreach($allPros as $_pro)
                        <option value="{{$_pro->uid}}" {{ $proUid === $_pro->uid ? 'selected' : '' }}>{{$_pro->displayName()}}</option>
                    @endforeach
                </select>
            </div>
            <div class="card-body p-0">
                <table class="table table-sm table-condensed p-0 m-0">
                    <thead class="bg-light">
                    <tr>
                        <th>Name Last</th>
                        <th>Name First</th>
                        <th>Eff. Date</th>
                        <th>New/FU</th>
                        <th>Note Signed by HCP?</th>
                        <th>Note Link</th>
                        <th>Note Cancelled?</th>
                        <th>HCP Last</th>
                        <th>HCP First</th>
                        <th>HCP Pro Link</th>
                        <th>Bill Signed by HCP?</th>
                        <th>Code</th>
                        <th># Units</th>
                        <th>HCP Expected Payment</th>
                        <th>HCP Paid?</th>
                        <th>HCP Paid Amount</th>
                        <th>Bill Cancelled?</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach ($rows as $row)
                        <tr class="">
                            <td>{{$row->name_last}}</td>
                            <td>{{$row->name_first}}</td>
                            <td>{{$row->effective_dateest}}</td>
                            <td>{{$row->new_or_fu_or_na}}</td>
                            <td>{{$row->is_note_signed_by_hcp}}</td>
                            <td>
                                <a href="/patients/view/{{ $row->client_uid }}/notes/view/{{ $row->note_uid }}">
                                    Note Link
                                </a>
                            </td>
                            <td>{{$row->is_note_cancelled}}</td>
                            <td>{{$row->hcp_last}}</td>
                            <td>{{$row->hcp_first}}</td>
                            <td>{{$row->hcp_pro_uid ? '-' : '--'}}</td>
                            <td>{{$row->is_bill_signed_by_hcp}}</td>
                            <td>{{$row->code}}</td>
                            <td>{{$row->number_of_units}}</td>
                            <td>{{$row->hcp_expected_payment_amount}}</td>
                            <td>{{$row->has_hcp_been_paid}}</td>
                            <td>{{$row->hcp_payment_amount}}</td>
                            <td>{{$row->is_bill_cancelled}}</td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>

@endsection
