@extends ('layouts.patient')

@section('inner-content')
<div id="client-settings-container">
    <div class="row">
        <div class="col-md-12">
            <h1>Eligible Refreshes</h1>
            <div>
                <div moe relative class="ml-2">
                    <a href="" start show class="btn btn-sm btn-success text-white font-weight-bold small">Refresh Eligible Data</a>
                    <form url="/api/client/refreshEligible" class="mcp-theme-1" right>
                        <input type="hidden" name="uid" value="{{$patient->uid}}">
                        <p>Refresh eligible data?</p>
                        <div>
                            <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
                            <button cancel class="btn btn-sm btn-default border">Cancel</button>
                        </div>
                    </form>
                </div>
            </div>
            <hr>
            <table class="table table-condensed table-striped">
                <thead>
                    <tr>
                        <th>Timestamp</th>
                        <th>Result</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($patient->eligibleRefreshes as $el)
                    <tr>
                        <td>{{friendly_date_time($el->ts)}}</td>
                        <td>
                        <table class="table table-sm table-striped table-condensed">
                            <tr>
                                <td>Was Successful</td>
                                <td>{{$el->medicareResult->was_successful}}</td>
                            </tr>
                            <tr>
                                <td>Reject Reason Code</td>
                                <td>{{$el->medicareResult->reject_reason_code}}</td>
                            </tr>
                            <tr>
                                <td>Reject Reason Description</td>
                                <td>{{$el->medicareResult->reject_reason_description}}</td>
                            </tr>
                            <tr>
                                <td>Follow Up Action Code</td>
                                <td>{{$el->medicareResult->follow_up_action_code}}</td>
                            </tr>
                            <tr>
                                <td>Follow Up Action Description</td>
                                <td>{{$el->medicareResult->follow_up_action_description}}</td>
                            </tr>
                            <tr>
                                <td>Details</td>
                                <td>{{$el->medicareResult->details}}</td>
                            </tr>
                            <tr>
                                <td>Is Mcn Valid Number</td>
                                <td>{{$el->medicareResult->is_mcn_valid_number}}</td>
                            </tr>
                            <tr>
                                <td>Address Street Line1</td>
                                <td>{{$el->medicareResult->address_street_line1}}</td>
                            </tr>
                            <tr>
                                <td>Address Street Line2</td>
                                <td>{{$el->medicareResult->address_street_line2}}</td>
                            </tr>
                            <tr>
                                <td>Address City</td>
                                <td>{{$el->medicareResult->address_city}}</td>
                            </tr>
                            <tr>
                                <td>Address State</td>
                                <td>{{$el->medicareResult->address_state}}</td>
                            </tr>
                            <tr>
                                <td>Address Zip</td>
                                <td>{{$el->medicareResult->address_zip}}</td>
                            </tr>
                            <tr>
                                <td>Is Partbprimary</td>
                                <td>{{$el->medicareResult->is_partbprimary}}</td>
                            </tr>
                            <tr>
                                <td>Is Hospice</td>
                                <td>{{$el->medicareResult->is_hospice}}</td>
                            </tr>
                            <tr>
                                <td>Mcn Response Detail</td>
                                <td>{{$el->medicareResult->mcn_response_detail}}</td>
                            </tr>
                            <tr>
                                <td>Billing Address</td>
                                <td>{{$el->medicareResult->billing_address}}</td>
                            </tr>
                            <tr>
                                <td>Reason Not Partb</td>
                                <td>{{$el->medicareResult->reason_not_partb}}</td>
                            </tr>
                            <tr>
                                <td>Reason Not Partbmemo</td>
                                <td>{{$el->medicareResult->reason_not_partbmemo}}</td>
                            </tr>
                            <tr>
                                <td>Is Medicare Advantage</td>
                                <td>{{$el->medicareResult->is_medicare_advantage}}</td>
                            </tr>
                            <tr>
                                <td>Medicare Advantage Plan</td>
                                <td>{{$el->medicareResult->medicare_advantage_plan}}</td>
                            </tr>
                        </table>
                        </td>
                    </tr>
                    @endforeach
                </tbody>
            </table>
        </div>
    </div>
</div>
@endsection
