@extends ('layouts/empty')

@section('content')
    <div class="p-3 mcp-theme-1">
        <div class="card border-0">
            <div class="card-body p-0">
                <table class="table table-striped table-bordered table-sm">
                    <tbody>
                    <tr>
                        <td class="border-top-0 width-300px">Current Version</td>
                        <td class="border-top-0">{{friendlier_date_time($mbClaim->currentVersion->created_at)}}</td>
                    </tr>
                    <tr>
                        <td>Claim Version</td>
                        <td>{{friendlier_date_time($mbClaim->currentVersion->created_at)}}</td>
                    </tr>
                    <tr>
                        <td>Is Submitted</td>
                        <td>{{$mbClaim->is_submitted ? 'YES' : 'NO'}}</td>
                    </tr>
                    <tr>
                        <td>Created At</td>
                        <td>{{friendlier_date_time($mbClaim->created_at)}}</td>
                    </tr>
                    <tr>
                        <td>Status</td>
                        <td>{{$mbClaim->status}}</td>
                    </tr>
                    <tr>
                        <td>Status Memo</td>
                        <td>{{$mbClaim->status_memo}}</td>
                    </tr>
                    <tr>
                        <td>Status Updated At</td>
                        <td>{{$mbClaim->status_updated_at}}</td>
                    </tr>
                    <tr>
                        <td>Vendor Identifier</td>
                        <td>{{$mbClaim->vendor_identifier}}</td>
                    </tr>
                    <tr>
                        <td>Claim Date</td>
                        <td>{{friendlier_date_time($mbClaim->claim_date)}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Tax ID</td>
                        <td>{{$mbClaim->billing_provider_tax_id}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Tax ID Type</td>
                        <td>{{$mbClaim->billing_provider_tax_id_type}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Entity</td>
                        <td>{{$mbClaim->billing_provider_entity}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Phone Number</td>
                        <td>{{$mbClaim->billing_provider_phone_number}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Organization Name</td>
                        <td>{{$mbClaim->billing_provider_organization_name}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Last Name</td>
                        <td>{{$mbClaim->billing_provider_last_name}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider First Name</td>
                        <td>{{$mbClaim->billing_provider_first_name}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Middle Name</td>
                        <td>{{$mbClaim->billing_provider_middle_name}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Address Street Line 1</td>
                        <td>{{$mbClaim->billing_provider_address_street_line1}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Address Street Line 2</td>
                        <td>{{$mbClaim->billing_provider_address_street_line2}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Address City</td>
                        <td>{{$mbClaim->billing_provider_address_city}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Address State</td>
                        <td>{{$mbClaim->billing_provider_address_state}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Address Zip</td>
                        <td>{{$mbClaim->billing_provider_address_zip}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider NPI</td>
                        <td>{{$mbClaim->billing_provider_npi}}</td>
                    </tr>
                    <tr>
                        <td>Billing Provider Taxonomy Code</td>
                        <td>{{$mbClaim->billing_provider_taxonomy_code}}</td>
                    </tr>
                    <tr>
                        <td>Payer Identifier ID</td>
                        <td>{{$mbClaim->payer_identifier_id}}</td>
                    </tr>
                    <tr>
                        <td>Payer Name</td>
                        <td>{{$mbClaim->payer_name}}</td>
                    </tr>
                    <tr>
                        <td>Payer Address Street Line 1</td>
                        <td>{{$mbClaim->payer_address_street_line1}}</td>
                    </tr>
                    <tr>
                        <td>Payer Address Street Line 2</td>
                        <td>{{$mbClaim->payer_address_street_line2}}</td>
                    </tr>
                    <tr>
                        <td>Payer Address City</td>
                        <td>{{$mbClaim->payer_address_city}}</td>
                    </tr>
                    <tr>
                        <td>Payer Address State</td>
                        <td>{{$mbClaim->payer_address_state}}</td>
                    </tr>
                    <tr>
                        <td>Payer Address Zip</td>
                        <td>{{$mbClaim->payer_address_zip}}</td>
                    </tr>
                    <tr>
                        <td>Patient Chart Number</td>
                        <td>{{$mbClaim->patient_chart_number}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Identifier</td>
                        <td>{{$mbClaim->subscriber_identifier}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber First Name</td>
                        <td>{{$mbClaim->subscriber_first_name}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Last Name</td>
                        <td>{{$mbClaim->subscriber_last_name}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Middle Name</td>
                        <td>{{$mbClaim->subscriber_middle_name}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Address Street Line 1</td>
                        <td>{{$mbClaim->subscriber_address_street_line1}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Address Street Line 2</td>
                        <td>{{$mbClaim->subscriber_address_street_line2}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Address City</td>
                        <td>{{$mbClaim->subscriber_address_city}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Address State</td>
                        <td>{{$mbClaim->subscriber_address_state}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Address Zip</td>
                        <td>{{$mbClaim->subscriber_address_zip}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Phone Number</td>
                        <td>{{$mbClaim->subscriber_phone_number}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Group ID</td>
                        <td>{{$mbClaim->subscriber_group_id}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber DOB</td>
                        <td>{{$mbClaim->subscriber_dob}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Gender</td>
                        <td>{{$mbClaim->subscriber_gender}}</td>
                    </tr>
                    <tr>
                        <td>Subscriber Group Name</td>
                        <td>{{$mbClaim->subscriber_group_name}}</td>
                    </tr>
                    <tr>
                        <td>Claim Direct Payment Authorized</td>
                        <td>{{$mbClaim->claim_direct_payment_authorized}}</td>
                    </tr>
                    <tr>
                        <td>Claim Frequency</td>
                        <td>{{$mbClaim->claim_frequency}}</td>
                    </tr>
                    <tr>
                        <td>Claim Prior Authorization Number</td>
                        <td>{{$mbClaim->claim_prior_authorization_number}}</td>
                    </tr>
                    <tr>
                        <td>Claim Accept Assignment Code</td>
                        <td>{{$mbClaim->claim_accept_assignment_code}}</td>
                    </tr>
                    <tr>
                        <td>Claim Total Charge</td>
                        <td>{{$mbClaim->claim_total_charge}}</td>
                    </tr>
                    <tr>
                        <td>Claim Patient Amount Paid</td>
                        <td>{{$mbClaim->claim_patient_amount_paid}}</td>
                    </tr>
                    <tr>
                        <td>Claim Diagnosis Codes</td>
                        <td>{{str_replace("|", ", ", $mbClaim->claim_diagnosis_codes)}}</td>
                    </tr>
                    <tr>
                        <td>Attending Provider First Name</td>
                        <td>{{$mbClaim->attending_provider_first_name}}</td>
                    </tr>
                    <tr>
                        <td>Attending Provider Last Name</td>
                        <td>{{$mbClaim->attending_provider_last_name}}</td>
                    </tr>
                    <tr>
                        <td>Attending Provider NPI</td>
                        <td>{{$mbClaim->attending_provider_npi}}</td>
                    </tr>
                    </tbody>
                </table>

                <table class="table table-sm table-condensed mb-0 table-bordered">
                    <thead>
                    <tr class="bg-light">
                        <th class="border-0 width-300px">CPT</th>
                        <th class="border-0">DOS</th>
                        <th class="border-0">ICDs</th>
                    </tr>
                    </thead>
                    <tbody class="pb-3">
                    @foreach($mbClaim->claim->lines as $line)
                        <tr class="claim-line">
                            <td>{{$line->cpt}}
                                <div>Units: <b>{{!@$line->units ? 1 : $line->units}}</b></div>
                            </td>
                            <td class="text-nowrap">{{friendlier_date($line->date_of_service)}}</td>
                            <td>
                                @if(count($line->claimLineIcds))
                                    @foreach($line->claimLineIcds as $icd)
                                        <div>
                                            <b class="c-pointer border-secondary border-bottom" title="{{$icd->description}}">{{$icd->code}}</b>
                                        </div>
                                    @endforeach
                                @else
                                    <p>No ICDs set</p>
                                @endif
                            </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>

            </div>
        </div>
    </div>
@endsection
