<?php /* Smarty version Smarty-3.1.11, created on 2025-02-12 09:46:01
         compiled from "../views/obgy/visits/add.html" */ ?>
<?php /*%%SmartyHeaderCode:30624643767ac51b9b1f357-64379575%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'e64c9a59adea449146c7f8e1b7b387554d3cd0cd' => 
    array (
      0 => '../views/obgy/visits/add.html',
      1 => 1640065134,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '30624643767ac51b9b1f357-64379575',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'shcontrollname' => 0,
    'breadcrumbs' => 0,
    'hosturl' => 0,
    'controllname' => 0,
    'programesetting' => 0,
    'allPatients' => 0,
    'row' => 0,
    'patientid' => 0,
    'today' => 0,
    'visit_periods' => 0,
    'data' => 0,
    'i' => 0,
    'allDetections' => 0,
    'k' => 0,
    'found' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67ac51b9c6a147_31235526',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67ac51b9c6a147_31235526')) {function content_67ac51b9c6a147_31235526($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include '/home/drdalalgt4it/public_html/obgy/_library/smarty_plg/libs/plugins/modifier.date_format.php';
?><meta charset="utf8">
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!--go-->
        <!-- BEGIN PAGE HEADER--  >
        <h3 class="page-title">
            <?php echo $_smarty_tpl->tpl_vars['shcontrollname']->value;?>

        </h3>
        <div class="page-bar">
            <ul class="page-breadcrumb">
                <?php echo $_smarty_tpl->tpl_vars['breadcrumbs']->value;?>

            </ul>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12 ">

                <!-- BEGIN SAMPLE FORM PORTLET-->
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption fright">

                            الحجوزات
                        </div>
                        <div class="tools fleft">
                            <a href="#" class="collapse" title="تصغير / تكبير"></a>
                            <a class="fff bold" href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
.php?ac=show">عرض جميع  الحجوزات</a>
                        </div>
                    </div>
                    <div class="portlet-body form">

                        <!--<form method="post">-->
                        <div class="form-body">
                            <div class="clinick rtl">
                                <div class="row">
                                    <input type="hidden"    id="addVisitControl"  value="1">
                                    <input type="hidden" id="controllName" value="visits"/>
                                    <form action="#" id="myvisitform" method="post" class="awval">
                                        <div class="row">
                                            <div class="col-md-1">

                                                <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->programview==1){?> 
                                                <label for="form_control_1">رقم المريضة</label>
                                                <?php }else{ ?>
                                                <label for="form_control_1">رقم المريض</label>
                                                <?php }?>

                                                <div class="form-group  form-md-floating-label has-info">

                                                    <select  class="form-control select2me patientvisitidCheck getTotalBalance" name="patientid" id="patientvisitidNo" placeholder="اختر  " required="required">
                                                        <option value=""></option>
                                                        <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allPatients']->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;
?>
                                                        <option value="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_smarty_tpl->tpl_vars['patientid']->value==$_tmp1){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->statusno;?>
</option>
                                                        <?php } ?>

                                                    </select>

                                                </div>
                                            </div>



                                            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->visitsform!=1){?>  <div class="col-md-3"> <?php }else{ ?><div class="col-md-5">  <?php }?>

                                                    <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->programview==1){?> 
                                                    <label for="form_control_1">اسم المريضة</label>
                                                    <?php }else{ ?>
                                                    <label for="form_control_1">اسم المريض</label>
                                                    <?php }?>

                                                    <div class="form-group  form-md-floating-label has-info">

                                                        <select  class="form-control select2me patientvisitidCheck getTotalBalance" name="patientid" id="patientvisitid" placeholder="اختر  " required="required">
                                                            <option value=""></option>
                                                            <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allPatients']->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;
?>
                                                            <option value="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_smarty_tpl->tpl_vars['patientid']->value==$_tmp2){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->wifename;?>
</option>
                                                            <?php } ?>

                                                        </select>

                                                    </div>
                                                </div>


                                                <div class="col-md-2">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <!--<input class="form-control datepicker22 edited" name="visitdate"   type="text" value="<?php echo smarty_modifier_date_format(time(),'%Y-%m-%d');?>
"  id="visitdate" required disabled>-->
                                                        <input class="form-control patientvisitidCheckDate  datepicker edited"  type="text"  id="visitdate" name="visitdate" required value="<?php echo $_smarty_tpl->tpl_vars['today']->value;?>
">
                                                        <label for="form_control_1"  class="txtr">تاريخ الزيارة </label>
                                                    </div>
                                                </div>

                                                <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->visit_period==1){?> 
                                                <input type="hidden"    id="visitPeriod"  value="1">
                                                <div class="col-md-2">
                                                    <label for="form_control_1">فترة  الكشف</label>
                                                    <div class="form-group  form-md-floating-label has-info">
                                                        <select  class="form-control select2me visit_periods" name="visit_period" id="visit_period" 
                                                                 placeholder="اختر  الفترة  " required="required"  >
                                                            <option value=""></option>
                                                            <?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['visit_periods']->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;
?>
                                                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
"   <?php if ($_smarty_tpl->tpl_vars['i']->value==1){?>selected <?php }?>    ><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                            <?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 } ?>
                                                            <option value="-2" class="deleteoptincompo">حذف</option>
                                                        </select>
                                                    </div>
                                                </div>

                                                <div class="col-md-1">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input  class="form-control"  type="text" value="" id="periodPatCount" readonly="">
                                                        <label for="form_control_1"  class="txtr">  عدد الحجوزات   </label>
                                                    </div>
                                                </div>

                                                <?php }?>

                                                <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->visit_period==1){?>  
                                                <div class="col-md-3"> 
                                                    <?php }else{ ?>
                                                    <div class="col-md-6"> 
                                                        <?php }?>
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input type="text" name="notes" id="notes"    class="form-control txtc ">
                                                            <label for="notes"  class="txtr">  ملاحظات </label>
                                                        </div>
                                                    </div>



                                                </div>

                                                <div class="row">

                                                    <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->visitsform!=1){?>
                                                    <div class="col-md-3 wds20">
                                                        <label for="form_control_1">نوع الكشف</label>
                                                        <div class="form-group  form-md-floating-label has-info">
                                                            <select  class="form-control " name="detectionid" id="detectionid" placeholder="اختر نوع الكشف " required select-tableName="visits" data-tableName="visits" data-maintable = "detections" data-colName="detectionid" data-id="0">
                                                                <option value=""></option>
                                                                <?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['allDetections']->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;
?>
                                                                <?php if ($_smarty_tpl->tpl_vars['i']->value==1){?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['row']->value->detectionval;?>
<?php $_tmp3=ob_get_clean();?><?php $_smarty_tpl->tpl_vars['k'] = new Smarty_variable($_tmp3, null, 0);?><?php }?>
                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" <?php if ($_smarty_tpl->tpl_vars['i']->value==1){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                                <?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 } ?>
                                                                <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->balance==1){?>
                                                                <option value="-99" >دفع قسط </option>
                                                                <?php }?>
                                                                <option value="-1">إضافة كشف</option>
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-2 wds9">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input  class="form-control digitsOnly detectionvalue"  type="text"  id="totaldetectionvalue" value="<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
" name="totaldetectionvalue" required="required">
                                                            <label for="form_control_1"  class="txtr"> قيمة الكشف </label>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-2 wds9">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input  class="form-control digitsOnly detectionvalue"  type="text"  id="discount" value="0" name="discount" required="required">
                                                            <label for="form_control_1"  class="txtr">  الخصم </label>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-2 wds9">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input  class="form-control digitsOnly detectionvalue"  type="text"  id="detectionvalue_cash" value="<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
" name="detectionvalue_cash" required="required">
                                                            <label for="form_control_1"  class="txtr">  كاش </label>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-2 wds9">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input  class="form-control digitsOnly detectionvalue"  type="text"  id="detectionvalue_visa" value="0" name="detectionvalue_visa" required="required">
                                                            <label for="form_control_1"  class="txtr">  فيزا </label>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-2 wds9">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input  class="form-control digitsOnly"  type="text"  id="restdetectionvalue" value="0" name="restdetectionvalue" required="required" readonly="">
                                                            <label for="form_control_1"  class="txtr">  المتبقى </label>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-2 wds9">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input type="text" class="form-control  timepicker-10" 
                                                                   name="approx_time" id="approx_time"  readonly >
                                                            <label for="form_control_1"  class="txtr">  التوقيت  </label>
                                                        </div>
                                                    </div>

                                                    <?php }else{ ?>
                                                    <div class="col-md-3">
                                                        <label for="form_control_1">القسم </label>
                                                        <div class="form-group  form-md-floating-label has-info">
                                                            <select  class="form-control " name="detectionid" id="detectionid" placeholder="اختر القسم " required select-tableName="visits" data-tableName="visits" data-maintable = "detections" data-colName="detectionid" data-id="0">
                                                                <option value=""></option>
                                                                <?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['allDetections']->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;
?>
                                                                <?php if ($_smarty_tpl->tpl_vars['i']->value==1){?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['row']->value->detectionval;?>
<?php $_tmp4=ob_get_clean();?><?php $_smarty_tpl->tpl_vars['k'] = new Smarty_variable($_tmp4, null, 0);?><?php }?>
                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['row']->value->id;?>
" <?php if ($_smarty_tpl->tpl_vars['i']->value==1){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                                <?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 } ?>
                                                                <option value="-1">إضافة قسم</option>
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </div>
                                                    </div>

                                                    <?php }?>      
                                                    <div class="col-md-1 wds7">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input  class="form-control"  type="checkbox"  id="urgent" value="1" name="urgent" >
                                                            <label for="form_control_1"  class="txtr">إنتظار </label>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-1 wds6">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input  class="form-control"  type="checkbox"  id="payVisit" value="1" name="payVisit" checked="checked">
                                                            <label for="form_control_1"  class="txtr">دفع</label>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-1 wds12" style="display: none;" id="patientEditDiv">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input  class="form-control"  type="checkbox"  id="patient_edit" value="1" name="patient_edit">
                                                            <label for="patient_edit"  class="txtr">تعديل من المريض</label>
                                                        </div>
                                                    </div>


                                                    <div class="col-md-2 wds10">
                                                        <input type="submit" name="submit" id="visitaddsubmit"  <?php if ($_smarty_tpl->tpl_vars['found']->value==1){?>disabled="disabled"<?php }?> 
                                                               class="btn blue btnsve addbtnvisit " value="إضافة" />
                                                        <a class=" bg-green btn  saveEditVisit " id="saveEditVisit" 
                                                           data-visitId="0" style="display: none; margin: 17px 0 0 0;">حفظ </a>
                                                        <a class=" bg-red btn  cancelEditVisit " id="cancelEditVisit" 
                                                           data-visitId="0" style="display: none;  margin: 17px 0 0 0;">إلغاء</a>

                                                        <input type="hidden"  name="editView"  id="editView"  value="0">
                                                        <input type="hidden"  name="mVisitId"  id="mVisitId"  value="0">
                                                    </div>
                                                    <span id="checkvisitbefore" <?php if ($_smarty_tpl->tpl_vars['found']->value!=1){?>style="display: none; " <?php }?>>عفواً,لقد تمت الزيارة من قبل لهذه الحالة  </span>
                                                </div>

                                                </form>
                                                <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->balance==1){?>
                                                <div class="col-md-12 ">
                                                    <div >
                                                        <div class="portlet box blue">
                                                            <div class="portlet-title">
                                                                <div class="caption fright">
                                                                    إضافة للمبلغ  الاجمالى
                                                                </div>
                                                            </div>
                                                            <div class="portlet-body form">
                                                                <div class="col-md-2">
                                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                                        <input  class="form-control"  type="text"  id="balance" disabled="disabled" value="0">

                                                                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->programview==1){?> 
                                                                        <label for="form_control_1"  class="txtr"> المبلغ المتبقى على المريضة  </label>
                                                                        <?php }else{ ?>
                                                                        <label for="form_control_1"  class="txtr"> المبلغ المتبقى على المريض </label>
                                                                        <?php }?>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                                        <input  class="form-control digitsOnly"  type="text"  id="newBalance"  name="newBalance" value="0">
                                                                        <label for="form_control_1"  class="txtr"> المبلغ المراد إضافته </label>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-1">
                                                                    <input type="button"  id="addBalance"  value="إضافة" class="btn blue  wds100" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <!--
                                                    </div>
                                                        <!-- END SAMPLE FORM PORTLET-->
                                                    </div>
                                                    <!-- END SAMPLE FORM PORTLET-->
                                                </div>

                                                <?php }?>
                                            </div>
                                        </div>
                                </div>
                                <!--</form>-->
                            </div>
                        </div>
                    </div>

                    <div  id="lastVisitDetails"> </div>
                    <div  id="restDiv"> </div>

                    <div class="col-md-12 ">
                        <div class="todayvisit" >
                            <div class="portlet box blue">
                                <div class="portlet-title">
                                    <div class="caption fright">
                                        حجوزات  اليوم
                                    </div>
                                    <div class="tools fleft">
                                        <a href="#" class="collapse" title="تصغير / تكبير"></a>
                                        <a class="fff bold" id="showList">قائمة الإنتظار   </a>
                                        <!--a class="fff bold" href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
.php?ac=getalldepts"
                                        >تفريغ  الحجوزات</a-->
                                    </div>
                                </div>
                                <div class="portlet-body form"> 
                                    <div class="table-toolbar" style="margin-bottom: 0;">
                                        <div class="row" style="margin: 10px !important;direction: rtl;">

                                            <div class="col-md-3">
                                                <div class="form-group">
                                                    <label class="control-label ls2">التاريخ الى </label>
                                                    <input type="text"  id="date_to" value="<?php echo $_smarty_tpl->tpl_vars['today']->value;?>
" 
                                                           class="searchvisitIndex form-control  datepicker" 
                                                           placeholder="التاريخ إلى"/>                                                    
                                                </div>
                                            </div>

                                            <div class="col-md-3">
                                                <div class="form-group">
                                                    <label class=" control-label ls2">التاريخ من  </label>
                                                    <input type="text"  id="date_from" value="<?php echo $_smarty_tpl->tpl_vars['today']->value;?>
" 
                                                           class="searchvisitIndex form-control  datepicker" 
                                                           placeholder="التاريخ من "/>
                                                </div>
                                            </div>

                                            <div class="col-md-4">
                                                <div class="form-group">
                                                    <label class="control-label ls2">اسم المريضة  </label>
                                                    <input type="hidden" class="form-control searchvisitIndex"    id="patientIdRemote"  >
                                                </div>
                                            </div>

                                            <div class="col-md-2">
                                                <div class="form-group">
                                                    <label class="control-label ls2">رقم  المريضة  </label>
                                                    <input type="text"  id="statusNoRemote"  
                                                           class="form-control  txtc searchPatRemote positiveNo " >
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="visitNew">

                                    </div>
                                </div>
                            </div>
                            <!--                                           
                        </div>
                            <!-- END SAMPLE FORM PORTLET-->
                        </div>
                        <!-- END SAMPLE FORM PORTLET-->
                    </div>

                    <!-- END PAGE CONTENT-->
                </div>
            </div>
            <!-- END CONTENT -->
            <!--<div class="modal fade" id="detectionforview" tabindex="-1" role="basic" aria-hidden="true">
            
            </div>-->
            <div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"  id="edit_detectionforview">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                            <h4 class="modal-title"> Edit </h4>
                        </div>
                        <div class="modal-body">
                            <div class="portlet-body form">
                                <form action="" id="" method="post" class="form-horizontal  emptyform" >
                                    <div class="form-body">
                                        <!------===========================================------->
                                        <div>
                                            <div id="detectionforview" class=""> </div>
                                        </div>


                                        <!------===========================================------->
                                        <div class="modal-footer">
                                            <!--                                <button type="button" class="btn green" id="editmodel_submit"> Update </button>-->
                                            <button type="button" id="amountcloseinput"   class="btn default" data-dismiss="modal">Close</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                </div>
            </div>
            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->visitsform!=1){?>
            <div class="modal fade" id="detectionadd" tabindex="-1" role="basic" aria-hidden="true">
                <meta charset="utf8"/>
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button style="float: left;" type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                            <h4 class="modal-title txtr bold"> إضافة كشف </h4>
                            <span id="sucssmsg" style="display: none;">لقد تم إضافة كشف جديد</span>
                        </div>
                        <div class="modal-body modtbl"  style="margin: 15px;">
                            <from  id="form_add_detection" action="" method="post">
                                <table class="table table-bordered table-striped table-hover">
                                    <thead>
                                    <th>نوع الكشف</th>
                                    <th class="wds20">قيمة الكشف</th>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <div class="input-group wds100" >
                                                    <input type="text" class="form-control" name="detectiontp" id="detectiontp" placeholder="ادخل نوع الكشف">
                                                </div>
                                            </td>
                                            <td>
                                                <div class="input-group">
                                                    <input type="text" class="form-control positivefloat" name="detectionvl"  id="detectionvl" placeholder="ادخل قيمة الكشف">
                                                </div>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </from>

                            <div class="modal-footer">
                                <button type="button" class="btn default" data-dismiss="modal">إغلاق</button>
                                <button type="button" class="btn blue" id="detectionadd_submit" >حفظ</button>

                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>
            </div>

            <?php }else{ ?>
            <div class="modal fade" id="detectionadd" tabindex="-1" role="basic" aria-hidden="true">
                <meta charset="utf8"/>
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button style="float: left;" type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                            <h4 class="modal-title txtr bold"> إضافة قسم </h4>
                            <span id="sucssmsg" style="display: none;">لقد تم إضافة قسم جديد</span>
                        </div>
                        <div class="modal-body modtbl"  style="margin: 15px;">
                            <from  id="form_add_detection" action="" method="post">
                                <table class="table table-bordered table-striped table-hover">
                                    <thead>
                                    <th>اسم القسم</th>
                                    <th style="display: none;" >قيمة الكشف</th>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <div class="input-group wds100" >
                                                    <input type="text" class="form-control" name="detectiontp" id="detectiontp" placeholder="ادخل اسم القسم">
                                                </div>
                                            </td>
                                            <td style="display: none;"> 
                                                <div class="input-group">
                                                    <input type="text" class="form-control positivefloat" name="detectionvl" value="0" id="detectionvl" placeholder="ادخل قيمة الكشف">
                                                </div>
                                            </td>

                                        </tr>
                                    </tbody>
                                </table>
                            </from>

                            <div class="modal-footer">
                                <button type="button" class="btn default" data-dismiss="modal">إغلاق</button>
                                <button type="button" class="btn blue" id="detectionadd_submit" >حفظ</button>

                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>
            </div>
            <?php }?>



            <div id="editModalDiv"></div>
            <div id="waitingListDiv"> </div><?php }} ?>