<?php /* Smarty version Smarty-3.1.11, created on 2025-02-11 23:54:45
         compiled from "../views/obgy/visits/detectionmodel.html" */ ?>
<?php /*%%SmartyHeaderCode:115460876367ac53c5a914b7-05252445%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '3f23bdc10f9e14fe1a984a977bd23eeb3701b8a5' => 
    array (
      0 => '../views/obgy/visits/detectionmodel.html',
      1 => 1624822076,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '115460876367ac53c5a914b7-05252445',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'patientid' => 0,
    'colName' => 0,
    'mainId' => 0,
    'maintableName' => 0,
    'programesetting' => 0,
    'alldata' => 0,
    'i' => 0,
    'mydata' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67ac53c5b872e2_68572412',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67ac53c5b872e2_68572412')) {function content_67ac53c5b872e2_68572412($_smarty_tpl) {?>
<input type="hidden" id="controllName" value="visits"/>
<input type="hidden" id="patientid" name="patientid" value="<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
"/>
<input type="hidden" id="colName" name="colName" value="<?php echo $_smarty_tpl->tpl_vars['colName']->value;?>
"/>
<input type="hidden" id="mainId" name="mainId" value="<?php echo $_smarty_tpl->tpl_vars['mainId']->value;?>
"/>
<input type="hidden" id="tablename" name="tablename" value="<?php echo $_smarty_tpl->tpl_vars['maintableName']->value;?>
"/>
<input type="hidden" id="isHospital" name="isHospital" value="<?php echo $_smarty_tpl->tpl_vars['programesetting']->value->visitsform;?>
"/>
<div class="col-md-12">
    <button type="button" class="btn btn-xs blue fright" id="addRow"><i class="fa fa-plus"></i> إضافة</button>
</div>

<div class="col-md-12">
    <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->visitsform!=1){?>
    <table  id="dtAddTbl" dir="rtl" class="wds100">
        <thead>
            <tr>
                <th class="wds50 txtc">الاسم</th>
                <th  class="wds40 txtc">القيمة</th>
                <th  class="wds10 txtc">حذف</th>
            </tr>
        </thead>
        <input type="hidden" id="dtcount" value="<?php echo count($_smarty_tpl->tpl_vars['alldata']->value);?>
">
        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
        <?php  $_smarty_tpl->tpl_vars['mydata'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['mydata']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['alldata']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['mydata']->key => $_smarty_tpl->tpl_vars['mydata']->value){
$_smarty_tpl->tpl_vars['mydata']->_loop = true;
?>
        <tr>
            <td>

                <input type="text" class="form-control updateDetectionModel"  id="allnewitem_name<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
" name="newamount_name" value='<?php echo $_smarty_tpl->tpl_vars['mydata']->value->title;?>
' >
            </td>
            <td><input type="text" class="form-control updateDetectionModel"  id="allnewitem_value<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
" name="newamount_name" value='<?php echo $_smarty_tpl->tpl_vars['mydata']->value->detectionval;?>
' ></td>
            <td>
                <a href="#" class="btn red fleft deleteelement wds100" data-id="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
" data-link="visits" data-fun="deldetection">
                    <i class="fa fa-times" ></i>
                </a>

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

    </table>

    <?php }else{ ?>

    <table  id="dtAddTbl" dir="rtl">
        <thead>
            <tr>
                <th><center>الاسم</center></th>
        <th>حذف</th>
        </tr>
        </thead>
        <input type="hidden" id="dtcount" value="<?php echo count($_smarty_tpl->tpl_vars['alldata']->value);?>
">
        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
        <?php  $_smarty_tpl->tpl_vars['mydata'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['mydata']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['alldata']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['mydata']->key => $_smarty_tpl->tpl_vars['mydata']->value){
$_smarty_tpl->tpl_vars['mydata']->_loop = true;
?>
        <tr>
            <td style="width: 100%">

                <input type="text" class="form-control updateDetectionModel"  id="allnewitem_name<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
" name="newamount_name" value='<?php echo $_smarty_tpl->tpl_vars['mydata']->value->title;?>
' >
            </td>
            <td>
                <a href="#" class="btn red fleft deleteelement" data-id="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
" data-link="visits" data-fun="deldetection">
                    <i class="fa fa-times" ></i>
                </a>

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

    </table>
    <?php }?>
</div><?php }} ?>