<section style="padding-top: 0.1rem;">

    <div style="margin: 0 0 1rem; font-weight: bold; opacity: 0.75"><span style="font-size: 16px">Specimen/Physician Information</span></div>

    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; font-size: 14px;">
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Order Date:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{date('Y-m-d h:i a')}}</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">NPI:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Test Date:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Practice Phone:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">202-935-1033</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Ordering Physician:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$ticket->orderingPro->displayName()}}</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Practice Fax:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">202-935-1033</td>
        </tr>
    </table>

    <hr style="margin: 1rem 0; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">

    <div style="margin: 1.25rem 0 1rem; font-weight: bold; opacity: 0.75"><span style="font-size: 16px">Patient Information</span></div>

    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; font-size: 14px;">
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Patient Name:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$patient->displayName()}}</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Address:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$patient->home_address_line1}}</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">DoB:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$patient->dob}}</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">City, State, ZIP:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$patient->home_address_city}} {{$patient->home_address_state}} {{$patient->home_address_zip}}</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Gender:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$patient->sex}}</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Mobile Phone:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$patient->cell_number ? $patient->cell_number : '-'}}</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Patient ID:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$patient->chart_number ? $patient->chart_number : '-'}}</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Home Phone:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$patient->phone_home ? $patient->phone_home : '-'}}</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">SSN:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$patient->ssn ? $patient->ssn : '-'}}</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Work Phone:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
    </table>

    <hr style="margin: 1rem 0; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">

    <div style="margin: 1.25rem 0 1rem; font-weight: bold; opacity: 0.75">
        <span style="font-size: 16px">Billing Information</span>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <span style="font-size: 16px; opacity: 0.5;">Bill to: Patient</span>
    </div>

    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; font-size: 14px;">
        <tr>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Primary Ins. Code:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Secondary Ins. Code:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Primary Ins. Name:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Secondary Ins. Name:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Address:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Address:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">City, State, ZIP:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">City, State, ZIP:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Worker's Comp:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Worker's Comp:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Policy #:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Policy #:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Group #:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Group #:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Emp/Group Name:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Emp/Group Name:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Insured:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75;">Insured:</td>
            <td style="padding-bottom: 0.25rem; width: 25%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
    </table>

    <hr style="margin: 1rem 0; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">

    <div style="margin: 1.25rem 0 1rem; font-weight: bold; opacity: 0.75">
        <span style="font-size: 16px">Guarantor Information</span>
    </div>

    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; font-size: 14px;">
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Name:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">{{$patient->displayName()}}</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Relationship:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">Self</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Address:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Phone:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">-</td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">City, State, ZIP:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">-</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;"></td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;"></td>
        </tr>
    </table>

    <hr style="margin: 1rem 0; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">

    <div style="margin: 1.25rem 0 1rem; font-weight: bold; opacity: 0.75">
        <span style="font-size: 16px">Order Information</span>
    </div>

    <?php $labData = json_decode($ticket->data); ?>

    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; font-size: 14px;">
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Fasting:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">Yes&nbsp;&nbsp;/&nbsp;&nbsp;No</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">ICD Codes:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">
                <?php
                $testIndex = 1;
                foreach($labData->icds as $icd) {
                    echo ($testIndex > 1 ? ', ' : '') . $icd;
                    $testIndex++;
                }
                ?>
            </td>
        </tr>
        <tr>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;">Collect at Draw Site:</td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;">Yes&nbsp;&nbsp;/&nbsp;&nbsp;No</td>
            <td style="padding-bottom: 0.25rem; width: 20%; opacity: 0.75;"></td>
            <td style="padding-bottom: 0.25rem; width: 30%; opacity: 0.75; font-weight: bold;"></td>
        </tr>
    </table>


</section>


<hr style="margin: 1rem 0; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">

<div style="margin: 1.25rem 0 1rem; font-weight: bold; opacity: 0.75">
    <span style="font-size: 16px">Lab</span>
</div>

<section style="font-size: 15px;">
    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
        <?php $testIndex = 1; ?>
        @foreach($labData->tests as $test)
        <tr>
            <td style="width: 20px; vertical-align: top; opacity: 0.75; font-size: 14px">
                <span>{{$testIndex++}}. </span>
            </td>
            <td style="vertical-align: top">
                <div style="padding-bottom: 0.3rem;">{{$test}}</div>
            </td>
        </tr>
        @endforeach
    </table>
</section>

@if(@$labData->pharmacyName)
<hr style="margin: 1rem 0; border-top-width: 0; border-bottom-width: 1px; border-color: #bbb">

<div style="margin: 1.25rem 0 1rem; font-weight: bold; opacity: 0.75">
    <span style="font-size: 16px">Facility Information</span>
</div>

<div style="font-size: 14px; opacity: 0.75; ">
    <p style="margin: 0.5rem 0;"><b>{{ @$labData->pharmacyName }}</b></p>
    <p style="margin: 0.5rem 0;">{{@$labData->pharmacyAddressMemo}} {{@$labData->pharmacyCity}} {{@$labData->pharmacyState}}</p>
    <p style="margin: 0.5rem 0;">Phone: {{@$labData->pharmacyPhone}}</p>
</div>
@endif
