<?php /* Smarty version Smarty-3.1.11, created on 2024-08-12 08:51:41
         compiled from "../views/obgy/visits/visitdiv_lab.html" */ ?>
<?php /*%%SmartyHeaderCode:175769817866b9a2ed140d85-76474482%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '25f8d3bc5ec369c7855032d8951f06f59c5863f2' => 
    array (
      0 => '../views/obgy/visits/visitdiv_lab.html',
      1 => 1721886775,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '175769817866b9a2ed140d85-76474482',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'programesetting' => 0,
    'showBranchCol' => 0,
    'labSetting' => 0,
    'allvisit' => 0,
    'row' => 0,
    'i' => 0,
    'hosturl' => 0,
    'allowEditVisit' => 0,
    'isLab' => 0,
    'allowDeleteVisit' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66b9a2ed262bb8_67856257',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66b9a2ed262bb8_67856257')) {function content_66b9a2ed262bb8_67856257($_smarty_tpl) {?><table class="table table-bordered table-striped table-hover ltr dataTable">
    <thead>
        <tr>
            <th class="wds3 txtc">#</th>
            <th class="txtc">Name </th>
            <th class="wds5 txtc">Pat No.</th>
            <th class="wds5 txtc">Pat Id.</th>
            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_lang==1){?>    <th class="txtc"> Husband</th><?php }?> 
            <th class="txtc"> Mobile </th>
            <th class="txtc"> Date </th>
            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_lang==1){?>    <th class="txtc"> Patient </th><?php }?> 
            <th class="txtc"> User  </th>
            <?php if ($_smarty_tpl->tpl_vars['showBranchCol']->value==1){?>     <th class="txtc"> Branch   </th>      <?php }?> 
            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->regions==1){?>     <th class="txtc"> Region   </th>      <?php }?> 
            <th class="txtc"> Notes  </th>
            <th class="wds3 txtc"> Barcode </th>
            <th class="wds3 txtc"> Receipt </th>
            <th class="wds3 txtc"> Bill </th>
            <?php if ($_smarty_tpl->tpl_vars['labSetting']->value->job_order==1){?>     <th class="wds3 txtc">  Job Order   </th>      <?php }?> 
            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->confirm_attend==1){?>  <th class="wds6 txtc"> Attend  </th><?php }?> 
            <th class="wds3 txtc"> Whatsapp  </th>
            <th class="wds3 txtc"> Collect    </th>
            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->attend_today==1){?>  <th class="wds3 txtc"> Attended   </th><?php }?> 
            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->regions==1){?>    
            <th class="wds3 txtc"> Follow    </th>    
            <th class="wds3 txtc"> To Dr </th>    
            <?php }?> 
            <th class="wds3 txtc"> Edit</th> 
            <th class="wds3 txtc"> Del</th>
        </tr>
    </thead>
    <tbody>
        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
        <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allvisit']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value){
$_smarty_tpl->tpl_vars['row']->_loop = true;
?>
        <tr  
            <?php if ($_smarty_tpl->tpl_vars['row']->value->detectionid==9999){?>style="background-color: #efc9cc;" 
            <?php }elseif($_smarty_tpl->tpl_vars['row']->value->tempPatient==1){?> style="background-color: #e1caf4;"   
            <?php }elseif($_smarty_tpl->tpl_vars['row']->value->customer_add==1){?> style="background-color: #f1f16d;"  
            <?php }elseif($_smarty_tpl->tpl_vars['row']->value->confirm_attend==1&&$_smarty_tpl->tpl_vars['programesetting']->value->confirm_attend==1){?> style="background-color: #d0f09f;"  
            <?php }elseif($_smarty_tpl->tpl_vars['row']->value->confirm_attend==2&&$_smarty_tpl->tpl_vars['programesetting']->value->confirm_attend==1){?> style="background-color: #d1a6d1;"  
            <?php }elseif($_smarty_tpl->tpl_vars['row']->value->confirm_attend==3&&$_smarty_tpl->tpl_vars['programesetting']->value->confirm_attend==1){?> style="background-color: #fd8591;"   <?php }?> >


            <td class="txtc"> <?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
            <td class="txtc">  <?php echo $_smarty_tpl->tpl_vars['row']->value->patientName;?>
  </td>
            <td class="txtc"> <?php echo $_smarty_tpl->tpl_vars['row']->value->patientstatusno;?>
</td>
            <td class="txtc"> <?php echo $_smarty_tpl->tpl_vars['row']->value->patientNatNo;?>
</td>
            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_lang==1){?>    
            <td class="txtc"> <?php echo $_smarty_tpl->tpl_vars['row']->value->husbandname;?>
</td>
            <?php }?>
            <td class="txtc"> 
                <ul style="padding-left : unset;"> 
                    <li><?php echo $_smarty_tpl->tpl_vars['row']->value->phone;?>
</li>
                    <li><?php echo $_smarty_tpl->tpl_vars['row']->value->mobile;?>
</li>
                </ul>
            </td>
            <td class="txtc"> <?php echo $_smarty_tpl->tpl_vars['row']->value->visitdate;?>
</td>

            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_lang==1){?>    
            <td class="txtc">
                <?php if ($_smarty_tpl->tpl_vars['row']->value->for_husband==1){?> Husband 
                <?php }elseif($_smarty_tpl->tpl_vars['row']->value->for_husband==2){?>    
                <?php if ($_smarty_tpl->tpl_vars['row']->value->child_gender==1){?> Boy <?php }else{ ?> Girl  <?php }?>
                <?php if ($_smarty_tpl->tpl_vars['row']->value->child_name!=''&&$_smarty_tpl->tpl_vars['row']->value->child_name!=null){?>  (<?php echo $_smarty_tpl->tpl_vars['row']->value->child_name;?>
) <?php }?> 
                <?php }else{ ?> Wife<?php }?>
            </td>
            <?php }?> 


            <td class="txtc"> <?php echo $_smarty_tpl->tpl_vars['row']->value->user_name;?>
</td>

            <?php if ($_smarty_tpl->tpl_vars['showBranchCol']->value==1){?>    <td class="txtc"> <?php echo $_smarty_tpl->tpl_vars['row']->value->branch_name;?>
</td>      <?php }?> 
            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->regions==1){?>     <td class="txtc"> <?php echo $_smarty_tpl->tpl_vars['row']->value->subregion;?>
</td>       <?php }?> 
            <td class="txtc">   
                <?php if ($_smarty_tpl->tpl_vars['row']->value->showRedirectNote==1){?>    
                <span class="fleft ltr"> Dr Note :   </span>   <span><?php echo $_smarty_tpl->tpl_vars['row']->value->redirect_note;?>
 </span>
                <?php }?>
                <textarea class="form-control  txtc  ltr" rows="2"   placeholder="Enter more text" data-toggle="popover" 
                          data-trigger="hover" data-placement="bottom" data-content="" id="visitComment<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"><?php echo $_smarty_tpl->tpl_vars['row']->value->notes;?>
</textarea>
                <a class="label  label-primary saveVisitComment"  data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" ><i class="fa fa-save"></i></a>
            </td>

            <td class="txtc">
                <a class=" bg-green dltbtn  printLR" data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"><i class="fa fa-print"></i></a>
            </td>

            <td class="txtc">
                <a class="label  label-success printVisitRecept"  data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" ><i class="fa fa-print"></i></a>
            </td>

            <td class="txtc">
                <a class=" bg-green dltbtn  printVisitBill" data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"><i class="fa fa-print"></i></a>
            </td>

            <?php if ($_smarty_tpl->tpl_vars['labSetting']->value->job_order==1){?>   
            <td class="txtc">
                <a class=" bg-green dltbtn  printJobOrder" data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"><i class="fa fa-print"></i></a>
            </td>
            <?php }?> 

            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->confirm_attend==1){?>  
            <td class="txtc"> 
                <select class="form-control visitAttend updateElementSelect" id="confirmAttend<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" 
                        data-id="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"  data-colName="confirm_attend"  data-tableName="visits" data-ajax="1" >
                    <option value="0">Choose </option>
                    <option value="1" <?php if ($_smarty_tpl->tpl_vars['row']->value->confirm_attend==1){?>  selected  <?php }?>  style="background-color: #d0f09f ;">Confirm </option>
                    <option value="2"  <?php if ($_smarty_tpl->tpl_vars['row']->value->confirm_attend==2){?>  selected  <?php }?>   style="background-color: #d1a6d1 ;">Delay </option>
                    <option value="3"  <?php if ($_smarty_tpl->tpl_vars['row']->value->confirm_attend==3){?>  selected  <?php }?>   style="background-color: #fd8591 ;">Cancel </option>
                </select>
            </td>
            <?php }?> 


            <td class="txtc"> 
                <?php if ($_smarty_tpl->tpl_vars['row']->value->phone!=''&&$_smarty_tpl->tpl_vars['row']->value->phone!=null){?>  
                <a class="btn btn-success btn-sm" id="whatsSmsBtn"   target="_blank"
                   href="https://wa.me/+966<?php echo $_smarty_tpl->tpl_vars['row']->value->phone;?>
/?text=<?php echo $_smarty_tpl->tpl_vars['programesetting']->value->whatsapp_txt;?>
 <?php echo $_smarty_tpl->tpl_vars['row']->value->inv_link;?>
"><i class="fa fa-whatsapp"></i>  </a>
                <?php }?> 
            </td>


            <td class="txtc">  
                <a class="btn btn-success btn-sm collectIt" id="collectYes<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"  data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"   
                   data-val="1"    <?php if ($_smarty_tpl->tpl_vars['row']->value->collect==1){?> style="display: none;"       <?php }?> >Yes  </a>
                <a class="btn btn-danger btn-sm collectIt"  id="collectItNo<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"  data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"  
                   data-val="0"  <?php if ($_smarty_tpl->tpl_vars['row']->value->collect!=1){?> style="display: none;"       <?php }?> > No  </a>
            </td>


            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->attend_today==1){?>  
            <td class="txtc">  
                <a class="btn btn-danger btn-sm todayListChange" id="todayListCanc<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"  data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"   
                   data-val="0"    <?php if ($_smarty_tpl->tpl_vars['row']->value->today_list!=1){?> style="display: none;"       <?php }?> >Cancel  </a>
                <a class="btn btn-success btn-sm todayListChange"  id="todayListConf<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"  data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
"  
                   data-val="1"  <?php if ($_smarty_tpl->tpl_vars['row']->value->today_list==1){?> style="display: none;"       <?php }?> > Done  </a>

            </td>
            <?php }?> 


            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->regions==1){?>  
            <td class="txtc">
                <a class="bg-blue dltbtn"  target="_blank"
                   href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/visits.php?ac=follows&id=<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
&patientid=<?php echo $_smarty_tpl->tpl_vars['row']->value->patientid;?>
">Follow</a>
            </td>

            <td class="txtc"> 
                <?php if ($_smarty_tpl->tpl_vars['row']->value->drPhone!=''&&$_smarty_tpl->tpl_vars['row']->value->drPhone!=null){?>  
                <a class="btn btn-success btn-sm"  target="_blank"
                   href="https://wa.me/2<?php echo $_smarty_tpl->tpl_vars['row']->value->drPhone;?>
/?text=<?php echo $_smarty_tpl->tpl_vars['row']->value->drWhatsappMsg;?>
"><i class="fa fa-whatsapp"></i>  </a>
                <?php }?> 
            </td>
            <?php }?> 

            <?php if ($_smarty_tpl->tpl_vars['row']->value->tempPatient==1){?> 
            <td class="txtc">
                <a class="bg-blue dltbtn" href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patients.php?ac=edit&id=<?php echo $_smarty_tpl->tpl_vars['row']->value->patientid;?>
">Profile</a>
            </td>
            <?php }else{ ?>

            <?php if ($_smarty_tpl->tpl_vars['allowEditVisit']->value==1||($_smarty_tpl->tpl_vars['row']->value->customer_add==1&&$_smarty_tpl->tpl_vars['row']->value->service_edit!=1)){?>  
            <?php if ($_smarty_tpl->tpl_vars['row']->value->detectionid==9999){?> 
            <td class="txtc"><a class=" bg-green dltbtn  editRefundVisit" data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" id="editvisit<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
">
                    <i class="fa fa-pencil"></i>
                </a>
            </td>
            <?php }elseif($_smarty_tpl->tpl_vars['row']->value->detectionid==999){?> 
            <td class="txtc"><a class=" bg-green dltbtn  editPayValVisit" data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" id="editvisit<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
">
                    <i class="fa fa-pencil"></i>
                </a>
            </td>
            <?php }else{ ?>
            <td class="txtc"><a class=" bg-green dltbtn  editVisit" data-visitId="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" id="editvisit<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" 
                                data-isLab="<?php echo $_smarty_tpl->tpl_vars['isLab']->value;?>
"  data-orgId="<?php echo $_smarty_tpl->tpl_vars['row']->value->organization_id;?>
">
                    <i class="fa fa-pencil"></i>
                </a>
            </td>
            <?php }?>

            <?php }else{ ?>        
            <td class="txtc"></td>
            <?php }?> 
            <?php }?> 


            <?php if ($_smarty_tpl->tpl_vars['allowDeleteVisit']->value==1||($_smarty_tpl->tpl_vars['row']->value->customer_add==1&&$_smarty_tpl->tpl_vars['row']->value->service_edit!=1)){?> 
            <td class="txtc">
                <a class=" bg-red dltbtn deletevisitAjax "  data-today="0" id="deletevisit<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" data-link="visits" data-fn="del">
                    <i class="fa fa-close"></i>
                </a>
            </td>
            <?php }else{ ?>        
            <td class="txtc"></td>
            <?php }?> 
        </tr>
        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
        <?php } ?>
    </tbody>
</table>

<?php if ($_SESSION['role_id']==12){?>

<style>
    .not_lab{
        display: none;
    }
</style>

<?php }?>

<?php if ($_SESSION['role_id']==5){?>

<style>
    .not_ray_lab{
        display: none;
    }
</style>

<?php }?>


<script>
    $('.dataTable').dataTable({"order": [[0, "desc"]]});
    //   $('.visitAttend').select2();
</script>
<?php }} ?>