<?php /* Smarty version Smarty-3.1.11, created on 2024-08-26 07:38:15
         compiled from "../views/obgy/patients/edit.html" */ ?>
<?php /*%%SmartyHeaderCode:10533507666cc93572c9ce2-94707571%%*/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 => 1648347258,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '10533507666cc93572c9ce2-94707571',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'shcontrollname' => 0,
    'programesetting' => 0,
    'addTime' => 0,
    'addDate' => 0,
    'hosturl' => 0,
    'controllname' => 0,
    'treeId' => 0,
    'getOnePatient' => 0,
    'allTypes' => 0,
    'row' => 0,
    'datewifebirth' => 0,
    'wAge' => 0,
    'education' => 0,
    'wifejobs' => 0,
    'wifestatus' => 0,
    'lastpatient' => 0,
    'mirragefromy' => 0,
    'mirragefromm' => 0,
    'wifebl' => 0,
    'doctors' => 0,
    'previous_marriages' => 0,
    'previous_marriage' => 0,
    'husbandtypes' => 0,
    'datehusbirth' => 0,
    'hAge' => 0,
    'husbandjobs' => 0,
    'hus_previous_marriages' => 0,
    'hus_previous_marriage' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66cc93574a4a03_00664128',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66cc93574a4a03_00664128')) {function content_66cc93574a4a03_00664128($_smarty_tpl) {?><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->programview==1){?>  الزوجة  <?php }else{ ?> المريض  <?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" 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">
                                        <input type="hidden" name="treeId" id="treeId" value="<?php echo $_smarty_tpl->tpl_vars['treeId']->value;?>
"/>
                                        <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"  value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->statusno;?>
" required="required">
                                                <label for="form_control_1" class="txtc">
                                                    <!--رقم الحالة-->
                                                </label>
                                                <span  id="lb_ckwifestatusno" class="help-block clrred" style="display: none;">هذا الرقم موجود من قبل</span>
                                            </div>
                                        </div>


                                        <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 select2me 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 } ?>
                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-5">
                                            <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;?>
" required="required">
                                                <label for="form_control_1" class="txtc">
                                                    اسم <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->programview==1){?>  المريضة  <?php }else{ ?> المريض  <?php }?>
                                                </label>
                                                <span  id="lb_ckwifename" class="help-block clrred" style="display: none;">هذا الاسم موجود من قبل</span>
                                            </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 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>
                                        <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>
                                    </div>
                                    <div class="row">
                                        <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 select2me 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 } ?>
                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                </select>

                                            </div>
                                        </div>
                                        <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 select2me 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 } ?>
                                                    <option value="0" class="deleteoptincompo"> حذف </option>
                                                </select>
                                            </div>
                                        </div>
                                        <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 select2me 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 } ?>
                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                </select>
                                            </div>
                                        </div>

                                        <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->programview==0){?>
                                        <div class="col-md-2">
                                            <div class="form-group form-md-floating-label has-info">
                                                <label class="txtc">النوع</label>
                                                <select class="form-control select2me updatelastptID" data-id="<?php echo $_smarty_tpl->tpl_vars['lastpatient']->value->id;?>
" data-ptname="gender" name="gender" id="gender" style="width: 150px !important" >
                                                    <option value=""></option>
                                                    <option value="0" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->gender==0){?>selected<?php }?>>ذكر</option>
                                                    <option value="1" <?php if ($_smarty_tpl->tpl_vars['getOnePatient']->value->gender==1){?>selected<?php }?>>انثي</option>
                                                </select>
                                            </div>
                                        </div>
                                        <?php }?>

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


                                                <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>

                                                <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>

                                                <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>

                                        <?php }else{ ?>
                                    </div>
                                    <?php }?>



                                    <div class="row">
                                        <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>
                                        <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 uniquePhone " 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" id="mobile"   class="form-control digitsOnly uniquePhone " 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">الموبايل</label>
                                            </div>
                                        </div>
                                        <div class="col-md-2">
                                            <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" 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>
                                        <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 select2me 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 } ?>
                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>

                                    <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="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>
                                        <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>

                                    </div>

                                    <div class="row">
                                        <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>
                                        <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 select2me 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>
                                    </div>


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


                                    <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->previous_marriage==1){?> 
                                    <input type="hidden" id="controllName" value="instruction"/>
                                    <div class="portlet box blue portletcustom wds75">
                                        <div class="portlet-title">
                                            <div class="caption fright">
                                                <a class="fff bold" href="javascript:;"  id="addPrevMarr" data-for="1"
                                                   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="prevMarrContainer1">

                                            <?php  $_smarty_tpl->tpl_vars['previous_marriage'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['previous_marriage']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['previous_marriages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['previous_marriage']->key => $_smarty_tpl->tpl_vars['previous_marriage']->value){
$_smarty_tpl->tpl_vars['previous_marriage']->_loop = true;
?>
                                            <div class="row">

                                                <div class="col-md-2">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input type="text"  name="period<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->id;?>
" 
                                                               class="form-control updateElement" 
                                                               data-colName="period" data-tableName="previous_marriage"    
                                                               data-id="<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->id;?>
"     value="<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->period;?>
" 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 type="text"  name="males<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->id;?>
" 
                                                               class="form-control updateElement" 
                                                               data-colName="males" data-tableName="previous_marriage"    
                                                               data-id="<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->id;?>
"     value="<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->males;?>
" 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 type="text"  name="females<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->id;?>
" 
                                                               class="form-control updateElement" 
                                                               data-colName="females" data-tableName="previous_marriage"    
                                                               data-id="<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->id;?>
"     value="<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->females;?>
" 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 type="text"  name="last_age<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->id;?>
" 
                                                               class="form-control updateElement" 
                                                               data-colName="last_age" data-tableName="previous_marriage"    
                                                               data-id="<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->id;?>
"     value="<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->value->last_age;?>
" required  />
                                                        <label for="form_control_1" class="txtc">سن الأصغر  </label>
                                                    </div>
                                                </div>

                                                <div class="col-md-1" style="margin-top: 25px;">
                                                    <a class="btn grey-cascade btn-xs deletemsgEX"  data-tableName="previous_marriage" 
                                                       data-id="<?php echo $_smarty_tpl->tpl_vars['previous_marriage']->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->programview==1){?> 
                                    <?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">
                                                            بيانات الزوج
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <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 select2me 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 } ?>
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <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"  data-ptname="husdandname" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->husdandname;?>
"/>
                                                            <label for="form_control_1" class="txtc"> اسم الزوج</label>
                                                        </div>
                                                    </div>
                                                    <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>
                                                    <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>
                                                </div>
                                                <div class="row">
                                                    <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 select2me 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 } ?>
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <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 select2me 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 } ?>
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <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" 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>
                                                    <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 select2me 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 } ?>
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-6">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <textarea class="form-control save_husband_patient_notes" rows="2" name="husband_notes"><?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->husband_notes;?>
</textarea>
                                                            <label for="form_control_1" class="txtc"> ملاحظات</label>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-6">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <textarea class="form-control save_husband_patient_habits" rows="2" name="husband_habbits"><?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->husband_habbits;?>
</textarea>
                                                            <label for="form_control_1" class="txtc"> عادات</label>
                                                        </div>
                                                    </div>

                                                </div>

                                                <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->previous_marriage==1){?> 
                                                <div class="portlet box blue portletcustom wds75">
                                                    <div class="portlet-title">
                                                        <div class="caption fright">
                                                            <a class="fff bold" href="javascript:;"  id="addPrevMarr" data-for="2"
                                                               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="prevMarrContainer2">

                                                        <?php  $_smarty_tpl->tpl_vars['hus_previous_marriage'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['hus_previous_marriage']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['hus_previous_marriages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['hus_previous_marriage']->key => $_smarty_tpl->tpl_vars['hus_previous_marriage']->value){
$_smarty_tpl->tpl_vars['hus_previous_marriage']->_loop = true;
?>
                                                        <div class="row">

                                                            <div class="col-md-2">
                                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                                    <input type="text"  name="period<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->id;?>
" 
                                                                           class="form-control updateElement" 
                                                                           data-colName="period" data-tableName="hus_previous_marriage"    
                                                                           data-id="<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->id;?>
"     value="<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->period;?>
" 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 type="text"  name="males<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->id;?>
" 
                                                                           class="form-control updateElement" 
                                                                           data-colName="males" data-tableName="hus_previous_marriage"    
                                                                           data-id="<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->id;?>
"     value="<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->males;?>
" 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 type="text"  name="females<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->id;?>
" 
                                                                           class="form-control updateElement" 
                                                                           data-colName="females" data-tableName="hus_previous_marriage"    
                                                                           data-id="<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->id;?>
"     value="<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->females;?>
" 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 type="text"  name="last_age<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->id;?>
" 
                                                                           class="form-control updateElement" 
                                                                           data-colName="last_age" data-tableName="hus_previous_marriage"    
                                                                           data-id="<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->id;?>
"     value="<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->value->last_age;?>
" required  />
                                                                    <label for="form_control_1" class="txtc">سن الأصغر   </label>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-1" style="margin-top: 25px;">
                                                                <a class="btn grey-cascade btn-xs deletemsgEX"  data-tableName="hus_previous_marriage" 
                                                                   data-id="<?php echo $_smarty_tpl->tpl_vars['hus_previous_marriage']->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 }?>

                                                <?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">
                                                    <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->mobile;?>
">
                                                        </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 }?>
                                            </div>
                                            <div class="clearfix"></div>
                                        </div>
                                    </div>

                                    <div class="form-actions">

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


                                        <div class="col-md-4">
                                            <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
                                            <div class="row fileupload-buttonbar">
                                                <div class="col-lg-12">
                                                    <!-- The fileinput-button span is used to style the file input field as button -->
                                                    <span class="btn btn-success fileinput-button" ng-class="{disabled: disabled}">
                                                        <i class="glyphicon glyphicon-plus"></i>
                                                        <span>إضافة ملف...</span>
                                                        <input type="file" name="files[]" multiple ng-disabled="disabled">
                                                    </span>
                                                    <button type="button" class="btn btn-primary start" data-ng-click="submit()">
                                                        <i class="glyphicon glyphicon-upload"></i>
                                                        <span>ابدأ الرفع</span>
                                                    </button>
                                                    <button type="button" class="btn btn-warning cancel" data-ng-click="cancel()">
                                                        <i class="glyphicon glyphicon-ban-circle"></i>
                                                        <span>إلغاء الرفع</span>
                                                    </button>
                                                    <!-- The global file processing state -->
                                                    <span class="fileupload-process"></span>
                                                </div>
                                                <!-- The global progress state -->
                                                <div class="col-lg-5 fade" data-ng-class="{in: active()}">
                                                    <!-- The global progress bar -->
                                                    <div class="progress progress-striped active" data-file-upload-progress="progress()"><div class="progress-bar progress-bar-success" data-ng-style="{width: num + '%'}"></div></div>
                                                    <!-- The extended global progress state -->
                                                    <div class="progress-extended">&nbsp;</div>
                                                </div>
                                            </div>

                                            <!--div class="scroller">
                                                <ul class="files ng-cloak anjuploadfiles" data-ng-repeat="file in queue" data-ng-class="{'processing': file.$processing()} ">
                                                    <li data-ng-switch data-on="!!file.thumbnailUrl">
                                                        <div class="preview fileptipload" data-ng-switch-when="true">
                                                            <a data-ng-href="{{file.url}}" title="{{file.name}}" download="{{file.name}}" data-gallery><img data-ng-src="{{file.thumbnailUrl}}" alt=""></a>
                                                        </div>
                                                        <div class="preview fileptipload" data-ng-switch-default data-file-upload-preview="file"></div>
                                            <!--                                    </li>
                                                                                <li>--
                                            <p class="name" data-ng-switch data-on="!!file.url">
                                                <span data-ng-switch-when="true" data-ng-switch data-on="!!file.thumbnailUrl">
                                                    <a data-ng-switch-when="true" data-ng-href="{{file.url}}" title="{{file.name}}" download="{{file.name}}" data-gallery>{{file.name}}</a>
                                                    <a data-ng-switch-default data-ng-href="{{file.url}}" title="{{file.name}}" download="{{file.name}}">{{file.name}}</a>
                                                </span>
                                                <span data-ng-switch-default>{{file.name}}</span>
                                            </p>
                                            <strong data-ng-show="file.error" class="error text-danger">{{file.error}}</strong>
                                            <!--                                    </li>
                                                                                <li>--
                                            <p class="size">{{file.size| formatFileSize}}</p>
                                            <div class="progress progress-striped active fade" data-ng-class="{pending: 'in'}[file.$state()]" data-file-upload-progress="file.$progress()">
                                                <div class="progress-bar progress-bar-success" data-ng-style="{width: num + '%'}"></div>
                                            </div>
                                            <!--                                    </li>

                                                                                <li>--
                                            <button style="float: left;" type="button" class="btn btn-primary start" data-ng-click="file.$submit()" data-ng-hide="!file.$submit || options.autoUpload" data-ng-disabled="file.$state() == 'pending' || file.$state() == 'rejected'">
                                                <i class="glyphicon glyphicon-upload"></i>
                                                <span>ابدأ</span>
                                            </button>
                                            <button type="button" class="btn btn-warning cancel" data-ng-click="file.$cancel()" data-ng-hide="!file.$cancel">
                                                <i class="glyphicon glyphicon-ban-circle"></i>
                                                <span>الغاء</span>
                                            </button>
                                            <button data-ng-controller="FileDestroyController" type="button" class="btn btn-danger destroy" data-ng-click="file.$destroy()" data-ng-hide="!file.$destroy">
                                                <i class="glyphicon glyphicon-trash"></i>
                                                <span>حذف</span>
                                            </button>
                                            </li>
                                            </ul>
                                            </div-->
                                        </div>

                                        <?php }?>
                                        <div class="col-md-8">
                                            <input type="hidden" name="patientid" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
" />
                                            <input type="hidden" name="ptntid" id="ptntid" value="<?php echo $_smarty_tpl->tpl_vars['getOnePatient']->value->id;?>
" />
                                            <input type="submit" class="btn green btn-block btn-lg" id="patient_submit"  name="submit" value="حفظ">
                                        </div>
                                    </div>
                                    </form>
                                </div>
                            </div>
                            <!-- END SAMPLE FORM PORTLET-->
                    </div>
                </div>
                <div style="clear: both;">
                </div>
                <!-- END PAGE CONTENT-->
            </div>
        </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="wifestatusmodel" 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>





<?php }} ?>