<?php /* Smarty version Smarty-3.1.11, created on 2024-08-12 12:05:44
         compiled from "../views/obgy/patients/edit.html" */ ?>
<?php /*%%SmartyHeaderCode:214232822766b9d068cc3c88-37233340%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '526f7d4ce9f243a1e823075f29773026879c54c5' => 
    array (
      0 => '../views/obgy/patients/edit.html',
      1 => 1722919782,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '214232822766b9d068cc3c88-37233340',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'shcontrollname' => 0,
    'programesetting' => 0,
    'hasWife' => 0,
    'addTime' => 0,
    'addDate' => 0,
    'hosturl' => 0,
    'controllname' => 0,
    'programesettingex' => 0,
    'getOnePatient' => 0,
    'treeId' => 0,
    'allowEditRfc' => 0,
    'branches' => 0,
    'data' => 0,
    'allTypes' => 0,
    'row' => 0,
    'datewifebirth' => 0,
    'wAge' => 0,
    'wifejobs' => 0,
    'wifestatus' => 0,
    'mirragefromy' => 0,
    'mirragefromm' => 0,
    'education' => 0,
    'wifebl' => 0,
    'governorates' => 0,
    'governorate_centers' => 0,
    'refer' => 0,
    'py_all_doc' => 0,
    'nationality' => 0,
    'religion' => 0,
    'hasHus' => 0,
    'husbandtypes' => 0,
    'datehusbirth' => 0,
    'hAge' => 0,
    'husbandjobs' => 0,
    'husstatus' => 0,
    'hnationality' => 0,
    'hreligion' => 0,
    'childs' => 0,
    'child' => 0,
    'orgPatNos' => 0,
    'orgPatNo' => 0,
    'organizations' => 0,
    'birthNotifications' => 0,
    'i' => 0,
    'knownfrom' => 0,
    'allImgs' => 0,
    'patientId' => 0,
    'statusno' => 0,
    'allPdf' => 0,
    'allDoc' => 0,
    'voiceRecord' => 0,
    'voiceExt' => 0,
    'userName' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66b9d06a90fb46_37203658',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66b9d06a90fb46_37203658')) {function content_66b9d06a90fb46_37203658($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include '/home/naslabcom/public_html/lab/_library/smarty_plg/libs/plugins/modifier.date_format.php';
?><meta charset="utf8">
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-- >
        <h3 class="page-title">
            <?php echo $_smarty_tpl->tpl_vars['shcontrollname']->value;?>

        </h3>

        <!--<meta charset="utf8">-->

        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12 ">
                <!-- BEGIN SAMPLE FORM PORTLET-->
                <div class="portlet box blue placeholderlabel editx">
                    <div class="portlet-title">
                        <div class="caption fright">
                            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_type==2||$_smarty_tpl->tpl_vars['programesetting']->value->system_lang==2){?>    بيانات الحالة  <?php }else{ ?>        بيانات الزوجة   <?php }?>      
                            <input type="checkbox" id="wifeData" name="wifeData"
                                   class="md-check" value="1"  <?php if ($_smarty_tpl->tpl_vars['hasWife']->value==1){?> checked="" <?php }?> >
                        </div>
                        <!--                        <div class="caption fright" style="margin-right: 5px; font-weight: bold;">
                                                    (تاريخ الاضافة : <?php echo $_smarty_tpl->tpl_vars['addTime']->value;?>
 - <?php echo $_smarty_tpl->tpl_vars['addDate']->value;?>
 )
                                                </div>-->
                        <div class="tools fleft">
                            <a href="#" class="collapse">
                            </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">عرض جميع المرضى <i class="fa fa-users"></i>   </a>
                        </div>
                    </div>
                    <div class="portlet-body form">
                        <form action="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
.php?ac=update" method="post"  enctype="multipart/form-data" id="addfinishForm"  data-ng-app="demo" data-ng-controller="DemoFileUploadController" data-file-upload="options" data-ng-class="{'fileupload-processing': processing() || loadingFiles}">
                            <div class="form-body">
                                <div class="clinick rtl">
                                    <div class="row">
                                        <div class="col-md-12 txtc" style="    background-color: bisque;">
                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->revisioned==1){?>
                                            <div class="col-md-2">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info"   style="padding-top: 0px;">
                                                    <input class="form-control  mask_date_new   " name="revision_date"
                                                           type="text"   value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->revision_date;?>
" />
                                                </div>
                                            </div>


                                            <div class="md-checkbox-inline col-md-1">
                                                <div class="md-checkbox">
                                                    <input type="checkbox" id="revisioned" class="md-check" name="revisioned" 
                                                           value="1"  <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->revisioned==1){?>   checked="" <?php }?> >
                                                    <label for="revisioned">
                                                        <span></span>
                                                        <span class="check"></span>
                                                        <span class="box"></span>
                                                        Revisioned  </label>
                                                </div>
                                            </div>
                                            <?php }?>

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->vip==1){?>
                                            <div class="md-checkbox-inline col-md-1">
                                                <div class="md-checkbox">
                                                    <input type="checkbox" id="vip" class="md-check" name="vip" 
                                                           value="1"  <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->vip==1){?>   checked="" <?php }?> >
                                                    <label for="vip">
                                                        <span></span>
                                                        <span class="check"></span>
                                                        <span class="box"></span>
                                                        VIP  </label>
                                                </div>
                                            </div>

                                            <div class="col-md-6">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info" 
                                                     style="padding-top: 0px;">
                                                    <input type="text" name="vip_comment" class="form-control "  
                                                           value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->vip_comment;?>
"/>
                                                </div>
                                            </div>

                                            <?php }?>

                                            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_lang==2){?>       
                                            <input type="hidden" id="controllName" value="invoffers"/>
                                            <div class="col-md-2">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info" style=" padding-top: 0; ">
                                                    <div class="md-radio-inline ltr ">
                                                        <div class="md-radio">
                                                            <input type="radio" id="gender0" name="gender" 
                                                                   class="md-radiobtn updateElement"  data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"  value="0"   
                                                                   data-colName="gender" data-tableName="patients"   
                                                                   <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->gender==0){?>checked  <?php }?>>
                                                            <label for="gender0">
                                                                <span></span>
                                                                <span class="check"></span>
                                                                <span class="box"></span>
                                                                أنثى      </label>
                                                        </div>
                                                        <div class="md-radio"  style="margin-right: 25px;">
                                                            <input type="radio" id="gender1" name="gender" 
                                                                   class="md-radiobtn updateElement"  data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"     value="1"
                                                                   data-colName="gender" data-tableName="patients" 
                                                                   <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->gender==1){?>checked  <?php }?>   >
                                                            <label for="gender1">
                                                                <span></span>
                                                                <span class="check"></span>
                                                                <span class="box"></span>
                                                                ذكر </label>
                                                        </div>
                                                    </div>
                                                    <span class="input-group-addon go2r bold">النوع </span>
                                                </div>
                                            </div>
                                            <?php }?>   
                                            
                                            <div class="col-md-2">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info" style=" padding-top: 0; ">
                                                    <div class="md-radio-inline ltr ">
                                                        <div class="md-radio"  style="margin-right: 25px;">
                                                            <input type="radio" id="saudi1" name="saudi" 
                                                                   class="md-radiobtn updateElement"  data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"     value="1"
                                                                   data-colName="saudi" data-tableName="patients" 
                                                                   <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->saudi==1){?>checked  <?php }?>   >
                                                            <label for="saudi1">
                                                                <span></span>
                                                                <span class="check"></span>
                                                                <span class="box"></span>
                                                                غير سعودي </label>
                                                        </div>
                                                        <div class="md-radio">
                                                            <input type="radio" id="saudi0" name="saudi" 
                                                                   class="md-radiobtn updateElement"  data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"  value="0"   
                                                                   data-colName="saudi" data-tableName="patients"   
                                                                   <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->saudi==0){?>checked  <?php }?>>
                                                            <label for="saudi0">
                                                                <span></span>
                                                                <span class="check"></span>
                                                                <span class="box"></span>
                                                                سعودي      </label>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <input type="hidden" name="treeId" id="treeId" value="<?php echo $_smarty_tpl->tpl_vars['treeId']->value;?>
"/>
                                        <input type="hidden" id="PatientAdd" value="1"/>
                                        <div class="col-md-1">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info" id="wifestatuscontain">
                                                <input type="text" name="statusno" id="statusno" class="form-control statusno_edit_check"  
                                                       value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->statusno;?>
" required="required" readonly>
                                                <label for="form_control_1" class="txtc">
                                                    <!--رقم الحالة-->
                                                </label>
                                                <span  id="lb_ckwifestatusno" class="help-block clrred" style="display: none;">هذا الرقم موجود من قبل</span>
                                            </div>
                                        </div>

                                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->rfc==1){?>
                                        <div class="col-md-1">
                                            <div class="form-group  form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">RFC</label>
                                                <select class="form-control  select2h"  required   name="wrfc"  id="wrfc" 
                                                        <?php if ($_smarty_tpl->tpl_vars['allowEditRfc']->value!=1){?>  disabled  <?php }?>>
                                                    <option value=""></option>
                                                    <option value="1" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->wrfc==1){?> selected <?php }?> >Yes</option>
                                                    <option value="2" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->wrfc==2){?> selected <?php }?> >No</option>
                                                </select>
                                            </div>
                                        </div>
                                        <?php }?>

                                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->branches==1){?>
                                        <div class="col-md-2">
                                            <div class="form-group  form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">Branch</label>
                                                <select class="form-control   select2h"  required
                                                        name="branch_id"  id="branch_id">
                                                    <option value=""></option>
                                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['branches']->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['getOnePatient']->value->branch_id==$_smarty_tpl->tpl_vars['data']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                    <?php } ?>
                                                </select>
                                            </div>
                                        </div>
                                        <?php }?>


                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->wiftypeid==1){?>
                                        <div class="col-md-2">
                                            <div class="form-group  form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">
                                                    الصفة

                                                </label>
                                                <select  class="form-control  wTypes" name="wifetype"  id="wifetype" >
                                                    <option value=""></option>
                                                    <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allTypes']->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 if ($_smarty_tpl->tpl_vars['row']->value->id==$_smarty_tpl->tpl_vars['getOnePatient']->value->wiftypeid){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                    <?php } ?>
                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                    <option value="0" class="deleteoptincompo">حذف</option><?php }?>
                                                </select>
                                            </div>
                                        </div>
                                        <?php }?>

                                        <div class="col-md-4">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info" id="wifenamecontain">
                                                <input type="text" id="wifename"  name="wifename"  class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->wifename;?>
"   <?php if ($_smarty_tpl->tpl_vars['hasWife']->value==1){?> required <?php }?> >
                                                <label for="form_control_1" class="txtc">
                                                    الإسم
                                                </label>
                                                <span  id="lb_ckwifename" class="help-block clrred" style="display: none;">هذا الاسم موجود من قبل</span>
                                            </div>
                                        </div>



                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->dateofbirth==1){?>
                                        <div class="col-md-1">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">

                                                <input class="form-control calcdatew mask_date_new txtl"  
                                                       data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
" type="text" data-colresult="wifeage"  
                                                       id="dateofbirth_cc" name="dateofbirth" value="<?php echo $_smarty_tpl->tpl_vars['datewifebirth']->value;?>
" />


                                                <label for="form_control_1" class="txtc">
                                                    <!--تاريخ الميلاد-->
                                                </label>
                                                <span class="input-group-addon go2r">تاريخ الميلاد </span>
                                            </div>
                                        </div>
                                        <?php }?>

                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->wifeage==1){?>
                                        <div class="col-md-1">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                <input type="text" class="form-control "  name="wifeage"  id="wifeage" value="<?php echo $_smarty_tpl->tpl_vars['wAge']->value;?>
"/>

                                                <label for="form_control_1" class="txtc"></label>
                                                <span class="input-group-addon go2r">السن</span>
                                            </div>
                                        </div>
                                        <?php }?>

                                    </div>
                                    <div class="row">
                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->wifenationalid==1){?>
                                        <div class="col-md-3">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info" id="wifenationalidcontain">
                                                <input type="text" class="form-control digitsOnly" data-ptname="wifenationalid"    
                                                       data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"  
                                                       <?php if ($_SESSION['role_id']!=19&&$_smarty_tpl->tpl_vars['programesetting']->value->national_id_req==1){?> required <?php }?>   
                                                name="wifenationalid" id="wifenationalid"  
                                                value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->wifenationalid;?>
"/>
                                                <label for="form_control_1" class="txtc">رقم البطاقة</label>
                                                <span  id="lb_ckeckwifenationalid" class="help-block clrred" style="display: none;"></span>
                                            </div>
                                        </div>
                                        <?php }?>

                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->passport==1){?>
                                        <div class="col-md-2">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info" id="passportcontain">
                                                <input type="text" class="form-control" data-ptname="passport"    data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                       name="passport" id="passport"  value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->passport;?>
"/>
                                                <label for="form_control_1" class="txtc">جواز السفر</label>
                                                <span  id="lb_ckeckpassport" class="help-block clrred" style="display: none;"></span>
                                            </div>
                                        </div>
                                        <?php }?>

                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->wifejob==1){?>
                                        <div class="col-md-3">
                                            <div class="form-group  form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">الوظيفة</label>
                                                <select class="form-control  wjob"  data-ptname="wifejob" name="wifejob"  id="wifejob" placeholder="">
                                                    <option value="">لايوجد</option>
                                                    <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['wifejobs']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->wifejob==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                    <?php } ?>
                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                    <option value="0" class="deleteoptincompo"> حذف </option><?php }?>
                                                </select>
                                            </div>
                                        </div>
                                        <?php }?>

                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->statuesid==1){?>
                                        <div class="col-md-2">
                                            <div class="form-group form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">الحالة الإجتماعية</label>
                                                <select class="form-control  wstatus"  data-ptname="statuesid" name="wifestatus" id="wifestatus" placeholder="" style="width: 150px !important">
                                                    <option value="">لايوجد</option>
                                                    <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['wifestatus']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->statuesid==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                    <?php } ?>
                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                    <option value="0" class="deleteoptincompo">حذف</option><?php }?>
                                                </select>
                                            </div>
                                        </div>
                                        <?php }?>

                                        <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->statuesid==1){?>
                                        <div class="displaynot"  style="display: none;"  >
                                            <?php }else{ ?>
                                            <div class="displaynot">
                                                <?php }?>

                                                <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->mirragefromy==1){?>
                                                <div class="col-md-1">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">

                                                        <input type="text" name="mirragefromy"  min="0" class="form-control digitsOnly"  data-ptname="mirragefromy" id="mirragefromy"  value="<?php echo $_smarty_tpl->tpl_vars['mirragefromy']->value;?>
" />
                                                        <label id="husbandLive"  for="form_control_1" class="txtc"> </label>
                                                        <span class="input-group-addon go2leftlabel">سنة </span>
                                                    </div>
                                                </div>
                                                <?php }?>

                                                <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->mirragefromm==1){?>
                                                <div class="col-md-1">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">

                                                        <input type="text" name="mirragefromm" min="0" max="12" class="form-control digitsOnly"  data-ptname="mirragefromm"  id="mirragefromm" value="<?php echo $_smarty_tpl->tpl_vars['mirragefromm']->value;?>
" />
                                                        <label id="husbandLive"  for="form_control_1" class="txtr"> </label>
                                                        <span class="input-group-addon go2leftlabel">شهر</span>
                                                    </div>
                                                </div>
                                                <?php }?>

                                                <!--div class="col-md-1">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">

                                                        <input type="text" name="boyson" class="form-control " data-ptname="boyson" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->boyson;?>
"/>


                                                        <label for="form_control_1" class="txtc">&nbsp;</label>
                                                        <span class="input-group-addon go2leftlabel">ذكور</span>
                                                    </div>
                                                </div>
                                                <div class="col-md-1">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input type="text" name="girlson" class="form-control "  data-ptname="girlson" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->girlson;?>
"/>
                                                        <label for="form_control_1" class="txtc">&nbsp;</label>
                                                        <span class="input-group-addon go2leftlabel">إناث</span>
                                                    </div>
                                                </div-->
                                            </div>


                                        </div>
                                        <div class="row">

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->wifeeducation==1){?>
                                            <div class="col-md-4">
                                                <div class="form-group  form-md-floating-label has-info">
                                                    <label for="form_control_1" class="txtc">التعليم</label>
                                                    <select class="form-control  edu" data-ptname="wifeeducation" name="education" id="education"  placeholder="">
                                                        <option value=""></option>
                                                        <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['education']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->wifeeducation==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                        <?php } ?>
                                                        <?php if ($_SESSION['role_id']!=3){?>
                                                        <option value="0" class="deleteoptincompo">حذف</option><?php }?>
                                                    </select>

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


                                            <div class="col-md-2 ">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    <input type="text" name="phone" id="phone" 
                                                           class="form-control digitsOnly" required
                                                           data-ptname="phone"   value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->phone;?>
">
                                                    <span id="lb_ckphone" class="help-block clrred"
                                                          style="display: none;">هذا الرقم موجود من قبل</span>
                                                    <label for="form_control_1" class="txtc">الموبايل 1</label>
                                                </div>
                                            </div>

                                            <div class="col-md-2 ">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    <input type="text" name="mobile"  
                                                           class="form-control digitsOnly"
                                                           id="mobile"  data-ptname="mobile"   value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->mobile;?>
">
                                                    <span id="lb_ckmobile" class="help-block clrred"
                                                          style="display: none;">هذا الرقم موجود من قبل</span>

                                                    <label for="form_control_1" class="txtc">الموبايل 2</label>
                                                </div>
                                            </div>

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->wifebl==1){?>
                                            <div class="col-md-2 ">
                                                <div class="form-group form-md-floating-label has-info">
                                                    <label for="form_control_1" class="txtc">فصيلة الدم</label>
                                                    <select class="form-control  bloodtype "  data-ptname="wifebl" id="bloodtype" name="wifebl"   placeholder="">
                                                        <option value=""></option>
                                                        <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['wifebl']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->wifebl==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                        <?php } ?>
                                                        <?php if ($_SESSION['role_id']!=3){?>
                                                        <option value="0" class="deleteoptincompo">حذف</option><?php }?>
                                                    </select>
                                                </div>
                                            </div>
                                            <?php }?>

                                        </div>


                                        <div class="row">

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->governorate==1){?>
                                            <div class="col-md-4">
                                                <div class="form-group  form-md-floating-label has-info">
                                                    <label for="form_control_1" class="txtc">المحافظة </label>
                                                    <select class="form-control   governorate"  name="governorate" id="governorate" data-ptname="governorate">
                                                        <option value=""></option>
                                                        <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['governorates']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->governorate==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->name;?>

                                                        </option>
                                                        <?php } ?>
                                                        <?php if ($_SESSION['role_id']!=3){?>
                                                        <option value="0" class="deleteoptincompo">حذف</option><?php }?>
                                                    </select>

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

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->governorate_center==1){?>
                                            <div class="col-md-4">
                                                <div class="form-group  form-md-floating-label has-info">
                                                    <label for="form_control_1" class="txtc">المركز </label>
                                                    <select class="form-control   governorate_centers"  name="governorate_center" 
                                                            id="governorate_centers"    data-ptname="governorate_center">
                                                        <option value=""></option>
                                                        <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['governorate_centers']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->governorate_center==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->name;?>

                                                        </option>
                                                        <?php } ?>
                                                        <?php if ($_SESSION['role_id']!=3&&$_smarty_tpl->tpl_vars['getOnePatient']->value->governorate>0){?>
                                                        <option value="0" class="deleteoptincompo">حذف</option><?php }?>
                                                    </select>

                                                </div>
                                            </div>
                                            <?php }?>
                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->address==1){?>
                                            <div class="col-md-4">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    <input type="text" name="address" class="form-control "  data-ptname="address" 
                                                           value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->address;?>
">
                                                    <label for="form_control_1" class="txtc">العنوان</label>
                                                </div>
                                            </div>
                                            <?php }?>
                                        </div>

                                        <div class="row">

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->importantnote==1){?>
                                            <div class="col-md-6">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    <input type="text" name="importantnote" class="form-control "  data-ptname="importantnote"  value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->importantnote;?>
"/>
                                                    <label for="form_control_1" class="txtc"> ملاحظات هامة</label>
                                                </div>
                                            </div>
                                            <?php }?>

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->spacialnotes==1){?>
                                            <div class="col-md-6">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    <input type="text" name="spacialnotes" class="form-control "  data-ptname="spacialnotes" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->spacialnotes;?>
"/>

                                                    <label for="form_control_1" class="txtc"> عادات خاصة</label>
                                                </div>
                                            </div>
                                            <?php }?>
                                        </div>

                                        <div class="row">
                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->risk==1){?>
                                            <div class="col-md-10">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    <input type="text" name="risk" class="form-control "  data-ptname="risk" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->risk;?>
"/>

                                                    <label for="form_control_1" class="txtc">نوع الخطورة</label>
                                                </div>
                                            </div>
                                            <?php }?>

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->risktype==1){?>
                                            <div class="col-md-2">
                                                <div class="form-group form-md-floating-label has-info">
                                                    <label for="form_control_1" class="txtr">درجة الخطورة</label>
                                                    <select class="form-control  updatelastptID" data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
" 
                                                            data-ptname="risktype" name="risktype" placeholder="">
                                                        <!--<option value="">اختر درجة الخطورة</option>-->
                                                        <option value="1" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->risktype==1){?>selected<?php }?>>منخفض</option>
                                                        <option value="2" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->risktype==2){?>selected<?php }?>>متوسط</option>
                                                        <option value="3" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->risktype==3){?>selected<?php }?>>مرتفع </option>

                                                    </select>
                                                </div>
                                            </div>
                                            <?php }?>

                                        </div>
                                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_type==1||$_smarty_tpl->tpl_vars['programesetting']->value->system_type==3||$_smarty_tpl->tpl_vars['programesetting']->value->system_type==4){?>
                                        <div class="row">

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->refer_doctor==1){?>
                                            <div class="col-md-2">
                                                <div class="form-group form-md-floating-label has-info">
                                                    <label for="form_control_1" class="txtc">محولة  من </label>
                                                    <select class="form-control  editData refer_doctor "
                                                            data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                            data-ptname="refer_doctor" name="refer_doctor" <?php if ($_smarty_tpl->tpl_vars['hasWife']->value==1){?> required <?php }?>
                                                            id="refer_doctor">
                                                        <option value=""></option>
                                                        <option value="-1" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->refer_doctor==-1){?>selected<?php }?>>لا يوجد</option>
                                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['refer']->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['getOnePatient']->value->refer_doctor==$_smarty_tpl->tpl_vars['data']->value->id&&$_smarty_tpl->tpl_vars['getOnePatient']->value->refer_doctor_tb==0){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                        <?php } ?>

                                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['py_all_doc']->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['user_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->refer_doctor==$_smarty_tpl->tpl_vars['data']->value['user_id']&&$_smarty_tpl->tpl_vars['getOnePatient']->value->refer_doctor_tb==1){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value['name'];?>
</option>
                                                        <?php } ?>


                                                        <?php if ($_SESSION['role_id']!=3){?>
                                                        <option value="0" class="deleteoptincompo">حذف</option>
                                                        <?php }?>
                                                    </select>
                                                </div>
                                            </div>
                                            <?php }?>

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->nationality==1){?>
                                            <div class="col-md-2">
                                                <div class="form-group form-md-floating-label has-info">
                                                    <label for="form_control_1" class="txtc">الجنسية </label>
                                                    <select class="form-control  editData nationality "
                                                            data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                            data-ptname="nationality" name="nationality"
                                                            id="nationality">
                                                        <option value=""></option>
                                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['nationality']->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['getOnePatient']->value->nationality==$_smarty_tpl->tpl_vars['data']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                        <?php } ?>
                                                        <?php if ($_SESSION['role_id']!=3){?>
                                                        <option value="0" class="deleteoptincompo">حذف</option>
                                                        <?php }?>
                                                    </select>
                                                </div>
                                            </div> <?php }?>

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->religion==1){?>
                                            <div class="col-md-2">
                                                <div class="form-group form-md-floating-label has-info">
                                                    <label for="form_control_1" class="txtc">الديانة </label>
                                                    <select class="form-control  editData religion "
                                                            data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                            data-ptname="religion" name="religion"
                                                            id="religion">
                                                        <option value=""></option>
                                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['religion']->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['getOnePatient']->value->religion==$_smarty_tpl->tpl_vars['data']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                        <?php } ?>
                                                        <?php if ($_SESSION['role_id']!=3){?>
                                                        <option value="0" class="deleteoptincompo">حذف</option>
                                                        <?php }?>
                                                    </select>
                                                </div>
                                            </div>
                                            <?php }?>

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->doctor1==1){?>
                                            <div class="col-md-3">
                                                <div class="form-group form-md-floating-label has-info">
                                                    <label for="form_control_1" class="txtc">الطبيب المعالج 1 </label>
                                                    <select class="form-control select2 "
                                                            data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                            data-ptname="doctor1" name="doctor1" <?php if ($_smarty_tpl->tpl_vars['hasWife']->value==1){?> required <?php }?>
                                                            id="doctor1">
                                                        <option value=""></option>
                                                        <option value="-1" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->doctor1==-1){?>selected<?php }?>>لا يوجد</option>
                                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['py_all_doc']->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['user_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->doctor1==$_smarty_tpl->tpl_vars['data']->value['user_id']){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value['name'];?>
</option>
                                                        <?php } ?>
                                                    </select>
                                                </div>
                                            </div>
                                            <?php }?>

                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->doctor2==1){?>
                                            <div class="col-md-3">
                                                <div class="form-group form-md-floating-label has-info">
                                                    <label for="form_control_1" class="txtc">الطبيب المعالج 2 </label>
                                                    <select class="form-control "
                                                            data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                            data-ptname="doctor2" name="doctor2"
                                                            id="doctor2">
                                                        <option value=""></option>
                                                        <option value="-1" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->doctor2==-1){?>selected<?php }?>>لا يوجد</option>
                                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['py_all_doc']->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['user_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->doctor2==$_smarty_tpl->tpl_vars['data']->value['user_id']){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value['name'];?>
</option>
                                                        <?php } ?>
                                                    </select>
                                                </div>
                                            </div>
                                            <?php }?>

                                        </div>
                                        <?php }?>

                                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_lang!=2){?>

                                        <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->statuesid==1||$_smarty_tpl->tpl_vars['getOnePatient']->value->statuesid==4){?>
                                        <div class="hiddenforsng"  style="display: none;"  >
                                            <?php }elseif($_smarty_tpl->tpl_vars['getOnePatient']->value->statuesid==3){?>
                                            <div class="hiddenforsng"  style="display: none;"  >
                                                <?php }else{ ?>
                                                <div class="hiddenforsng">
                                                    <?php }?>
                                                    <div class="portlet box blue portletcustom">
                                                        <div class="portlet-title">
                                                            <div class="caption fright">

                                                                <input type="checkbox" id="HusData" name="HusData"
                                                                       class="md-check" value="1" <?php if ($_smarty_tpl->tpl_vars['hasHus']->value==1){?> checked="" <?php }?>  >
                                                                بيانات الزوج
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row">

                                                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->rfc==1){?>
                                                        <div class="col-md-1">
                                                            <div class="form-group  form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc">RFC</label>
                                                                <select class="form-control select2h"  required    name="rfc"  id="rfc"    
                                                                        <?php if ($_smarty_tpl->tpl_vars['allowEditRfc']->value!=1){?> disabled  <?php }?> >
                                                                    <option value=""></option>
                                                                    <option value="1" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->rfc==1){?> selected <?php }?> >Yes</option>
                                                                    <option value="2" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->rfc==2){?> selected <?php }?> >No</option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>


                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->husbandtypeid==1){?>
                                                        <div class="col-md-2">
                                                            <div class="form-group form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc"> الصفة</label>
                                                                <select class="form-control  htype"  name="husbandtypeid" data-ptname="husbandtypeid" id="husbandtype" placeholder="">
                                                                    <option value=""></option>
                                                                    <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['husbandtypes']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->husbandtypeid==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                                    <?php } ?>
                                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                                    <?php }?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>


                                                        <div class="col-md-4">
                                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                                <input type="text" name="husdandname" class="form-control" 
                                                                       <?php if ($_smarty_tpl->tpl_vars['hasHus']->value==1){?> required <?php }?>    id="husdandname"
                                                                       data-ptname="husdandname" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->husdandname;?>
"/>
                                                                <label for="form_control_1" class="txtc"> اسم الزوج</label>
                                                            </div>
                                                        </div>

                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->husbanddateofbirth==1){?>
                                                        <div class="col-md-3">
                                                            <div class="form-group form-md-line-input form-md-floating-label has-info">

                                                                <input class="calcdatehusband mask_date_new form-control  "  
                                                                       data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
" type="text" id="husbanddateofbirth" 
                                                                       name="husbanddateofbirth" value="<?php echo $_smarty_tpl->tpl_vars['datehusbirth']->value;?>
"/>

                                                                <label for="form_control_1"></label>
                                                                <span class="input-group-addon go2r">تاريخ الميلاد </span>
                                                            </div>
                                                        </div>
                                                        <?php }?>

                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->husbandage==1){?>
                                                        <div class="col-md-2">
                                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                                <input type="text" class="form-control "  data-ptname="husbandage" name="husbandage" id="husbandage" value="<?php echo $_smarty_tpl->tpl_vars['hAge']->value;?>
"/>
                                                                <label for="form_control_1" class="txtc"></label>
                                                                <span class="input-group-addon go2r">السن </span>
                                                            </div>
                                                        </div>
                                                        <?php }?>
                                                    </div>
                                                    <div class="row">

                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->husbandnationalid==1){?>
                                                        <div class="col-md-3">
                                                            <div class="form-group form-md-line-input form-md-floating-label has-info" id="husbandnationalidcontent">
                                                                <input type="text" class="form-control digitsOnly"  data-ptname="husbandnationalid" 
                                                                       data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"    
                                                                       name="husbandnationalid" id="husbandnationalid" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->husbandnationalid;?>
"/>
                                                                <label for="form_control_1" class="txtc">رقم البطاقة </label>
                                                                <span  id="lb_ckeckhusbandnationalid" class="help-block clrred" style="display: none;"></span>
                                                            </div>
                                                        </div>
                                                        <?php }?>


                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->husbandeducation==1){?>
                                                        <div class="col-md-3">
                                                            <div class="form-group form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc">تعليم الزوج</label>
                                                                <select class="form-control  edu"  data-ptname="husbandeducation" name="husbandeducation" id="educationhus" placeholder="">
                                                                    <option value=""></option>
                                                                    <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['education']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->husbandeducation==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                                    <?php } ?>
                                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                                    <?php }?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>

                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->husbandjob==1){?>
                                                        <div class="col-md-3">
                                                            <div class="form-group form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc">الوظيفة</label>
                                                                <select class="form-control  hjob "  data-ptname="husbandjob" name="husbandjob" id="husbandjob" placeholder="">
                                                                    <option value=""></option>
                                                                    <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['husbandjobs']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->husbandjob==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                                    <?php } ?>
                                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                                    <?php }?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>


                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->husbandbl==1){?>
                                                        <div class="col-md-3">
                                                            <div class="form-group form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc">فصيلة الدم</label>
                                                                <select class="form-control  bloodtype "  data-ptname="husbandbl" name="husbandbl" id="bloodtypehus" placeholder="">
                                                                    <option value=""></option>
                                                                    <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['wifebl']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->husbandbl==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                                    <?php } ?>
                                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                                    <?php }?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>

                                                    </div>
                                                    <div class="row">

                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->hus_statuesid==1){?>
                                                        <div class="col-md-3">
                                                            <div class="form-group form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc">الحالة الإجتماعية</label>
                                                                <select class="form-control  hstatus"  data-ptname="hus_statuesid" name="husstatus" 
                                                                        id="husstatus" placeholder="" style="width: 150px !important">
                                                                    <option value="">لايوجد</option>
                                                                    <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['husstatus']->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 if ($_smarty_tpl->tpl_vars['getOnePatient']->value->hus_statuesid==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['row']->value->title;?>
</option>
                                                                    <?php } ?>
                                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                                    <option value="0" class="deleteoptincompo">حذف</option><?php }?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>

                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->hus_passport==1){?>
                                                        <div class="col-md-4">
                                                            <div class="form-group form-md-line-input form-md-floating-label has-info"
                                                                 id="hpassportcontain">
                                                                <input type="text" class="form-control" data-ptname="hus_passport"   
                                                                       data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                                       name="hus_passport" id="hus_passport"  value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->hus_passport;?>
"/>
                                                                <label for="form_control_1" class="txtc">جواز السفر</label>
                                                                <span  id="lb_ckeckpassporth" class="help-block clrred" style="display: none;"></span>
                                                            </div>
                                                        </div>
                                                        <?php }?>

                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->hus_mobile==1){?>
                                                        <div class="col-md-4">
                                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                                <input type="text" name="hus_mobile"  maxlength="11"
                                                                       class="form-control digitsOnly "
                                                                       id="hus_mobile"  data-ptname="hus_mobile"   value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->hus_mobile;?>
">


                                                                <label for="form_control_1" class="txtc">الموبايل </label>
                                                            </div>
                                                        </div>
                                                        <?php }?>

                                                    </div>


                                                    <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_type==1||$_smarty_tpl->tpl_vars['programesetting']->value->system_type==4){?>
                                                    <div class="row">
                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->h_refer_doctor==1){?>
                                                        <div class="col-md-2">
                                                            <div class="form-group form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc">محول  من </label>
                                                                <select class="form-control  editData h_refer_doctor "
                                                                        data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                                        data-ptname="h_refer_doctor" name="h_refer_doctor" <?php if ($_smarty_tpl->tpl_vars['hasHus']->value==1){?> required <?php }?>
                                                                        id="h_refer_doctor">
                                                                    <option value=""></option>
                                                                    <option value="-1" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->h_refer_doctor==-1){?>selected<?php }?>>لا يوجد</option>
                                                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['refer']->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['getOnePatient']->value->h_refer_doctor==$_smarty_tpl->tpl_vars['data']->value->id&&$_smarty_tpl->tpl_vars['getOnePatient']->value->h_refer_doctor_tb==0){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                                    <?php } ?>

                                                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['py_all_doc']->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['user_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->h_refer_doctor==$_smarty_tpl->tpl_vars['data']->value['user_id']&&$_smarty_tpl->tpl_vars['getOnePatient']->value->h_refer_doctor_tb==1){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value['name'];?>
</option>
                                                                    <?php } ?>


                                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                                    <?php }?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>

                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->h_nationality==1){?>
                                                        <div class="col-md-2">
                                                            <div class="form-group form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc">الجنسية </label>
                                                                <select class="form-control  editData h_nationality "
                                                                        data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                                        data-ptname="h_nationality" name="h_nationality"
                                                                        id="h_nationality">
                                                                    <option value=""></option>
                                                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['hnationality']->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['getOnePatient']->value->h_nationality==$_smarty_tpl->tpl_vars['data']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                                    <?php } ?>
                                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                                    <?php }?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>


                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->h_religion==1){?>
                                                        <div class="col-md-2">
                                                            <div class="form-group form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc">الديانة </label>
                                                                <select class="form-control  editData h_religion "
                                                                        data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                                        data-ptname="h_religion" name="h_religion"
                                                                        id="h_religion">
                                                                    <option value=""></option>
                                                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['hreligion']->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['getOnePatient']->value->h_religion==$_smarty_tpl->tpl_vars['data']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                                    <?php } ?>
                                                                    <?php if ($_SESSION['role_id']!=3){?>
                                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                                    <?php }?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>


                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->h_doctor1==1){?>
                                                        <div class="col-md-3">
                                                            <div class="form-group form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc">الطبيب المعالج 1 </label>
                                                                <select class="form-control  "
                                                                        data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                                        data-ptname="h_doctor1" name="h_doctor1" <?php if ($_smarty_tpl->tpl_vars['hasHus']->value==1){?> required <?php }?>
                                                                        id="h_doctor1">
                                                                    <option value=""></option>
                                                                    <option value="-1" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->h_doctor1==-1){?>selected<?php }?>>لا يوجد</option>
                                                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['py_all_doc']->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['user_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->h_doctor1==$_smarty_tpl->tpl_vars['data']->value['user_id']){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value['name'];?>
</option>
                                                                    <?php } ?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>


                                                        <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->h_doctor2==1){?>
                                                        <div class="col-md-3">
                                                            <div class="form-group form-md-floating-label has-info">
                                                                <label for="form_control_1" class="txtc">الطبيب المعالج 2 </label>
                                                                <select class="form-control  "
                                                                        data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                                        data-ptname="h_doctor2" name="h_doctor2"
                                                                        id="h_doctor2">
                                                                    <option value=""></option>
                                                                    <option value="-1" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->h_doctor2==-1){?>selected<?php }?>>لا يوجد</option>
                                                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['py_all_doc']->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['user_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->h_doctor2==$_smarty_tpl->tpl_vars['data']->value['user_id']){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value['name'];?>
</option>
                                                                    <?php } ?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <?php }?>
                                                    </div>
                                                    <?php }?>


                                                </div>
                                            </div>
                                            <div class="clearfix"></div>
                                        </div>


                                        <div class="portlet box blue portletcustom">
                                            <div class="portlet-title">
                                                <div class="caption fright">
                                                    <a class="fff bold" href="javascript:;"  id="addChild"
                                                       style="margin-right: 15px;"  data-patientId="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"> 
                                                        <i class="fa fa-plus"></i></a>

                                                    الأطفال    
                                                </div>
                                            </div>
                                        </div>

                                        <div class="form-body">
                                            <div class="clinick rtl"   id="childsContainer">
                                                <input type="hidden" id="controllName" value="invoffers"/>
                                                <?php  $_smarty_tpl->tpl_vars['child'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['child']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['childs']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['child']->key => $_smarty_tpl->tpl_vars['child']->value){
$_smarty_tpl->tpl_vars['child']->_loop = true;
?>
                                                <div class="row">

                                                    <div class="col-md-6">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input type="text"  name="child_name<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
" class="form-control updateElement" 
                                                                   data-colName="child_name" data-tableName="patients_childs"    
                                                                   data-id="<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
"     value="<?php echo $_smarty_tpl->tpl_vars['child']->value->child_name;?>
" required  />
                                                            <label for="form_control_1" class="txtc">الإسم </label>
                                                        </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  mask_date_new  childdateofbirth updateElement"
                                                                   data-id="<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
" type="text"    data-colName="birth_date"  
                                                                   name="birth_date<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
"
                                                                   data-tableName="patients_childs"      value="<?php echo $_smarty_tpl->tpl_vars['child']->value->birth_date;?>
" />
                                                            <label for="form_control_1" class="txtc"> </label>
                                                            <span class="input-group-addon go2r">تاريخ الميلاد </span>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-2" style="margin-right: 25px;">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <div class="md-radio-inline ltr">
                                                                <div class="md-radio">
                                                                    <input type="radio" id="gender<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
_0" name="gender<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
" 
                                                                           class="md-radiobtn updateElement"  data-id="<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
"     value="0"   
                                                                           data-colName="gender" data-tableName="patients_childs"   
                                                                           <?php if ($_smarty_tpl->tpl_vars['child']->value->gender==0){?>checked  <?php }?>>
                                                                    <label for="gender<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
_0">
                                                                        <span></span>
                                                                        <span class="check"></span>
                                                                        <span class="box"></span>
                                                                        أنثى      </label>
                                                                </div>
                                                                <div class="md-radio">
                                                                    <input type="radio" id="gender<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
_1" name="gender<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
" 
                                                                           class="md-radiobtn updateElement"  data-id="<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
"     value="1"
                                                                           data-colName="gender" data-tableName="patients_childs" 
                                                                           <?php if ($_smarty_tpl->tpl_vars['child']->value->gender==1){?>checked  <?php }?>   >
                                                                    <label for="gender<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
_1">
                                                                        <span></span>
                                                                        <span class="check"></span>
                                                                        <span class="box"></span>
                                                                        ذكر </label>
                                                                </div>
                                                            </div>
                                                            <span class="input-group-addon go2r">النوع </span>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-1" style="margin-top: 25px;">
                                                        <a class="btn grey-cascade btn-xs deletemsgEX"  data-tableName="patients_childs" 
                                                           data-id="<?php echo $_smarty_tpl->tpl_vars['child']->value->id;?>
" style=" float: left;" href="#" 
                                                           data-link="instruction" data-fn="delinst">  <i class="fa fa-close"></i>
                                                        </a>
                                                    </div>

                                                </div>
                                                <?php } ?> 
                                            </div>
                                        </div>
                                        <?php }?>
                                        
                                        
                                           <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->organizations!=1){?>
                                        <div class="portlet box blue portletcustom">
                                            <div class="portlet-title">
                                                <div class="caption fright">
                                                    <a class="fff bold" href="javascript:;"  id="addOrgPatNo"
                                                       style="margin-right: 15px;"  data-patientId="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
">
                                                        <i class="fa fa-plus"></i></a>

                                                    الارقام الخارجية 
                                                </div>
                                            </div>
                                        </div>

                                        <div class="form-body">
                                            <div class="clinick rtl"   id="orgPatNosContainer">
                                                <input type="hidden" id="controllName" value="invoffers"/>
                                                <?php  $_smarty_tpl->tpl_vars['orgPatNo'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['orgPatNo']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['orgPatNos']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['orgPatNo']->key => $_smarty_tpl->tpl_vars['orgPatNo']->value){
$_smarty_tpl->tpl_vars['orgPatNo']->_loop = true;
?>
                                                <div class="row">

                                                    <div class="col-md-5">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input type="text"   class="form-control updateElement"
                                                                   data-colName="patient_no" data-tableName="organizations_patient_no"
                                                                   data-id="<?php echo $_smarty_tpl->tpl_vars['orgPatNo']->value->id;?>
"     value="<?php echo $_smarty_tpl->tpl_vars['orgPatNo']->value->patient_no;?>
"   />
                                                            <label for="form_control_1" class="txtc">الرقم  </label>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-5">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <select  class="form-control select2h updateElement"
                                                                     placeholder="اختر  "   data-tableName="organizations_patient_no"
                                                                     data-colName="organization_id" data-id="<?php echo $_smarty_tpl->tpl_vars['orgPatNo']->value->id;?>
" >
                                                                <option value="0" selected>لا يوجد </option>
                                                                <?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['organizations']->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 if ($_smarty_tpl->tpl_vars['orgPatNo']->value->organization_id==$_smarty_tpl->tpl_vars['row']->value->id){?>selected<?php }?>  ><?php echo $_smarty_tpl->tpl_vars['row']->value->organization_name;?>
</option>
                                                                <?php } ?>
                                                            </select>
                                                            <label for="form_control_1" class="txtc"> </label>
                                                            <span class="input-group-addon go2r">تابع ل    </span>
                                                        </div>
                                                    </div>



                                                    <div class="col-md-1" style="margin-top: 25px;">
                                                        <a class="btn grey-cascade btn-xs deletemsgEX"  
                                                           data-tableName="organizations_patient_no"
                                                           data-id="<?php echo $_smarty_tpl->tpl_vars['orgPatNo']->value->id;?>
" style=" float: left;" href="#"
                                                           data-link="instruction" data-fn="delinst">  <i class="fa fa-close"></i>
                                                        </a>
                                                    </div>

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


                                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->entrydetails==1){?> 
                                        <div class="portlet box blue portletcustom">
                                            <div class="portlet-title">
                                                <div class="caption fright">
                                                    بيانات الدخول - خاصة بتطبيق الموبايل
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row clinick rtl">
                                            <div class="col-md-4">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    <label for="form_control_1">اسم المستخدم   "الموبايل"</label>
                                                    <input readonly type="text" class="form-control" placeholder="اسم المستخدم" 
                                                           name="uName" id="uName" minlength="3" autocomplete="false" 
                                                           value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->phone;?>
">
                                                </div>
                                            </div>
                                            <div class="col-md-4">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    <label for="form_control_1">كلمة المرور الجديدة</label>
                                                    <input type="password" class="form-control" placeholder="كلمة المرور الجديدة" 
                                                           name="password" id="password" minlength="3" autocomplete="false">
                                                </div>
                                            </div>
                                            <div class="col-md-4">
                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                    <label for="form_control_1">تأكيد كلمة المرور الجديدة</label>
                                                    <input type="password" class="form-control" placeholder="تأكيد كلمة المرور الجديدة" 
                                                           id="confirmpassword"  name="confirmpassword" minlength="3" 
                                                           equalTo="#password" autocomplete="false">
                                                </div>
                                            </div>
                                        </div>

                                        <?php }?>

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

                                        <div class="portlet box blue portletcustom">
                                            <div class="portlet-title">
                                                <div class="caption fright">
                                                    <a class="btn green-haze btn-xs"   style="margin-right: 15px;" 
                                                       id="printBirthNotify"  data-patientId="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
">
                                                        <i class="fa fa-print"></i>  </a>

                                                    إخطار ولادة     
                                                </div>
                                            </div>
                                        </div>

                                        <div class="form-body">
                                            <div class="clinick rtl">
                                                <div class="row">
                                                    <div class="col-md-11">
                                                        <table class="table table-hover portlet light bg-inverse">
                                                            <thead>
                                                                <tr>
                                                                    <th class="wds10"> م</th>
                                                                    <th class="wds25">تاريخ الإخطار   </th>
                                                                    <th> المستخدم</th>
                                                                </tr>
                                                            </thead>
                                                            <tbody   id="notifyContainer">
                                                                <?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['birthNotifications']->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><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->notify_date;?>
</td>
                                                                    <td><?php echo $_smarty_tpl->tpl_vars['data']->value->userName;?>
</td>
                                                                </tr>
                                                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php $_tmp1=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable($_tmp1, null, 0);?>
                                                                <?php } ?> 
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <?php }?>


                                        <div class="portlet box blue portletcustom">
                                            <div class="portlet-title">
                                                <div class="caption fright">
                                                    بيانات عامة
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->knownfrom==1){?>
                                            <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_type==1||$_smarty_tpl->tpl_vars['programesetting']->value->system_type==4){?>
                                            <div class="col-md-4" style="text-align: right; float: right;">
                                                <label>وسيلة المعرفة بالمركز  </label>
                                                <div class="form-group  form-md-floating-label has-info">

                                                    <select class="form-control editData knownfrom "
                                                            data-id="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
"
                                                            data-ptname="knownfrom" name="knownfrom"
                                                            id="knownfrom">
                                                        <option value=""></option>
                                                        <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['knownfrom']->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['getOnePatient']->value->knownfrom==$_smarty_tpl->tpl_vars['data']->value->id){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                        <?php } ?>
                                                        <?php if ($_SESSION['role_id']!=3){?>
                                                        <option value="0" class="deleteoptincompo">حذف</option>
                                                        <?php }?>
                                                    </select>
                                                </div>
                                            </div>
                                            <?php }?>
                                            <?php }?>


                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->file_card==1){?>
                                            <div class="md-checkbox-inline col-md-3 fright">
                                                <div class="md-checkbox">
                                                    <input type="checkbox" id="file_card"  class="md-check  " name="file_card" 
                                                           value="1"   <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->file_card==1){?>   checked="" <?php }?> >
                                                    <label for="file_card">
                                                        <span></span>
                                                        <span class="check"></span>
                                                        <span class="box"></span>
                                                        كارت الفايل  </label>
                                                </div>
                                            </div>
                                            <?php }?>


                                            <?php if ($_smarty_tpl->tpl_vars['programesettingex']->value->case_card==1){?>
                                            <div class="md-checkbox-inline col-md-3 fright">
                                                <div class="md-checkbox">
                                                    <input type="checkbox" id="case_card" class="md-check  " name="case_card" 
                                                           value="1"   <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->case_card==1){?>   checked="" <?php }?> >
                                                    <label for="case_card">
                                                        <span></span>
                                                        <span class="check"></span>
                                                        <span class="box"></span>
                                                        كارت الحالة  </label>
                                                </div>
                                            </div>
                                            <?php }?>

                                            <div class="col-md-12" id="patientFilesDiv">
                                                <?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['allImgs']->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;
?>
                                                <div class="col-md-3">
                                                    <div class="row clinick ltr" >

                                                        <div class="col-md-12">
                                                            <div class="fileinput fileinput-new" data-provides="fileinput">
                                                                <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 250px; height: 170px;">
                                                                    <img class="showPatFile" <?php if ($_smarty_tpl->tpl_vars['data']->value){?> src="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/../upload/patientfiles/<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
/<?php echo $_smarty_tpl->tpl_vars['data']->value;?>
"<?php }?>/>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row clinick ltr" >
                                                        <div class="col-md-6">

                                                            <button type="button" class="btn btn-xs red fright delPImg" data-pId="<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" data-name="<?php echo $_smarty_tpl->tpl_vars['data']->value;?>
">
                                                                <i class="fa fa-close"></i>
                                                            </button>

                                                            <a class="btn btn-xs blue fright" download="<?php echo $_smarty_tpl->tpl_vars['statusno']->value;?>
 -  <?php echo $_smarty_tpl->tpl_vars['data']->value;?>
"
                                                               href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/../upload/patientfiles/<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
/<?php echo $_smarty_tpl->tpl_vars['data']->value;?>
">
                                                                <i class="fa fa-download"></i>
                                                            </a>

                                                        </div>
                                                    </div>

                                                </div>
                                                <?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                                                <?php } ?>

                                                <?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['allPdf']->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;
?>
                                                <div class="col-md-3">
                                                    <div class="row clinick ltr" >

                                                        <div class="col-md-12">
                                                            <div class="fileinput fileinput-new" data-provides="fileinput">
                                                                <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 250px; height: 170px;">
                                                                    <img src="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/views/obgy/_assets/custom/images/pdficon.png" width="50" height="50"/>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row clinick ltr" >
                                                        <div class="col-md-6">

                                                            <button type="button" class="btn btn-xs red fright delPImg" data-pId="<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" data-name="<?php echo $_smarty_tpl->tpl_vars['data']->value;?>
">
                                                                <i class="fa fa-close"></i>
                                                            </button>

                                                            <a class="btn btn-xs blue fright" download="<?php echo $_smarty_tpl->tpl_vars['statusno']->value;?>
 -  <?php echo $_smarty_tpl->tpl_vars['data']->value;?>
"
                                                               href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/../upload/patientfiles/<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
/<?php echo $_smarty_tpl->tpl_vars['data']->value;?>
">
                                                                <i class="fa fa-download"></i>
                                                            </a>

                                                        </div>
                                                    </div>

                                                </div>
                                                <?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                                                <?php } ?>

                                                <?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['allDoc']->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;
?>
                                                <div class="col-md-3">
                                                    <div class="row clinick ltr" >

                                                        <div class="col-md-12">
                                                            <div class="fileinput fileinput-new" data-provides="fileinput">
                                                                <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 250px; height: 170px;">
                                                                    <img src="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/views/obgy/_assets/custom/images/wordicon.png" width="50" height="50"/>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row clinick ltr" >
                                                        <div class="col-md-6">

                                                            <button type="button" class="btn btn-xs red fright delPImg" data-pId="<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" data-name="<?php echo $_smarty_tpl->tpl_vars['data']->value;?>
">
                                                                <i class="fa fa-close"></i>
                                                            </button>

                                                            <a class="btn btn-xs blue fright" download="<?php echo $_smarty_tpl->tpl_vars['statusno']->value;?>
 -  <?php echo $_smarty_tpl->tpl_vars['data']->value;?>
"
                                                               href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/../upload/patientfiles/<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
/<?php echo $_smarty_tpl->tpl_vars['data']->value;?>
">
                                                                <i class="fa fa-download"></i>
                                                            </a>

                                                        </div>
                                                    </div>

                                                </div>
                                                <?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                                                <?php } ?>



                                            </div>


                                        </div>
                                    </div>



                                    <div class="form-actions">

                                        <div class="col-md-2" style="text-align: right;margin: 0 5px;">
                                            <input type="hidden" name="patientid" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
" />
                                            <input type="hidden" id="edited" value="1" />
                                            <input type="hidden" name="ptntid" id="ptntid" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
" />
                                            <input type="hidden" name="dirName" id="dirName"   value="patientrecords"/>
                                            <input type="submit" class="btn green btn-block btn-lg" id="patient_submit"  name="submit" value="حفظ">
                                        </div>

                                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_type==1||$_smarty_tpl->tpl_vars['programesetting']->value->system_type==4){?>
                                        <div class="col-md-2">
                                            <input type="button" class="btn blue btn-block btn-lg"
                                                   id="patient_submit_print" value=" طباعه">
                                        </div>
                                        <?php }?>

                                        <div class="col-md-3" style="text-align: right;margin: 0 5px;">
                                            <label for="patientFiles" class="btn default btn-block btn-lg">إضافة ملف</label>
                                            <input type="file" name="patientFiles[]" multiple id="patientFiles"
                                                   class=" form-control" style="visibility:hidden;"  >
                                        </div>
                                    </div>
                                    <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->voice_record==1){?>
                                    <input type="hidden" id="hasRecord" value="1" />
                                    <div class="form-actions col-md-12">

                                        <div class="col-md-1">
                                            <input type="file" name="voiceFiles[]" multiple id="voiceFiles"  
                                                   class=" form-control" style="visibility:hidden;"  >
                                            <label for="voiceFiles" class="btn default btn-block btn-lg">Upload</label>       
                                        </div>


                                        <div class="col-md-4">
                                            <div id="controls">
                                                <button class="recordButtom" id="recordButton">Record</button>
                                                <button class="recordButtom" id="pauseButton" disabled>Pause</button>
                                                <button class="recordButtom" id="stopButton" disabled>Stop</button>
                                            </div>

                                            <!--div id="formats">Format: start recording to see sample rate</div-->
                                        </div>

                                        <div class="col-md-6">
                                            <p><strong>Voice Record:</strong></p>
                                            <ol id="recordingsList">
                                                <?php if ($_smarty_tpl->tpl_vars['voiceRecord']->value==1){?> 
                                                <li>
                                                    <audio controls  src="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/../upload/patientrecords/<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
.<?php echo $_smarty_tpl->tpl_vars['voiceExt']->value;?>
"> </audio>
                                                </li>
                                                <?php }?>
                                            </ol>
                                        </div>
                                    </div>
                                    <?php }?>
                                    </form>
                                </div>
                            </div>
                            <!-- END SAMPLE FORM PORTLET-->
                    </div>
                </div>
                <div style="clear: both;">
                </div>
                <!-- END PAGE CONTENT-->
            </div>
        </div>

        <div id="talks-loading" style="z-index: 3000;position: absolute;top: 10%;right: 2%;left: 6%;display:none; height: 65%; background-color: rgba(0, 0, 0,0.27); padding-top: 10%;" align="center">
            <img src="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/../upload/loading.gif">
        </div>

        <!-- END CONTENT -->
        <div class="modal fade" id="datareceivedwifejob" tabindex="-1" role="basic" aria-hidden="true">
        </div>
        <div class="modal fade" id="allEducation" tabindex="-1" role="basic" aria-hidden="true">
        </div>

        <div class="modal fade" id="allgovernorate" tabindex="-1" role="basic" aria-hidden="true">
        </div>
        <div class="modal fade" id="wifestatusmodel" tabindex="-1" role="basic" aria-hidden="true">
        </div>

        <div class="modal fade" id="husstatusmodel" tabindex="-1" role="basic" aria-hidden="true">
        </div>


        <div class="modal fade" id="wifetypedel" tabindex="-1" role="basic" aria-hidden="true">
        </div>
        <div class="modal fade" id="husbandtypedel" tabindex="-1" role="basic" aria-hidden="true">
        </div>

        <div class="modal fade" id="editModal" tabindex="-1" role="basic" aria-hidden="true">
        </div>



        <div    id="patient_profile_print" style="display :none;">

            <div class="row text-right" style="direction: rtl;">
                <div class="col-md-12">
                    <h1 class="h1" style="text-align: center;">إذن قبول دخول المركز </h1>
                </div>

                <div class="col-md-12">

                    <table style="width: 98%;margin: 5px auto;" cellpadding="2" class="noborder">
                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_type==1||$_smarty_tpl->tpl_vars['programesetting']->value->system_type==4){?>
                        <tr>
                            <td>
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span style="float: right;margin-right: 5px;margin-left: 20%">
                                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_lang==1){?>
                                        <span class="bold">  RFC ( للزوجة  ) : </span>
                                        <?php }else{ ?>
                                        <span class="bold">  RFC ( للمريض   ) : </span>
                                        <?php }?>
                                        <span id="prt_rfc_w" ></span>
                                    </span>
                                </h4>
                            </td>
                            <td>
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">  RFC ( للزوج )  : </span>
                                        <span id="prt_rfc_h" ></span>
                                    </span>
                                </h4>
                            </td>
                        </tr>
                        <?php }?>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">    التاريخ  :    </span>
                                        <span id="prt_date"><?php echo smarty_modifier_date_format(time(),"%Y-%m-%d");?>
</span></span>
                                </h4>
                            </td>
                            <td style="width: 50%;">
                                <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_type==1||$_smarty_tpl->tpl_vars['programesetting']->value->system_type==4){?>
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;">
                                        <span class="bold">  وسيلة المعرفة بالمركز :      </span>
                                        <span id="prt_knownfrom"></span></span>
                                </h4>
                                <?php }?>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold"> اسم الحالة        </span>
                                        <span id="prt_w_name"></span></span>
                                </h4>
                            </td>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;">
                                        <span class="bold">  اسم الزوج :      </span>
                                        <span id="prt_h_name"></span></span>
                                </h4>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">  السن:      </span>
                                        <span id="prt_wage"></span></span>
                                </h4>
                            </td>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;">
                                        <span class="bold">   السن :     </span>
                                        <span id="prt_hage"></span></span>
                                </h4>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">  رقم قومى :      </span>
                                        <span id="prt_wnational"></span></span>
                                </h4>
                            </td>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;">
                                        <span class="bold">  رقم قومى  :      </span>
                                        <span id="prt_hnational"></span></span>
                                </h4>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">  الوظيفة :     </span>
                                        <span id="prt_wjob"></span></span>
                                </h4>
                            </td>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;">
                                        <span class="bold">  الوظيفة  :      </span>
                                        <span id="prt_hjob"></span></span>
                                </h4>
                            </td>
                        </tr>
                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_type==1||$_smarty_tpl->tpl_vars['programesetting']->value->system_type==4){?>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold"> الجنسية / الديانة  :      </span>
                                        <span id="prt_wreligion"></span></span>
                                </h4>
                            </td>

                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;">
                                        <span class="bold">  الجنسية / الديانة   :     </span>
                                        <span id="prt_hreligion"></span></span>
                                </h4>
                            </td>
                        </tr>
                        <?php }?>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">    الموبايل 1 :    </span>
                                        <span id="prt_phone"></span></span>
                                </h4>
                            </td>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;">
                                        <span class="bold">   الموبايل 2  :     </span>
                                        <span id="prt_mobile"></span></span>
                                </h4>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;">
                                        <span class="bold">   العنوان  :     </span>
                                        <span id="prt_address"></span></span>
                                </h4>
                            </td>
                            <td style="width: 50%;">

                            </td>
                        </tr>
                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->system_type==1||$_smarty_tpl->tpl_vars['programesetting']->value->system_type==4){?>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">   الطبيب المحول  :     </span>
                                        <span id="prt_wrefer"></span></span>
                                </h4>
                            </td>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;">
                                        <span class="bold">   الطبيب المحول   :     </span>
                                        <span id="prt_hrefer"></span></span>
                                </h4>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">   الطبيب المعالج (1)  :     </span>
                                        <span id="prt_wdoc1"></span></span>
                                </h4>
                            </td>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;">
                                        <span class="bold">   الطبيب المعالج (1)   :     </span>
                                        <span id="prt_hdoc1"></span></span>
                                </h4>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">   الطبيب المعالج (2)  :     </span>
                                        <span id="prt_wdoc2"></span></span>
                                </h4>
                            </td>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;">
                                        <span class="bold">  الطبيب المعالج (2)   :      </span>
                                        <span id="prt_hdoc2"></span></span>
                                </h4>
                            </td>
                        </tr>
                        <?php }?>
                        <tr>
                            <td>
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">   الخدمة المطلوبة :     </span>
                                        <span id="prt_service"></span></span>
                                </h4>
                            </td>

                            <td>
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span  style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">    اسم المستخدم  :     </span>
                                        <span><?php echo $_smarty_tpl->tpl_vars['userName']->value;?>
</span></span>
                                </h4>
                            </td>
                        </tr>
                        <tr class="emptyLine">
                            <td  colspan="2"> </td>
                        </tr>
                        <!--tr>
                            <td colspan="2">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span class="bold"  style="float: right;margin-right: 5px;margin-left: 20%">    إننى أقبل سداد تكاليف الاقامة والعلاج وجميع المصروفات الخاصة بى خلال فترة اقامتى بالمركز <span id="prt_patient_name"></span></span>
                                </h4>
                            </td>
                        </tr>

                        <tr>
                            <td colspan="2">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span   style="float: right;margin-right: 5px;margin-left: 20%">
                                        <span class="bold">    توقيع المريض أو ولى الامر :    </span>
                                    </span>
                                    <span style="float: right;margin-right: 5px;">.................................................</span>
                                </h4>
                            </td>
                        </tr-->

                        <tr>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span class="bold"  style="margin-right: 20%">الطبيب المقيم       </span>
                                </h4>
                            </td>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >
                                    <span class="bold"  style="float: left;    margin-left: 45%;">مدير عام المركز</span>
                                </h4>
                            </td>
                        </tr>

                        <tr>
                            <td style="width: 50%;">
                                </br>
                                </br>
                            </td>
                            <td style="width: 50%;">
                                <h4 style="direction: rtl" class="arbfnt" >

                                </h4>
                            </td>
                        </tr>

                        <tr>
                            <td style="width: 50%;">
                                <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->barcode_print==1){?>
                                <img id="xx"  src="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/../upload/barcodes/<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->statusno;?>
.png">
                                <?php }?>
                            </td>
                            <td style="width: 50%;text-align: center;">
                                <h4 style="direction: rtl">
                                    <span id="prt_patient_no" style="font-weight: bolder; font-size: 75px;" ></span>
                                </h4>
                            </td>
                        </tr>


                    </table>
                </div>
            </div>

        </div>

        
        <style>

            .noborder tr { height: 10mm; }
            .emptyLine{ height: 30mm !important; }
            .bold { font-weight: bold;}
            .h1 { font-weight: 900; font-size: 28px;}

            .form-group.form-md-line-input .help-block {
                position: absolute;
                margin: 2px 0 0 0;
                opacity: 1;
                filter: alpha(opacity=0);
                font-size: 13px;
            }

            @media print {
                #patient_profile_print {
                    transform: scale(.9);
                }

                .noborder tr { height: 10mm; }
                .emptyLine{ height: 30mm !important;}

                .bold { font-weight: bold;}
                .h1 { font-weight: 900; font-size: 28px;}
            }
        </style>
        

        <style>

            @page {
            size: auto;
            margin-top: <?php echo $_smarty_tpl->tpl_vars['programesetting']->value->above2;?>
cm !important;
            margin-bottom: <?php echo $_smarty_tpl->tpl_vars['programesetting']->value->buttom2;?>
cm !important;
            }

            .arbfnt {
            font-size: <?php echo $_smarty_tpl->tpl_vars['programesetting']->value->fontsizear2;?>
px !important;
            }

            .enfnt {
            font-size: <?php echo $_smarty_tpl->tpl_vars['programesetting']->value->fontsizeen2;?>
px !important;
            }

            #content, #page {
                width: 100%;
                margin: 0;
                float: none;
            }


            /* Unnötige Elemente ausblenden für den Druck */

            #header-widgets, nav, aside.mashsb-container,
            .sidebar, .mashshare-top, .mashshare-bottom,
            .content-ads, .make-comment, .author-bio,
            .heading, .related-posts, #decomments-form-add-comment,
            #breadcrumbs, #footer, .post-byline, .meta-single,
            .site-title img, .post-tags, .readability
            {
                display: none;
            }



        </style>

        <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="showPatFileM" style="min-width:1000px;">
            <div class="modal-dialog  modal-lg wds65">
                <div class="modal-content" style="">
                    <div class="modal-body" style="background: rgba(0,0,0,.5);">
                        <div class="portlet-body">
                            <button type="button" class="close"
                                    style="margin-right: 5px; margin-top: 10px; width: 20px; height: 20px;"
                                    data-dismiss="modal" aria-hidden="true"></button>
                            <div class="row">
                                <div class="col-md-12" style="text-align: center;" >
                                    <div class="fileinput fileinput-new" data-provides="fileinput">
                                        <div class="fileinput-preview thumbnail" data-trigger="fileinput">
                                            <img id="source_image" />
                                        </div>
                                    </div>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>


        <div id="printPatDiv"></div>
<?php }} ?>