<?php /* Smarty version Smarty-3.1.11, created on 2023-10-31 15:31:06
         compiled from "../views/obgy/customer_service/doctor_visits.html" */ ?>
<?php /*%%SmartyHeaderCode:15185457416541019a29afc1-85053981%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a35d3f79edeeb6b37794eff158899cfc175948a8' => 
    array (
      0 => '../views/obgy/customer_service/doctor_visits.html',
      1 => 1671847222,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '15185457416541019a29afc1-85053981',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'doctorName' => 0,
    'confirmed' => 0,
    'attended' => 0,
    'programesetting' => 0,
    'visits' => 0,
    'row' => 0,
    'i' => 0,
    'waitingAvg' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6541019a318978_69929995',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6541019a318978_69929995')) {function content_6541019a318978_69929995($_smarty_tpl) {?><div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false" 
     id="drVisitsModel" style="min-width:1000px;">
    <div class="modal-dialog  modal-lg wds90">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close closeDrug" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title txtc"> <?php echo $_smarty_tpl->tpl_vars['doctorName']->value;?>
 </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">
                    <form class="form-horizontal" role="form" action="" method="post" id="gynaDrugs" enctype="multipart/form-data">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="portlet blue-hoki box">

                                    <div class="portlet-body  scroll_y showNum isheight" style="padding: 0 7px 0  7px;">
                                        <table class="table table-striped table-hover table-bordered"  id="repTable"
                                               style="direction: rtl;">
                                            <thead>
                                                <tr>
                                                    <th class="txtc">م</th>
                                                    <th class="txtc" style="width: 50px;"> التاريخ </th>
                                                    <th class="txtc" style="width: 40px;"> الوقت  </th>
                                                    <th>   RFC </th>
                                                    <th class="txtc" style="width: 150px;">اسم الحالة</th>
                                                    <th class=" txtc">رقم الحالة</th>
                                                    <th class="txtc"> الموبايل  </th>
                                                    <?php if ($_smarty_tpl->tpl_vars['confirmed']->value==1){?> 
                                                    <th class="txtc">وقت الوصول   </th>
                                                    <th class="txtc">وقت الحضور  </th>
                                                    <?php }elseif($_smarty_tpl->tpl_vars['attended']->value==1){?> 
                                                    <th class="txtc">وقت الوصول   </th>
                                                    <th class="txtc">وقت الحضور  </th>
                                                    <th class="txtc">وقت الكشف  </th>
                                                    <?php }else{ ?>
                                                    <th class="txtc">وقت الوصول   </th>
                                                    <?php }?>

                                                    <th class="txtc"> نوع الكشف </th>
                                                    <th class="txtc" style="width: 40px;"> القسم </th>
                                                    <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_lang==1){?>    
                                                    <th class="txtc"> المريض </th>
                                                    <?php }?>
                                                    <?php if ($_smarty_tpl->tpl_vars['attended']->value==1){?> 
                                                    <th class="txtc"> الإنتظار  </th>
                                                    <?php }?>
                                                </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['visits']->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>
                                                    <td> <?php echo $_smarty_tpl->tpl_vars['row']->value['visit_order'];?>
</td>
                                                    <td> <?php echo $_smarty_tpl->tpl_vars['row']->value['visitdate'];?>
</td>
                                                    <td> <?php echo $_smarty_tpl->tpl_vars['row']->value['visit_time'];?>
</td>
                                                    <td><?php echo $_smarty_tpl->tpl_vars['row']->value['rfc'];?>
</td>
                                                    <td>     
                                                        <ul style="padding-right: unset;"> 
                                                            <li><?php echo $_smarty_tpl->tpl_vars['row']->value['patientName'];?>
</li>
                                                            <li><?php echo $_smarty_tpl->tpl_vars['row']->value['husbandName'];?>
</li>
                                                        </ul> 
                                                    </td>

                                                    <td> <?php echo $_smarty_tpl->tpl_vars['row']->value['statusno'];?>
</td>

                                                    <td>     
                                                        <ul style="padding-right: 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>

                                                    <?php if ($_smarty_tpl->tpl_vars['confirmed']->value==1){?> 
                                                    <td><?php echo $_smarty_tpl->tpl_vars['row']->value['arrivedTime'];?>
   </td>
                                                    <td><?php echo $_smarty_tpl->tpl_vars['row']->value['recep_p_exit'];?>
   </td>
                                                    <?php }elseif($_smarty_tpl->tpl_vars['attended']->value==1){?> 
                                                    <td><?php echo $_smarty_tpl->tpl_vars['row']->value['arrivedTime'];?>
   </td>
                                                    <td><?php echo $_smarty_tpl->tpl_vars['row']->value['recep_p_exit'];?>
   </td>
                                                    <td> <?php echo $_smarty_tpl->tpl_vars['row']->value['kashf_enterance'];?>
  </td>
                                                    <?php }else{ ?>

                                                    <?php if ($_smarty_tpl->tpl_vars['row']->value['arrived_userid']>0){?> 
                                                    <td  id="arrivedHos<?php echo $_smarty_tpl->tpl_vars['row']->value['visitId'];?>
" ><?php echo $_smarty_tpl->tpl_vars['row']->value['arrivedTime'];?>
   </td>
                                                    <?php }else{ ?>
                                                    <td  id="arrivedHos<?php echo $_smarty_tpl->tpl_vars['row']->value['visitId'];?>
">       
                                                        <a class="btn btn-primary  btn-sm    arrivedHos" data-id="<?php echo $_smarty_tpl->tpl_vars['row']->value['visitId'];?>
"     
                                                           > وصول    </a>  
                                                    </td>
                                                    <?php }?>

                                                    <?php }?>

                                                    <td> <?php echo $_smarty_tpl->tpl_vars['row']->value['detectionName'];?>
</td>
                                                    <td> <?php echo $_smarty_tpl->tpl_vars['row']->value['deptName'];?>
</td>
                                                    <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_lang==1){?>    
                                                    <td> <?php if ($_smarty_tpl->tpl_vars['row']->value->for_husband==1){?> الزوج<?php }else{ ?> الزوجه<?php }?></td>
                                                    <?php }?>
                                                    <?php if ($_smarty_tpl->tpl_vars['attended']->value==1){?> 
                                                    <td style="direction: ltr;"> <?php echo $_smarty_tpl->tpl_vars['row']->value['waiting'];?>
</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 ($_smarty_tpl->tpl_vars['attended']->value==1){?> 
                                        <table class="table table-striped table-hover table-bordered">
                                            <td> <?php echo $_smarty_tpl->tpl_vars['waitingAvg']->value;?>
</td>
                                            <th>متوسط وقت الإنتظار </th>
                                        </table>
                                        <?php }?>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>



<script type="text/javascript" >
    $('#repTable').dataTable({
        dom: 'Blfrtip',
        buttons: [
            {
                extend: 'excel'
                , text: 'excel '
                , title: 'Cases  Excel'
            }
        ],
        "lengthMenu": [
            [10, 25, 50, 100, 150, -1],
            [10, 25, 50, 100, 150, "All"] // change per page values here
        ],
        //     "scrollX": true
    });


</script>
<?php }} ?>