<style>
    * {
        font-family: 'Kanit_semibold';
        font-size: 12px;
        font-weight: bold;
    }

    .boximage {
        border: 1px solid black;
        height: 3.5cm;
        width: 2.5cm;
        position: absolute;
        margin-left: 7px;
        top: -2px;
    }

    .table-header {
        width: 725px;
        border: 1px solid gray;
        margin-left: 1.6em;
        color: #495057;

    }

    .td-last {
        text-align: center !important;
        /* padding-top: 5px; */
    }

    .p-1 {
        padding: 0px 8px;
    }

    .table-header tr {
        line-height: 9px !important;
        /* background: skyblue; */
    }

    .table-header tr td {


        /* border: 1px solid !important; */
    }

    .logo-hos {
        height: 50px;
    }

    /* .img-logo{
        background-image: url("public/image/egd.png");
    } */
</style>


<div class="p-1">
    <table class="table-header" border="0">
        <tr style="vertical-align: middle;">
            <td class="" align="center" rowspan="2">
                
                
                
                <img src="http://110.171.123.140/config/views/pdfhead/screening/<?php echo e($hospital->hospital_name); ?>/hospital.jpg" class="logo-hos">

            </td>
            <td style="" width="200px">
                
                <?php echo e($hospital->hospital_name); ?>

            </td>

            <td class="" width="">HN :<font color="#F06548"><?php echo e(@$casedata->hn); ?></font>
            </td>
            <td class="">AN :
                <font color="#495057"><?php echo e(@$patient->an); ?></font>
            </td>
        </tr>
        <tr>
            <td class="pdfhead" width="200px">
                <span style="color: #495057;"><?php echo e($hospital->hospital_address); ?></span>

            </td>
            <td class="pdfhead">Name :
                <font color="#495057">
                    <?php echo e(@$patient->prefix . @$patient->firstname . ' ' . @$patient->middlename . ' ' . @$patient->lastname); ?>

                </font>
                <div style="margin-top: 2px;">
                    Age : <font color="#495057">
                        <?php
                            $birthdate = format_date($patient->birthdate, 'd-m-Y');
                        ?>
                        <?php echo e($birthdate); ?> ( <?php echo e(age(isset($birthdate) ? $birthdate : '1982-01-01')); ?> ปี )</font>
                </div>
            </td>
            <td class="pdfhead">Gender:
                <?php
                    $gender = 'ไม่ระบุ';
                    if (@$patient->gender == '1') {
                        $gender = 'Male';
                    }
                    if (@$patient->gender == '2') {
                        $gender = 'Female';
                    }
                ?>
                <font color="#495057"><?php echo e(@$gender); ?></font> <br>
                <div style="margin-top: 2px;">

                    Location : <font color="#495057">
                        <?php if(@$casedata->opd): ?>
                            <?php echo e(@$casedata->opd); ?>

                        <?php endif; ?>
                        <?php if(@$casedata->ward): ?>
                            WARD : <?php echo e(@$casedata->ward); ?>

                        <?php endif; ?>
                        <?php if(@$casedata->refer): ?>
                            REFER : <?php echo e(@$casedata->refer); ?>

                        <?php endif; ?>


                    </font>

                </div>

            </td>
        </tr>

        <tr>
            <td colspan="2" rowspan="1" class="pdfhead">
                หน่วยส่องกล้องทางเดินอาหาร
                <!--
                <?php if(isset($procedure->pdf->head->departmentTH)): ?>
    <?php echo e($procedure->pdf->head->departmentTH); ?>

<?php else: ?>
    Colorectal Cancer Screening (R5)
<?php endif; ?>          -->
            </td>

            <td colspan="1" rowspan="1" class="pdfhead">Operation Date :
                <font color="#495057">
                    <?php echo e(date_thaiformat(swapDATE(isset($casedata->appointment) ? $casedata->appointment : date('Y-m-d')), '-')); ?>

                    <?php echo e(@$casedata->time_start); ?>

                </font>
            </td>

            <td class="pdfhead">Equipment :
                <?php
                    use App\Models\Mongo;
                    $scope = [];
                    foreach (isset($casedata->scope) ? $casedata->scope : [] as $data) {
                        // dd($data);
                        $scope[] = intval($data);
                    }
                    $tb_scope = Mongo::table('tb_scope')->whereIn('scope_id', $scope)->get();
                    // dd($tb_scope)
                ?>
                <font color="#495057">
                    <?php $__currentLoopData = isset($tb_scope) ? $tb_scope : []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php echo e(@$data['scope_model']); ?>

                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </font>
            </td>

        </tr>
        <tr>
            <td colspan="2" rowspan="1" class="pdfhead">
                (Digestive Endoscopy Department)
                <!--984
            <?php if(isset($procedure->pdf->head->departmentTH)): ?>
    <?php echo e($procedure->pdf->head->departmentTH); ?>

<?php else: ?>
    Colorectal Cancer Screening (R5)
<?php endif; ?>          -->
            </td>
            <td colspan="2" rowspan="1" class="pdfhead">Treatment Coverage :
                <font color="#495057"> <?php echo e(@$casedata->treatment_coverage); ?></font>
            </td>
        </tr>
        <!-- <tr>
            <td colspan="2" class="pdfhead">
                <?php if(isset($procedure->pdf->head->departmentEN)): ?>
    <?php echo e($procedure->pdf->head->departmentEN); ?>

<?php else: ?>
    Colorectal Cancer Screening
<?php endif; ?>
            </td>
        </tr> -->
        <tr>
            <td colspan="2" rowspan="1" class="pdfhead">

                <?php if(isset($procedure->pdf->head->documentname)): ?>
                    <?php echo e($procedure->pdf->head->documentname); ?>

                <?php else: ?>
                    Digestive Endoscopy Report
                <?php endif; ?>
                <font style="color: <?php echo e(@$procedure->color); ?>;">
                    (<?php echo e(@$pdfnameshow); ?>)
                </font>
            </td>


        </tr>

    </table>
</div>
<?php /**PATH D:\laragon\htdocs\config\views/pdfhead/screening/โรงพยาบาลด่านซ้าย/pdf_head01.blade.php ENDPATH**/ ?>