<div>
<div class="">
    @if($patient->has_mcp_done_onboarding_visit !== 'YES')
        <span class="text-dark d-inline-flex align-items-center">
              <span class="mr-2">
                <i class="fa fa-exclamation-triangle"></i>
                <span>MCP Onboarding Visit Pending</span>
              </span>
            </span>
        @include('app.patient.partials.update-mcp-onboarding-visit-info')
    @endif
</div>
@if($patient->mcp && $patient->mcp->id === $pro->id || $pro->pro_type == 'ADMIN')
    <div class="">
        <label>Follow-up Freq (days):</label>
        <span>{!! is_null($patient->mcp_usual_follow_up_frequency_in_days) ? '<span class="text-danger">Not Set</span>' : $patient->mcp_usual_follow_up_frequency_in_days !!}</span>
        <div moe relative class="ml-2">
            <a href="#" start show class="text-sm"><i class="fa fa-edit on-hover-opaque"></i></a>
            <form url="/api/client/putMcpUsualFollowUpFrequencyInDays">
                <input type="hidden" name="uid" value="{{$patient->uid}}">
                <div class="mb-2">
                    <label class="text-sm text-secondary mb-1 text-nowrap">Follow-up Frequency (days)</label>
                    <input type="number" required name="mcpUsualFollowUpFrequencyInDays" class="form-control form-control-sm" value="{{@$patient->mcp_usual_follow_up_frequency_in_days}}">
                </div>
                <div class="d-flex align-items-center">
                    <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
                    <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
                </div>
            </form>
        </div>
    </div>
@endif
<?php $_cpc = $patient->getPrimaryCoverage();?>
<div class="pr-2">DOB: {{friendly_date($patient->dob, false,null, true)}} </div>
<div class="d-flex flex-wrap">
    @if($_cpc && $patient->getPrimaryCoverageStatus() === 'YES')
        <div class="text-nowrap screen-only">
            <a href="{{ route('patients.view.primary-coverage', $patient) }}">{{$_cpc->insuranceDisplayPayerName()}}</a>
            <span class="on-hover-show d-inline-block on-hover-opaque">
                <i class="fa fa-check-circle text-success"></i>
                <div class="on-hover-content py-2 pl-3 text-nowrap">
                  Covered
                </div>
              </span>
            @if($_cpc->is_manually_determined)
                <a href="{{ route('patients.view.primary-coverage', $patient) }}" class="on-hover-show">
                    <i class="ml-1 fas fa-code-branch text-info"></i>
                    <div class="on-hover-content py-2 pl-3 text-nowrap">
                        Manually determined at {{ friendly_date($_cpc->created_at) }}
                    </div>
                </a>
            @endif
        </div>
        @if($performer->pro->pro_type == 'ADMIN')
            @if($_cpc->plan_type === 'MEDICARE')
                @if(@$patient->mpb_remaining !== null)
                    <div class="ml-2">Deductible: {{format_number(@$patient->mpb_remaining)}} </div>
                @endif
            @endif
            @if($_cpc->plan_type === 'COMMERCIAL')

                <div class="ml-2">Deductible: {{@$_cpc->deductible_amount}} </div>

            @endif
        @endif
    @endif
</div>
</div>
