<?php /* Smarty version Smarty-3.1.11, created on 2024-08-12 10:26:53
         compiled from "../views/obgy/lab/invstatus.html" */ ?>
<?php /*%%SmartyHeaderCode:32977921666b9b93d556553-83775949%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '9d53e3231e2254d6914c640ea91aacdb4b6a5f89' => 
    array (
      0 => '../views/obgy/lab/invstatus.html',
      1 => 1711873234,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '32977921666b9b93d556553-83775949',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'name' => 0,
    'statusno' => 0,
    'gender' => 0,
    'showBranchName' => 0,
    'branchName' => 0,
    'for' => 0,
    'age' => 0,
    'invLink' => 0,
    'allowChange' => 0,
    'hosturl' => 0,
    'controllname' => 0,
    'visitid' => 0,
    'patientid' => 0,
    'role_id' => 0,
    'requests' => 0,
    'data' => 0,
    'paid' => 0,
    'i' => 0,
    'visitNotes' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66b9b93d6cca61_86727465',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66b9b93d6cca61_86727465')) {function content_66b9b93d6cca61_86727465($_smarty_tpl) {?><table class="table table-striped table-hover table-bordered rtl" style="width: 98%;margin-left: 1%;margin-bottom: 10px;">
    <thead>
        <tr>
            <th class=" txtc wds10">الإسم   </th>
            <td><?php echo $_smarty_tpl->tpl_vars['name']->value;?>
</td>
            <th class=" txtc wds10">رقم الحالة    </th>
            <td class=" txtc wds15"><?php echo $_smarty_tpl->tpl_vars['statusno']->value;?>
</td>
            <th class=" txtc wds10">النوع   </th>
            <td class=" txtc wds15"><?php echo $_smarty_tpl->tpl_vars['gender']->value;?>
</td>
        </tr>
    </thead>
</table>

<table class="table table-striped table-hover table-bordered rtl" style="width: 98%;margin-left: 1%;margin-bottom: 10px;">
    <thead>
        <tr>
            <?php if ($_smarty_tpl->tpl_vars['showBranchName']->value==1){?>
            <th class=" txtc wds10">الفرع    </th>
            <td class=" txtc wds12"><?php echo $_smarty_tpl->tpl_vars['branchName']->value;?>
</td>
            <?php }?>
            <th class=" txtc wds10">الجهة    </th>
            <td><?php echo $_smarty_tpl->tpl_vars['for']->value;?>
</td>
            <th class=" txtc wds10">السن    </th>
            <td class=" txtc wds13 "><?php echo $_smarty_tpl->tpl_vars['age']->value;?>
</td>
            
            
            <?php if ($_smarty_tpl->tpl_vars['invLink']->value!=-1&&$_smarty_tpl->tpl_vars['invLink']->value!=''&&$_smarty_tpl->tpl_vars['invLink']->value!=null){?>
            <td class=" txtc wds5 ">
                <a class="btn green btn-xs fright" target="_blank" href="<?php echo $_smarty_tpl->tpl_vars['invLink']->value;?>
" style=" float: left;">
                    <i class="fa fa-external-link-square"></i> Web
                </a>
            </td>
            <?php }?>

            <?php if ($_smarty_tpl->tpl_vars['allowChange']->value==1){?>
            <td class=" txtc wds5 ">
                <a class="btn green btn-xs fright" target="_blank"
                   href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
.php?ac=showdetails&id=<?php echo $_smarty_tpl->tpl_vars['visitid']->value;?>
&patientid=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
" style=" float: left;" >
                    <i class="fa fa-pencil"></i> Report
                </a>
            </td>
            <?php }?>


            <td class=" txtc wds5 ">
                <a class="btn btn-success btn-xs printResults " data-role ="<?php echo $_smarty_tpl->tpl_vars['role_id']->value;?>
"  href="javascript:;" > <i class="fa fa-print"></i>   </a>
            </td>
        </tr>
    </thead>
    <tbody>

    </tbody>
</table>


<?php if ($_smarty_tpl->tpl_vars['allowChange']->value!=1){?>

<table class="table table-striped table-hover table-bordered" style="width: 98%;margin-left: 1%;">
    <thead>
        <tr>
            <th>
                <input type="checkbox"  class="checkAll" id="checkAll" name="invCheckAll">
            </th>
            <th class=" txtl">Test  </th>
            <th class="wds11">Sample No </th>
            <th class="wds5 txtc"> PDF</th>
            <th class=" wds20 txtc">Result</th>
            <th class="wds5 txtc"> F </th>
            <th class="wds5 txtc"> V </th>
            <th class="wds5 txtc"> P </th>
            <th class="wds5 txtc"> D </th>
            <th class="wds5 txtc"> S </th>
        </tr>
    </thead>
    <tbody id="calculationContainer">
        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['requests']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
        <tr>
            <td>
                <input type="checkbox"  class="checkGroup" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
" name="invCheck[]">
            </td>
            <td class="txtl">
                
                <?php echo $_smarty_tpl->tpl_vars['data']->value['invName'];?>
 
            </td>
                         <td class="sampleNo" >
                 <?php echo $_smarty_tpl->tpl_vars['data']->value['sample_id'];?>

 </td>
            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['pdf']!=''&&$_smarty_tpl->tpl_vars['data']->value['pdf']!='.'&&$_smarty_tpl->tpl_vars['data']->value['pdf']!=null&&$_smarty_tpl->tpl_vars['data']->value['pdf']!='no image'){?>
                <a class=" btn-xs  fright" download="<?php echo $_smarty_tpl->tpl_vars['data']->value['invName'];?>
_<?php echo $_smarty_tpl->tpl_vars['statusno']->value;?>
" 
                   href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/../upload/inv_pdf/<?php echo $_smarty_tpl->tpl_vars['statusno']->value;?>
/<?php echo $_smarty_tpl->tpl_vars['data']->value['pdf'];?>
" 
                   <?php if ($_smarty_tpl->tpl_vars['paid']->value!=1){?> style="pointer-events: none" <?php }?>   >
                    <i class="fa fa-download"></i>
                </a>
                <?php }?>
            </td>
            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['res']!=-1){?>
                <?php echo $_smarty_tpl->tpl_vars['data']->value['res'];?>
 
                <?php }?>
            </td>

            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['filled']==1){?>
                <i class="fa fa-check "   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times "       style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
            </td>

            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['verified']==1){?>
                <i class="fa fa-check "   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times "       style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
            </td>

            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['printed']==1){?>
                <i class="fa fa-check "   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times "       style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
            </td>

            <td>
                <?php if ($_smarty_tpl->tpl_vars['role_id']->value==3){?>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['delivered']==1){?>
                <i class="fa fa-check invReDeliver "      data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
" data-val="1"  data-paid="<?php echo $_smarty_tpl->tpl_vars['paid']->value;?>
" 
                   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                   data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
"   data-paid="<?php echo $_smarty_tpl->tpl_vars['paid']->value;?>
" 
                   style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
                <?php }else{ ?>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['delivered']==1){?>
                <i class="fa fa-check "   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times "       style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
                <?php }?>
            </td>

            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['sent']==1){?>
                <i class="fa fa-check "   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times "       style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
            </td>


        </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 }else{ ?>
<table class="table table-striped table-hover table-bordered" style="width: 98%;margin-left: 1%;">
    <thead>
        <tr>
            <th>
                <input type="checkbox"  class="checkAll" id="checkAll" name="invCheckAll">
            </th>
            <th class=" txtl">Test  </th>
            <th class=" wds11">Sample No </th>
            <th class="wds5 txtc"> PDF</th>
            <th class=" wds20 txtc">Result</th>
               <th class="wds5 txtc"> 
                <span class="wds100  btn btn-xs invStatusChangeAll" data-visitid="<?php echo $_smarty_tpl->tpl_vars['visitid']->value;?>
" data-colName="filled" style="font-size: 15px;"> F
                </span>
            </th>
            <th class="wds5 txtc"> 
                <span class="wds100  btn btn-xs invStatusChangeAll" data-visitid="<?php echo $_smarty_tpl->tpl_vars['visitid']->value;?>
"   
                      data-colName="verified" style="font-size: 15px;">V </span> </th>
            <th class="wds5 txtc"> P </th>
            <th class="wds5 txtc">  
                <span class="wds100  btn btn-xs invStatusChangeAll" data-visitid="<?php echo $_smarty_tpl->tpl_vars['visitid']->value;?>
"  data-paid="<?php echo $_smarty_tpl->tpl_vars['paid']->value;?>
"   
                      data-colName="delivered" style="font-size: 15px;">D </span> </th>
            <th class="wds5 txtc"> S </th>
        </tr>
    </thead>
    <tbody id="calculationContainer">
        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['requests']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
        <tr>
            <td>
                <input type="checkbox"  class="checkGroup" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
" name="invCheck[]">
            </td>
            <td class="txtl">
                

                <a target="_blank"
                   href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
.php?ac=showdetails&id=<?php echo $_smarty_tpl->tpl_vars['visitid']->value;?>
&patientid=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
" style=" float: left;" >
                    <?php echo $_smarty_tpl->tpl_vars['data']->value['invName'];?>
 
                </a>
            </td>
                         <td class="sampleNo" >
                 <?php echo $_smarty_tpl->tpl_vars['data']->value['sample_id'];?>

 </td>
            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['pdf']!=''&&$_smarty_tpl->tpl_vars['data']->value['pdf']!='.'&&$_smarty_tpl->tpl_vars['data']->value['pdf']!=null&&$_smarty_tpl->tpl_vars['data']->value['pdf']!='no image'){?>
                <a class=" btn-xs  fright" download="<?php echo $_smarty_tpl->tpl_vars['data']->value['invName'];?>
_<?php echo $_smarty_tpl->tpl_vars['statusno']->value;?>
" 
                   href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/../upload/inv_pdf/<?php echo $_smarty_tpl->tpl_vars['statusno']->value;?>
/<?php echo $_smarty_tpl->tpl_vars['data']->value['pdf'];?>
" 
                   <?php if ($_smarty_tpl->tpl_vars['paid']->value!=1){?> style="pointer-events: none" <?php }?>   >
                    <i class="fa fa-download"></i>
                </a>
                <?php }?>
            </td>
            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['res']==-1){?>
                <a href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
.php?ac=showdetails&id=<?php echo $_smarty_tpl->tpl_vars['data']->value['visitid'];?>
&patientid=<?php echo $_smarty_tpl->tpl_vars['data']->value['patientid'];?>
" 
                   target="_blank" > See Report  </a>
                <?php }else{ ?>
                <?php echo $_smarty_tpl->tpl_vars['data']->value['res'];?>
 
                <?php }?>
            </td>

            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['filled']==1){?>
                <i class="fa fa-check  invStatusChange"   data-colName="filled"  data-val="0" 
                   data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
" 
                   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times invStatusChange"   data-colName="filled"    data-val="1" 
                   data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
" 
                   style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
            </td>

            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['verified']==1){?>
                <i class="fa fa-check invStatusChange"   data-colName="verified"   data-val="0"  
                   data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
" 
                   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times invStatusChange"   data-colName="verified"    data-val="1" 
                   data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
"  
                   style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
            </td>

            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['printed']==1){?>
                <i class="fa fa-check invStatusChange"    data-colName="printed"    data-val="0"  id="invPrinted<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
" 
                   data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
" 
                   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times invStatusChange"    data-colName="printed"    data-val="1"    id="invPrinted<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
"  
                   data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
"  
                   style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
            </td>

            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['delivered']==1){?>
                <i class="fa fa-check invReDeliver "      data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
" data-val="1"  data-paid="<?php echo $_smarty_tpl->tpl_vars['paid']->value;?>
" 
                   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times invStatusChange"    data-colName="delivered"    data-val="1" 
                   data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
"   data-paid="<?php echo $_smarty_tpl->tpl_vars['paid']->value;?>
" 
                   style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
            </td>

            <td>
                <?php if ($_smarty_tpl->tpl_vars['data']->value['sent']==1){?>
                <i class="fa fa-check invStatusChange"  data-colName="sent"    data-val="0" 
                   data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
"    
                   style="color: #119866;font-size: 20px;margin-top: 5%;"></i> 
                <?php }else{ ?>
                <i class="fa fa-times invStatusChange"    data-colName="sent"    data-val="1" 
                   data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value['id'];?>
"  
                   style="color: red;font-size: 20px;margin-top: 5%;"></i> 
                <?php }?>
            </td>


        </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 }?>



<table class="table table-striped table-hover table-bordered rtl" style="width: 98%;margin-left: 1%;margin-bottom: 10px;">
    <thead>
        <tr>
            <th class=" txtc wds10">ملاحظات   </th>
            <td>
                <input type="text"   class="form-control updateElement " data-id="<?php echo $_smarty_tpl->tpl_vars['visitid']->value;?>
"  
                       data-colName="notes" data-tableName="visits"   value="<?php echo $_smarty_tpl->tpl_vars['visitNotes']->value;?>
"
                       <?php if ($_smarty_tpl->tpl_vars['allowChange']->value!=1){?> disabled=""  <?php }?>>
            </td>
        </tr>
    </thead>
</table>



<input type="hidden" id="controllName" value="invsdept"/>
<input type="hidden" id="visitId" value="<?php echo $_smarty_tpl->tpl_vars['visitid']->value;?>
" name="visitId"/>

<div id="printDiv"></div>

<div id="pdfDiv">

</div>



<script>
     $('#checkAll').click(function (event) {
        if (this.checked) {
            // Iterate each checkbox
            $('.checkGroup').each(function () {
                this.checked = true;
            });
        }
        else {
            // Iterate each checkbox
            $(".checkGroup").each(function () {
                this.checked = false;
            });
        }
    });
</script>
<?php }} ?>