<?php /* Smarty version Smarty-3.1.11, created on 2025-06-21 18:49:25
         compiled from "../views/obgy/case_summary_obstetric/past.html" */ ?>
<?php /*%%SmartyHeaderCode:7543811566856d485bb8f06-43570746%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'eb74c5a08b7fa97a96bab63167da20ae4dccbf6c' => 
    array (
      0 => '../views/obgy/case_summary_obstetric/past.html',
      1 => 1674648262,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '7543811566856d485bb8f06-43570746',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'pastsurgicalcount' => 0,
    'allcontractcount' => 0,
    'phpastmedicalcount' => 0,
    'mypastmedical' => 0,
    'i' => 0,
    'myallphpastmedical' => 0,
    'allphpastmedicaldisease' => 0,
    'myallphpastmedicaldisease' => 0,
    'controllname' => 0,
    'pastsurgical' => 0,
    'myallpastsurgical' => 0,
    'allphpastsurgicaloperation' => 0,
    'myallphpastsurgicaloperation' => 0,
    'allcontract' => 0,
    'myallcontract' => 0,
    'allphcontracttype' => 0,
    'myallphcontracttype' => 0,
    'obstetric_case' => 0,
    'drug_sensitivity' => 0,
    'data' => 0,
    'blood_transfusion' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_6856d485c2c412_66916057',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6856d485c2c412_66916057')) {function content_6856d485c2c412_66916057($_smarty_tpl) {?>
<div class="portlet box purple">
    <div class="portlet-title">
        <div class="caption">Past History </div>
        <div class="actions"></div>
        <div class="tools">
            <a href="#" class="collapse" title="تصغير / تكبير"></a>
        </div>
    </div>
    <div class="portlet-body">
        <div class="row">
            <div id="ultrasoundgynaDiv">
                <div class="row">
                    <div class="portlet-body form" >
                        <form>
                            <div class="form-body">
                                <input type="hidden" id="pastsurgical_itr" value="<?php echo $_smarty_tpl->tpl_vars['pastsurgicalcount']->value;?>
"/>
                                <input type="hidden" id="contract_itr" value="<?php echo $_smarty_tpl->tpl_vars['allcontractcount']->value;?>
" />
                                <input type="hidden" id="pastmedical_itr" value="<?php echo $_smarty_tpl->tpl_vars['phpastmedicalcount']->value;?>
" />

                                <table>
                                    <tbody>
                                        <tr>
                                            <th class="wds15">Medical
                                                <button type="button" class="btn btn-xs blue" id="pastmedical_btn" data-summary="1">
                                                    <i class="fa fa-plus"></i> </button>
                                            </th>
                                            <td> 
                                                <table>
                                                    <tr>
                                                        <th class="wds45">Disease </th>
                                                        <th> Note</th>
                                                        <th class="wds10"> Husband</th>
                                                        <th class="wds5"> </th>
                                                    </tr>
                                                </table>
                                                <table  id="pastmedical_div">
                                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                    <?php  $_smarty_tpl->tpl_vars['myallphpastmedical'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myallphpastmedical']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['mypastmedical']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myallphpastmedical']->key => $_smarty_tpl->tpl_vars['myallphpastmedical']->value){
$_smarty_tpl->tpl_vars['myallphpastmedical']->_loop = true;
?>
                                                    <tr>
                                                        <td class="wds45">
                                                            <select  class="form-control medicaldisease updateElement allupdateselect" id="medicaldisease<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-val="<?php echo $_smarty_tpl->tpl_vars['myallphpastmedical']->value->medicaldisease;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"  name="medicaldisease" data-colName="medicaldisease" select-tableName="phpastmedicaldisease" data-id="<?php echo $_smarty_tpl->tpl_vars['myallphpastmedical']->value->id;?>
" data-tableName="phpastmedical" >
                                                                <option value="">choose</option>
                                                                <?php  $_smarty_tpl->tpl_vars['myallphpastmedicaldisease'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myallphpastmedicaldisease']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allphpastmedicaldisease']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myallphpastmedicaldisease']->key => $_smarty_tpl->tpl_vars['myallphpastmedicaldisease']->value){
$_smarty_tpl->tpl_vars['myallphpastmedicaldisease']->_loop = true;
?>
                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['myallphpastmedicaldisease']->value->id;?>
" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myallphpastmedical']->value->medicaldisease;?>
<?php $_tmp1=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myallphpastmedicaldisease']->value->id;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp1==$_tmp2){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['myallphpastmedicaldisease']->value->name;?>
 </option>
                                                                <?php } ?>
                                                                <option value="-2" class="deleteoptincompo">Delete</option>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="amrpop form-control updateElement"  
                                                                   name="medicalnote" data-colName="medicalnote" placeholder="Note" 
                                                                   value="<?php echo $_smarty_tpl->tpl_vars['myallphpastmedical']->value->medicalnote;?>
" 
                                                                   data-id="<?php echo $_smarty_tpl->tpl_vars['myallphpastmedical']->value->id;?>
" data-tableName="phpastmedical"/>
                                                        </td>
                                                        <td class="wds10">
                                                            <input type="checkbox"   id="for_husband" value="1" class="updateElementCheck" 
                                                                   data-id="<?php echo $_smarty_tpl->tpl_vars['myallphpastmedical']->value->id;?>
" data-tableName="phpastmedical" 
                                                                   data-colName="for_husband"  
                                                                   <?php if ($_smarty_tpl->tpl_vars['myallphpastmedical']->value->for_husband==1){?> checked <?php }?>>
                                                        </td>
                                                        <td class="wds5">
                                                            <a class="btn grey-cascade btn-xs deletemsgEX2" data-id="<?php echo $_smarty_tpl->tpl_vars['myallphpastmedical']->value->id;?>
" 
                                                               data-link="<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
"  data-fn="del" data-tableName="phpastmedical" data-colName="del">
                                                                <i class="fa fa-times"></i> </a>
                                                        </td>
                                                    </tr>
                                                    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                                                    <?php } ?>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th> Surgical 
                                                <button type="button" class="btn btn-xs blue" id="pastsurgical_btn" data-summary="1">
                                                    <i class="fa fa-plus"></i> </button>
                                            </th>
                                            <td> 
                                                <table>
                                                    <tr>
                                                        <th class="wds45">Operation </th>
                                                        <th> Note</th>
                                                        <th class="wds10"> Husband</th>
                                                        <th class="wds5"> </th>
                                                    </tr>
                                                </table>
                                                <table  id="pastsurgical_div">
                                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                    <?php  $_smarty_tpl->tpl_vars['myallpastsurgical'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myallpastsurgical']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['pastsurgical']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myallpastsurgical']->key => $_smarty_tpl->tpl_vars['myallpastsurgical']->value){
$_smarty_tpl->tpl_vars['myallpastsurgical']->_loop = true;
?>
                                                    <tr>
                                                        <td class="wds45">
                                                            <select  class="form-control surgicaloperation updateElement allupdateselect" id="surgicaloperation<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-val="<?php echo $_smarty_tpl->tpl_vars['myallpastsurgical']->value->surgicaloperation;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"  name="surgicaloperation" select-tableName="phpastsurgicaloperation" data-colName="surgicaloperation" data-id="<?php echo $_smarty_tpl->tpl_vars['myallpastsurgical']->value->id;?>
" data-tableName="phpastsurgical" >
                                                                <option value="">choose</option>
                                                                <?php  $_smarty_tpl->tpl_vars['myallphpastsurgicaloperation'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myallphpastsurgicaloperation']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allphpastsurgicaloperation']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myallphpastsurgicaloperation']->key => $_smarty_tpl->tpl_vars['myallphpastsurgicaloperation']->value){
$_smarty_tpl->tpl_vars['myallphpastsurgicaloperation']->_loop = true;
?>
                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['myallphpastsurgicaloperation']->value->id;?>
" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myallpastsurgical']->value->surgicaloperation;?>
<?php $_tmp3=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myallphpastsurgicaloperation']->value->id;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp3==$_tmp4){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['myallphpastsurgicaloperation']->value->name;?>
 </option>
                                                                <?php } ?>
                                                                <option value="-2" class="deleteoptincompo">Delete</option>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="amrpop form-control updateElement" 
                                                                   name="surgicalnote" data-colName="surgicalnote" placeholder="Note" 
                                                                   data-id="<?php echo $_smarty_tpl->tpl_vars['myallpastsurgical']->value->id;?>
" data-tableName="phpastsurgical" 
                                                                   value="<?php echo $_smarty_tpl->tpl_vars['myallpastsurgical']->value->surgicalnote;?>
"/>
                                                        </td>
                                                        <td class="wds10">
                                                            <input type="checkbox"   id="for_husband" value="1" class="updateElementCheck" 
                                                                   data-id="<?php echo $_smarty_tpl->tpl_vars['myallpastsurgical']->value->id;?>
" data-tableName="phpastsurgical"  
                                                                   data-colName="for_husband"   
                                                                   <?php if ($_smarty_tpl->tpl_vars['myallpastsurgical']->value->for_husband==1){?> checked <?php }?>>
                                                        </td>
                                                        <td class="wds5">
                                                            <a class="btn grey-cascade btn-xs deletemsgEX2" data-id="<?php echo $_smarty_tpl->tpl_vars['myallpastsurgical']->value->id;?>
" 
                                                               data-link="<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
"  data-fn="del" data-tableName="phpastsurgical" data-colName="del">
                                                                <i class="fa fa-times"></i> </a>
                                                        </td>
                                                    </tr>
                                                    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                                                    <?php } ?>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>Contraception
                                                <button type="button" class="btn btn-xs blue" id="contraception_btn" data-summary="1">
                                                    <i class="fa fa-plus"></i> </button>
                                            </th>
                                            <td> 
                                                <table>
                                                    <tr>
                                                        <th class="wds16">Type </th>
                                                        <th class="wds16">Duration </th>
                                                        <th class="wds16">Stopped </th>
                                                        <th> Note</th>
                                                        <th class="wds5"> </th>
                                                    </tr>
                                                </table>
                                                <table  id="contraception_div">
                                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                    <?php  $_smarty_tpl->tpl_vars['myallcontract'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myallcontract']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allcontract']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myallcontract']->key => $_smarty_tpl->tpl_vars['myallcontract']->value){
$_smarty_tpl->tpl_vars['myallcontract']->_loop = true;
?>
                                                    <tr>
                                                        <td class="wds16">
                                                            <select  class="form-control contype updateElement allupdateselect" id="contype<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" data-val="<?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->contype;?>
" data-itr="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
" name="contype" data-colName="contype" select-tableName="phcontracttype"  data-id="<?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->id;?>
"  data-tableName="phcontraception" >
                                                                <option value="">choose</option>
                                                                <?php  $_smarty_tpl->tpl_vars['myallphcontracttype'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myallphcontracttype']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allphcontracttype']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myallphcontracttype']->key => $_smarty_tpl->tpl_vars['myallphcontracttype']->value){
$_smarty_tpl->tpl_vars['myallphcontracttype']->_loop = true;
?>
                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['myallphcontracttype']->value->id;?>
" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->contype;?>
<?php $_tmp5=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['myallphcontracttype']->value->id;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp5==$_tmp6){?> selected <?php }?> ><?php echo $_smarty_tpl->tpl_vars['myallphcontracttype']->value->name;?>
 </option>
                                                                <?php } ?>

                                                                <option value="-2" class="deleteoptincompo">Delete</option>
                                                            </select>
                                                        </td>
                                                        <td class="wds16">
                                                            <input type="text" class="form-control updateElement wds85" placeholder="Duration" 
                                                                   name="contduration" data-colName="contduration"  
                                                                   value="<?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->contduration;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->id;?>
" 
                                                                   data-tableName="phcontraception"  style="display: inline;"/> Y
                                                        </td>
                                                        <td class="wds16">
                                                            <input type="text" class="form-control  updateElement wds85" placeholder="Stopped" 
                                                                   name="contstopped" data-colName="contstopped"  
                                                                   value="<?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->contstopped;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->id;?>
" 
                                                                   data-tableName="phcontraception" style="display: inline;"/> Y
                                                        </td>

                                                        <td>
                                                            <input type="text" class="amrpop form-control updateElement" placeholder="Note" 
                                                                   name="contranote" data-colName="contranote"  
                                                                   value="<?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->contranote;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->id;?>
" 
                                                                   data-tableName="phcontraception"/>
                                                        </td>


                                                        <td  class="wds5">
                                                            <a class="btn grey-cascade btn-xs deletemsgEX2" data-id="<?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->id;?>
" 
                                                               data-link="<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
"  data-fn="del" data-tableName="phcontraception" data-colName="del">
                                                                <i class="fa fa-times"></i> </a>
                                                        </td>
                                                    </tr>
                                                    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                                                    <?php } ?>
                                                </table>
                                            </td>
                                        </tr>

                                        <tr>
                                            <th>Drug Sensitivity</th>
                                            <td>
                                                <select multiple="" size="1" class="form-control select2me drug_sensitivity updateDiagnosis"
                                                        id="drug_sensitivity"   data-id="<?php echo $_smarty_tpl->tpl_vars['obstetric_case']->value->id;?>
" data-colName="drug_sensitivity" 
                                                        data-tableName="obstetric_case">
                                                    <option value="">choose</option>
                                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['drug_sensitivity']->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 (in_array($_smarty_tpl->tpl_vars['data']->value->id,$_smarty_tpl->tpl_vars['obstetric_case']->value->drug_sensitivity)){?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                    <?php } ?>
                                                    <option value="-1" class="addDiagnosis">Add</option>
                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                </select>
                                            </td>
                                        </tr>

                                        <tr>
                                            <th>Blood transfusion</th>
                                            <td> 
                                                <select multiple="" size="1" class="form-control select2me blood_transfusion updateDiagnosis"
                                                        id="blood_transfusion"   data-id="<?php echo $_smarty_tpl->tpl_vars['obstetric_case']->value->id;?>
" data-colName="blood_transfusion" 
                                                        data-tableName="obstetric_case">
                                                    <option value="">choose</option>
                                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['blood_transfusion']->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 (in_array($_smarty_tpl->tpl_vars['data']->value->id,$_smarty_tpl->tpl_vars['obstetric_case']->value->blood_transfusion)){?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                    <?php } ?>
                                                    <option value="-1" class="addDiagnosis">Add</option>
                                                    <option value="-2" class="deleteoptincompo">Delete</option>
                                                </select>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
</div>



<?php }} ?>