 
<?php $__env->startSection('title', 'Client Mapping Data'); ?>
<?php $__env->startSection('content'); ?>
    <!-- push external head elements to head -->
    <?php $__env->startPush('head'); ?>
        <link rel="stylesheet" href="<?php echo e(asset('plugins/DataTables/datatables.min.css')); ?>">
        <link rel="stylesheet" href="<?php echo e(asset('plugins/jquery-ui/jquery-ui.css')); ?>">
    <?php $__env->stopPush(); ?>

    
    <div class="container-fluid">
        <div class="page-header">
            <div class="row align-items-end">
                <div class="col-lg-8">
                    <div class="page-header-title">
                        <i class="ik ik-pie-chart bg-blue"></i>
                        <div class="d-inline">
                            <h5><?php echo e(__('Client Mapping Data')); ?></h5>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4">
                    <nav class="breadcrumb-container" aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">
                                <a href="<?php echo e(route('dashboard')); ?>"><i class="ik ik-home"></i></a>
                            </li>
                            
                           <li class="breadcrumb-item active" aria-current="page"><?php echo e(__('Client Mapping')); ?></li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>
        
        <div class="row clearfix">
            <div class="col-md-12">
                <?php if(session()->has('success')): ?>
                <div class="box no-border">
                    <div class="box-tools">
                        <p class="alert alert-success alert-dismissible">
                            <?php echo e(session()->get('success')); ?>

                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        </p>
                    </div>
                </div>
                <?php endif; ?>
                <?php if(session()->has('error')): ?>
                <div class="box no-border">
                    <div class="box-tools">
                        <p class="alert alert-danger alert-dismissible">
                            <?php echo e(session()->get('error')); ?>

                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        </p>
                    </div>
                </div>
                <?php endif; ?>
                <div class="card">
                    <div class="card-header">
                        <div class="col-md-9 pl-0">
                            <h3><?php echo e(__('Client Mapping Data Table')); ?></h3>
                        </div>
                        <!--<div class="col-md-3 text-right">-->
                        <!--    <a href="<?php echo e('upload-patient-mapping'); ?>" class='btn btn-primary'><?php echo e(__('Import Client Mapping')); ?></a>-->
                        <!--</div>-->
                    </div>
                    <div class="card-body table-responsive">
                        <table id="myAdvancedTable" class="table p-3">
                            <thead>
                                <tr>
                                    <th style="display: none;"><?php echo e(__('State Code')); ?></th>
                                    <th style="display: none;"><?php echo e(__('Dist Code')); ?></th>
                                    <th><?php echo e(__('Staff Code')); ?></th>
                                    <th style="display: none;"><?php echo e(__('ART Center Code')); ?></th>
                                    <th><?php echo e(__('Pre ART REG Number')); ?></th>
                                    <th><?php echo e(__('ART REG Number')); ?></th>
                                    <th><?php echo e(__('Client Name')); ?></th>
                                    <th style="display: none;"><?php echo e(__('Client UID')); ?></th>
                                    <th><?php echo e(__('Linelist Received Date')); ?></th>
                                    <th><?php echo e(__('Linelist Type')); ?></th>
                                    <th><?php echo e(__('Linelist Reason')); ?></th>
                                    <th><?php echo e(__('Linelist Status')); ?></th>
                                    <th><?php echo e(__('Final Outcome Date')); ?></th>
                                    <th><?php echo e(__('Linelist Closed Date')); ?></th>
                                </tr>
                            </thead>
                            <tbody>
                                 <?php $__currentLoopData = $getdata; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $getdatas): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td style="display: none;"><?php echo e($getdatas->state_code); ?></td>
                                    <td style="display: none;"><?php echo e($getdatas->dist_code); ?></td>
                                    <td><?php echo e($getdatas->emp_code); ?></td>
                                    <td style="display: none;"><?php echo e($getdatas->art_centre_code); ?></td>

                                    <?php
                                    $getpatregdata = DB::table('patient_register')->where(['id'=>$getdatas->pat_uid])->first();
                                    ?>

                                    <td><?php echo e($getpatregdata->pre_art_reg_num ?? ''); ?></td>
                                    <td><?php echo e($getpatregdata->art_reg_num ?? ''); ?></td>
                                    <td><?php echo e($getpatregdata->pat_name ?? ''); ?></td>
                                    <td style="display: none;"><?php echo e($getpatregdata->pat_uid ?? ''); ?></td>
                                    <?php if(isset($getdatas->linelist_date)): ?>
                                    <td><?php echo e(date('d-m-Y',strtotime($getdatas->linelist_date))); ?></td>
                                    <?php else: ?>
                                    <td></td>
                                    <?php endif; ?>
                                    <?php if($getdatas->linelist_type == 1): ?>
                                    <td>Outreach</td>
                                        <?php if($getdatas->linelist_reason == 1): ?>
                                        <td>LFU</td>
                                        <?php elseif($getdatas->linelist_reason == 2): ?>
                                        <td>MIS</td>
                                        <?php elseif($getdatas->linelist_reason == 3): ?>
                                        <td>Home Delivery</td>
                                        <?php elseif($getdatas->linelist_reason == 4): ?>
                                        <td>VL</td>
                                        <?php else: ?>
                                        <td>-</td>
                                        <?php endif; ?>
                                        
                                    <?php elseif($getdatas->linelist_type == 2): ?>
                                    <td>Calling</td>
                                        <?php if($getdatas->linelist_reason == 6): ?>
                                        <td>LFU</td>
                                        <?php elseif($getdatas->linelist_reason == 7): ?>
                                        <td>MIS</td>
                                        <?php elseif($getdatas->linelist_reason == 8): ?>
                                        <td>CD4</td>
                                        <?php elseif($getdatas->linelist_reason == 9): ?>
                                        <td>TLD</td>
                                        <?php elseif($getdatas->linelist_reason == 10): ?>
                                        <td>Due Date Call</td>
                                        <?php elseif($getdatas->linelist_reason == 11): ?>
                                        <td>TB Follow up</td>
                                        <?php else: ?>
                                        <td>-</td>
                                        <?php endif; ?>
                                    <?php else: ?>
                                    <td>EAC</td>
                                    <td>-</td>
                                    <?php endif; ?>
                                    <td><?php echo e($getdatas->linelist_status); ?></td>
                                    <td><?php echo e($getdatas->final_outcome_date); ?></td>
                                    <td><?php echo e($getdatas->linelist_close_date); ?></td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                </div> 
            </div>
        </div>
    </div>

    <!-- push external js -->
    <?php $__env->startPush('script'); ?>
    <script src="<?php echo e(asset('plugins/jquery-ui/jquery-ui.min.js')); ?>"></script>
    <script src="<?php echo e(asset('plugins/DataTables/datatables.min.js')); ?>"></script>
    <!--get editable datatable script-->
    <script src="<?php echo e(asset('js/editable-datatable.js')); ?>"></script>
    <?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/yrgdmc/public_html/treatment/resources/views/pages/patient-mapping-data.blade.php ENDPATH**/ ?>