<?php /* Smarty version Smarty-3.1.11, created on 2025-03-22 11:56:01
         compiled from "../views/obgy/monitoring/add.html" */ ?>
<?php /*%%SmartyHeaderCode:989128867de8931ed9861-33559067%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a0721edb0f8b8399d592fa81a8765482dde195de' => 
    array (
      0 => '../views/obgy/monitoring/add.html',
      1 => 1627885404,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '989128867de8931ed9861-33559067',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'hosturl' => 0,
    'patientid' => 0,
    'monitorSheet' => 0,
    'procedures' => 0,
    'data' => 0,
    'ejacs' => 0,
    'pesas' => 0,
    'teses' => 0,
    'sryos' => 0,
    'protocols' => 0,
    'hmgs' => 0,
    'agonists' => 0,
    'presDate' => 0,
    'visits' => 0,
    'preItr' => 0,
    'PatientPresByDate' => 0,
    'itr' => 0,
    'pre' => 0,
    'allDrugcats' => 0,
    'cat' => 0,
    'drugs' => 0,
    'drug' => 0,
    'ProgramesettingData' => 0,
    'allDrugTypes' => 0,
    'type' => 0,
    'allDrugDoses' => 0,
    'dos' => 0,
    'group1' => 0,
    'inv' => 0,
    'j' => 0,
    'i' => 0,
    'group2' => 0,
    'group3' => 0,
    'group4' => 0,
    'favorites' => 0,
    'others' => 0,
    'group5' => 0,
    'hcgs' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67de89323caa65_31380282',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67de89323caa65_31380282')) {function content_67de89323caa65_31380282($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include '/home/dromargt4it/public_html/obgy/_library/smarty_plg/libs/plugins/modifier.date_format.php';
?>
<div class="page-content-wrapper">
    <div class="page-content all">
        <div class="row">
            <div class="col-md-12" style="padding-right: 0px; padding-left: 0px;">
                <div class="portlet box blue">
                    <div class="portlet-title" style="height: 5px">
                        <div class="caption">
                            <i class="fa fa-edit"></i> Monitoring sheet
                        </div>
                        <div class="actions">
                            <a href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/monitoring.php?ac=trials&patientid=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
" class="btn btn-default btn-sm">
                                Previous ART trials
                            </a>
                        </div>

                    </div>
                    <div class="portlet-body">
                        <table class="table table-striped table-hover table-bordered">
                            <thead>
                                <tr>
                                    <th class="col-md-2 wds5">
                                        Date
                                    </th>
                                    <td>
                                        <input type="text" class="form-control  datepicker updateElement visitdateAll" id="startDate" data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-colName="monitordate" id="monitordate" data-tableName="mointoringsheet" value="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->monitordate;?>
" />
                                    </td>
                                    <th class="col-md-2 wds5">
                                        LMP
                                    </th>
                                    <td>
                                        <input type="text" class="form-control  datepicker updateElement" data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-colName="lmp" id="lmp" data-tableName="mointoringsheet" value="<?php if ($_smarty_tpl->tpl_vars['monitorSheet']->value->lmp=='1970/01/01'){?><?php echo smarty_modifier_date_format(time(),"%Y/%m/%d");?>
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->lmp;?>
<?php }?>" />
                                    </td>
                                    <th class="col-md-2">
                                        Attemp No.
                                    </th>
                                    <td>
                                        <input type="text" class="form-control positiveNo updateElement" data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-colName="attempno" id="attempno" data-tableName="mointoringsheet" value="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->attempno;?>
" />
                                    </td>

                                </tr>
                            </thead>

                        </table>

                        <table class="table table-striped table-hover table-bordered">
                            <thead>
                                <tr>
                                    <th rowspan="2">
                                        procedure
                                    </th>
                                    <th colspan="4">
                                        Sem. source
                                    </th>
                                </tr>
                                <tr>
                                    <th>
                                        Ejac
                                    </th>
                                    <th>
                                        PESA
                                    </th>
                                    <th>
                                        TESE
                                    </th>
                                    <th>
                                        Cryo
                                    </th>
                                </tr>
                                <tr>
                                    <td>
                                        <select class="form-control  deleteoption  updateElement" id="procedure" data-val="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->procedure;?>
"
                                                name="procedure" select-tablename="mointoringsheetprocedure" select-colname="name"
                                                data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-tablename="mointoringsheet"  data-colname="procedure" >
                                            <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['procedures']->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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
<?php $_tmp1=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->procedure;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp1==$_tmp2){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
 </option>
                                            <?php } ?>
                                            <option value="-2" class="deleteoptincompo">Delete</option>
                                        </select>
                                    </td>
                                    <td>
                                        <select class="form-control  deleteoption  updateElement" id="ejac" data-val="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->ejac;?>
"
                                                name="ejac" select-tablename="mointoringsheetejac" select-colname="name"
                                                data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-tablename="mointoringsheet"  data-colname="ejac" >
                                            <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['ejacs']->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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
<?php $_tmp3=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->ejac;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp3==$_tmp4){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
 </option>
                                            <?php } ?>
                                            <option value="-2" class="deleteoptincompo">Delete</option>
                                        </select>
                                    </td>
                                    <td>
                                        <select class="form-control  deleteoption  updateElement" id="pesa" data-val="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->pesa;?>
"
                                                name="pesa" select-tablename="mointoringsheetpesa" select-colname="name"
                                                data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-tablename="mointoringsheet"  data-colname="pesa" >
                                            <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['pesas']->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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
<?php $_tmp5=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->pesa;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp5==$_tmp6){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
 </option>
                                            <?php } ?>
                                            <option value="-2" class="deleteoptincompo">Delete</option>
                                        </select>
                                    </td>
                                    <td>
                                        <select class="form-control  deleteoption  updateElement" id="tese" data-val="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->tese;?>
"
                                                name="tese" select-tablename="mointoringsheettese" select-colname="name"
                                                data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-tablename="mointoringsheet"  data-colname="tese" >
                                            <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['teses']->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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
<?php $_tmp7=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->tese;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp7==$_tmp8){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
 </option>
                                            <?php } ?>
                                            <option value="-2" class="deleteoptincompo">Delete</option>
                                        </select>
                                    </td>
                                    <td>
                                        <select class="form-control  deleteoption  updateElement" id="sryo" data-val="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->sryo;?>
"
                                                name="sryo" select-tablename="mointoringsheetsryo" select-colname="name"
                                                data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-tablename="mointoringsheet"  data-colname="sryo" >
                                            <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['sryos']->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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
<?php $_tmp9=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->sryo;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp9==$_tmp10){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
 </option>
                                            <?php } ?>
                                            <option value="-2" class="deleteoptincompo">Delete</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        Protocol
                                    </th>
                                    <th colspan="2">
                                        HMG Name
                                    </th>
                                    <th colspan="2">
                                        Agonist / Antagonist
                                    </th>
                                </tr>
                                <tr>
                                    <td>
                                        <select class="form-control  deleteoption  updateElement" id="protocol" data-val="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->protocol;?>
"
                                                name="protocol" select-tablename="mointoringsheetprotocol" select-colname="name"
                                                data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-tablename="mointoringsheet"  data-colname="protocol" >
                                            <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['protocols']->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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
<?php $_tmp11=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->protocol;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp11==$_tmp12){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
 </option>
                                            <?php } ?>
                                            <option value="-2" class="deleteoptincompo">Delete</option>
                                        </select>
                                    </td>
                                    <td colspan="2">
                                        <select class="form-control  deleteoption  updateElement" id="hmg" data-val="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->hmg;?>
"
                                                name="hmg" select-tablename="mointoringsheethmg" select-colname="name"
                                                data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-tablename="mointoringsheet"  data-colname="hmg" >
                                            <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['hmgs']->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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
<?php $_tmp13=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->hmg;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp13==$_tmp14){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
 </option>
                                            <?php } ?>
                                            <option value="-2" class="deleteoptincompo">Delete</option>
                                        </select>
                                    </td>
                                    <td colspan="2">
                                        <select class="form-control  deleteoption  updateElement" id="agonist" data-val="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->agonist;?>
"
                                                name="agonist" select-tablename="mointoringsheetagonist" select-colname="name"
                                                data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-tablename="mointoringsheet"  data-colname="agonist" >
                                            <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['agonists']->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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
<?php $_tmp15=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->agonist;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp15==$_tmp16){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
 </option>
                                            <?php } ?>
                                            <option value="-2" class="deleteoptincompo">Delete</option>
                                        </select>
                                    </td>
                                </tr>
                            </thead>
                            <tbody>

                            </tbody>


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


        <div class="row">
            <div class="col-md-12" style="padding-right: 0px; padding-left: 0px;">
                <div class="portlet box blue">
                    <div class="portlet-title" style="height: 5px">
                        <div class="caption">
                            <i class="fa fa-edit"></i> All visits
                        </div>

                        <div class="actions">
                            <a href="javascript:;" class="btn btn-default btn-sm" id="monitorAadd">
                                Add New</a>
                        </div>

                        <div class="actions">
                            <div class="btn-group">
                                <a class="btn btn-default btn-sm" href="javascript:;" data-toggle="dropdown">
                                    TTT <i class="fa fa-angle-down"></i>
                                </a>
                                <ul class="dropdown-menu pull-right">
                                    <li>
                                        <a href="javascript:;" id="addDrug"  data-date="<?php echo $_smarty_tpl->tpl_vars['presDate']->value;?>
" data-controller="monitoring">
                                            Add </a>
                                    </li>
                                    <li>
                                        <a href="javascript:;" id="showDrugs" data-controller="monitoring">
                                            Show </a>
                                    </li>
                                </ul>
                            </div>
                        </div>

                        <div class="actions">
                            <div class="btn-group">
                                <a class="btn btn-default btn-sm" href="javascript:;" data-toggle="dropdown">
                                    Lab <i class="fa fa-angle-down"></i>
                                </a>
                                <ul class="dropdown-menu pull-right">
                                    <li>
                                        <a href="javascript:;" id="addInv">
                                            Add </a>
                                    </li>
                                    <li>
                                        <a href="javascript:;" id="showInv" data-controller="monitoring">
                                            Show </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>

                    <div class="portlet-body check_heigt_and_make_new_class" id="justfordrugs" >

                        <table class="table table-striped table-hover table-bordered">
                            <thead>
                                <tr>
                                    <th rowspan="2">
                                        Date
                                    </th>
                                    <th rowspan="2">
                                        Cycle day
                                    </th>
                                    <th rowspan="2">
                                        HMG dose / day
                                    </th>
                                    <th rowspan="2">
                                        Endo
                                    </th>
                                    <th colspan="2">
                                        Folliculometry
                                    </th>
                                    <th rowspan="2">
                                        E2
                                    </th>
                                    <th rowspan="2">
                                        Delete
                                    </th>
                                </tr>
                                <tr>
                                    <th>
                                        Rt.
                                    </th>
                                    <th>
                                        Lt.
                                    </th>
                                </tr>
                            </thead>
                            <tbody id="monitorAaddDiv">
                                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['visits']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                                <tr>
                                    <td id="visitdate<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
">
                                        <input type="text" class="form-control updateElement  datepicker visitdate" data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" data-colName="visitdate" data-tableName="mointoringsheetvisits" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->visitdate;?>
" />
                                    </td>
                                    <td id="visitdateCycle<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
">
                                        <?php echo $_smarty_tpl->tpl_vars['data']->value->cycleday;?>

                                    </td>
                                    <td>
                                        <input type="text" class="form-control updateElement" data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" data-colName="hmg" data-tableName="mointoringsheetvisits" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->hmg;?>
" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="<?php echo $_smarty_tpl->tpl_vars['data']->value->hmg;?>
" />
                                    </td>
                                    <td>
                                        <input type="text" class="form-control updateElement" data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" data-colName="endo" data-tableName="mointoringsheetvisits" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->endo;?>
" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="<?php echo $_smarty_tpl->tpl_vars['data']->value->endo;?>
" />
                                    </td>
                                    <td>
                                        <textarea class="form-control txtc updateElement" rows="1" data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" data-colName="follicright" data-tableName="mointoringsheetvisits" placeholder="Enter more text" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="<?php echo $_smarty_tpl->tpl_vars['data']->value->follicright;?>
" ><?php echo $_smarty_tpl->tpl_vars['data']->value->follicright;?>
</textarea>
                                    </td>
                                    <td>
                                        <textarea class="form-control txtc updateElement" rows="1" data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" data-colName="follicleft" data-tableName="mointoringsheetvisits" placeholder="Enter more text" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="<?php echo $_smarty_tpl->tpl_vars['data']->value->follicleft;?>
" ><?php echo $_smarty_tpl->tpl_vars['data']->value->follicleft;?>
</textarea>
                                    </td>
                                    <td>
                                        <input type="text" class="form-control updateElement" data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" data-colName="e2" data-tableName="mointoringsheetvisits" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->e2;?>
" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="<?php echo $_smarty_tpl->tpl_vars['data']->value->e2;?>
" />
                                    </td>
                                    <td>
                                        <a class="btn grey-cascade btn-xs deletemsgEX" data-id="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" style=" float: left;" href="#" data-link="monitoring" data-fn="del" data-tableName="mointoringsheetvisits">
                                            <i class="fa fa-close"></i>
                                        </a>
                                    </td>
                                </tr>

                                <?php } ?>


                            </tbody>
                        </table>


                        <button id="remarkSheet" class="btn blue col-md-5">
                            Remarks
                        </button>

                        <button id="trigMonitorSheet" class="btn red col-md-3">
                            Trig
                        </button>




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

    </div>

</div>

<input type="hidden" id="patientId" value="<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
"/>
<input type="hidden" id="monitorSheetId" value="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
"/>
<input type="hidden" id="controllName" value="monitoring"/>
<!----#########################################################################  model ##############################################################################################################--->
<div class="all">
    <!---------------------------------------------------------------------------add Drugs Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="addPatientDrugs" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds90">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close closeDrug" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title">  </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <form class="form-horizontal" role="form" action="" method="post" id="gynaDrugs" enctype="multipart/form-data">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="portlet blue-hoki box">
                                        <div class="portlet-title" >
                                            <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; "> Today <input type="text" class="form-control datepicker " id="presDate" name="presDate" value="<?php echo $_smarty_tpl->tpl_vars['presDate']->value;?>
" data-controller="monitoring"  readonly="" placeholder="Date" style="display: inline;width: 110px;margin: 0px 10px;"> </div>
                                            <div class="actions">
                                                <a href="javascript:;" class="btn btn-default btn-sm" id="addNewDrugRow" data-tableName="mointoringsheetdrugs">
                                                    <i class="fa fa-plus"></i> Add </a>
                                                <a href="javascript:;" class="btn btn-default btn-sm" id="addNewDrugInTable">
                                                    <i class="fa fa-plus"></i> Add New Drug </a>
                                            </div>
                                            <div id="husbandFor">
                                                <label class="bold" style="font-size: 16px;">Husband <input type="checkbox" id="forHusband" name="forHusband"  value="1" data-controller="monitoring"></label>
                                            </div>
                                            <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; "> Print Date <input type="text" class="form-control datepicker " data-controller="monitoring"  id="printDate" name="printDate" value="<?php echo $_smarty_tpl->tpl_vars['presDate']->value;?>
"  readonly="" placeholder="Date" style="display: inline;width: 110px;margin: 0px 10px;"> </div>
                                        </div>

                                        <div class="portlet-body  scroll_y showNum isheight">

                                            <table class="table table-striped table-hover table-bordered" id="pre_table" >
                                                <thead>
                                                    <tr>
                                                        <th class="col-md-2">
                                                            Group
                                                        </th>
                                                        <th class="col-md-2">
                                                            Drug
                                                        </th>
                                                        <th class="col-md-2">
                                                            Form
                                                        </th>
                                                        <th class="col-md-5">
                                                            Use
                                                        </th>

                                                        <th >
                                                            Delete
                                                        </th>
                                                    </tr>
                                                </thead>
                                                <tbody id="drugContent">

                                                    <tr style="display: none"><td colspan="5" ><input type="hidden" id="drugItr" value="<?php echo $_smarty_tpl->tpl_vars['preItr']->value;?>
" name="drugItr"/></td></tr>
                                                    <?php $_smarty_tpl->tpl_vars['itr'] = new Smarty_variable(1, null, 0);?>
                                                    <?php  $_smarty_tpl->tpl_vars['pre'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['pre']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['PatientPresByDate']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['pre']->key => $_smarty_tpl->tpl_vars['pre']->value){
$_smarty_tpl->tpl_vars['pre']->_loop = true;
?>
                                                    <tr>
                                                        <td>
                                                            <select class="form-control xx dcat select2me" id="dcat<?php echo $_smarty_tpl->tpl_vars['itr']->value;?>
" name="dcat<?php echo $_smarty_tpl->tpl_vars['itr']->value;?>
"  data-itr="<?php echo $_smarty_tpl->tpl_vars['itr']->value;?>
"  data-placeholder="Select..."  >
                                                                <option value="" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugcat==''){?>selected<?php }?>>Choose Category</option>
                                                                <?php  $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allDrugcats']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
$_smarty_tpl->tpl_vars['cat']->_loop = true;
?>
                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['cat']->value['drugcat'];?>
" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugcat==$_smarty_tpl->tpl_vars['cat']->value['drugcat']){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['cat']->value['drugcat'];?>
</option>
                                                                <?php } ?>
                                                                <option value="" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugcat==''){?>selected<?php }?>>Choose Category</option>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select class="form-control xx dname select2me updateElement" id="dname<?php echo $_smarty_tpl->tpl_vars['itr']->value;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['pre']->value->id;?>
" data-colName="drugid" data-tableName="mointoringsheetdrugs" data-itr="<?php echo $_smarty_tpl->tpl_vars['itr']->value;?>
" data-placeholder="Select..."  >
                                                                <option value="" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugid==''){?>selected<?php }?>>Choose Drug</option>
                                                                <?php  $_smarty_tpl->tpl_vars['drug'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['drug']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['drugs']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['drug']->key => $_smarty_tpl->tpl_vars['drug']->value){
$_smarty_tpl->tpl_vars['drug']->_loop = true;
?>
                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['drug']->value['id'];?>
" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugid==$_smarty_tpl->tpl_vars['drug']->value['id']){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['drug']->value['drugname'];?>
 <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->visitsform==3){?>(left <?php echo $_smarty_tpl->tpl_vars['drug']->value['currentbalance'];?>
)<?php }?></option>
                                                                <?php } ?>
                                                                <option value="" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugid==''){?>selected<?php }?>>Choose Drug</option>
                                                            </select>

                                                        </td>
                                                        <td>
                                                            <select class="form-control xx dtype select2me updateElement" id="dtype<?php echo $_smarty_tpl->tpl_vars['itr']->value;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['pre']->value->id;?>
" data-colName="drugtype" data-tableName="mointoringsheetdrugs" data-itr="<?php echo $_smarty_tpl->tpl_vars['itr']->value;?>
" data-placeholder="Select..."  >
                                                                <option value="" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugtype==''){?>selected<?php }?>>Choose Form</option>
                                                                <?php  $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['type']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allDrugTypes']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value){
$_smarty_tpl->tpl_vars['type']->_loop = true;
?>
                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['type']->value['drugtype'];?>
" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugtype==$_smarty_tpl->tpl_vars['type']->value['drugtype']){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['type']->value['drugtype'];?>
</option>
                                                                <?php } ?>
                                                                <option value="" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugtype==''){?>selected<?php }?>>Choose Form</option>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <select class="form-control xx select2me updateElement" id="ddos<?php echo $_smarty_tpl->tpl_vars['itr']->value;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['pre']->value->id;?>
" data-colName="drugdos" data-tableName="mointoringsheetdrugs" data-itr="<?php echo $_smarty_tpl->tpl_vars['itr']->value;?>
" data-placeholder="Select..."  >
                                                                <option value="" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugdos==''){?>selected<?php }?>>choose dose </option>
                                                                <?php  $_smarty_tpl->tpl_vars['dos'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['dos']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allDrugDoses']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['dos']->key => $_smarty_tpl->tpl_vars['dos']->value){
$_smarty_tpl->tpl_vars['dos']->_loop = true;
?>
                                                                <option value="<?php echo $_smarty_tpl->tpl_vars['dos']->value['drugdos'];?>
" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugdos==$_smarty_tpl->tpl_vars['dos']->value['drugdos']){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['dos']->value['drugdos'];?>
</option>
                                                                <?php } ?>
                                                                <option value="" <?php if ($_smarty_tpl->tpl_vars['pre']->value->drugdos==''){?>selected<?php }?>>choose dose </option>
                                                            </select>
                                                        </td>

                                                        <td>
                                                            <a class="btn grey-cascade btn-xs deletemsgEX" data-id="<?php echo $_smarty_tpl->tpl_vars['pre']->value->id;?>
" style=" float: left;" href="#" data-link="monitoring" data-fn="addprescription">
                                                                <i class="fa fa-close"></i>
                                                            </a>
                                                        </td>
                                                    </tr>
                                                    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'itr', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['itr']->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 } ?>

                                                </tbody>
                                            </table>


                                            <input type="hidden" id="pId" value="" name="patientId"/>
                                            <input type="hidden" id="preType" value="" name="preType"/>
                                            <input type="hidden" id="preFor" value="" name="preFor"/>

                                            <div id="drugPrint">

                                            </div>

                                        </div>

                                    </div>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn default printPre"  data-type="add" data-controller="monitoring"> Print  </button>
                                    <button type="button" class="btn default closeDrug" id="closemodel" data-dismiss="modal"> Close</button>

                                </div>
                            </div>




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

    <!---------------------------------------------------------------------------show Drugs Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="showPatientDrugs" style="min-width:1000px;z-index: 10049;">
        <div class="modal-dialog  modal-lg wds90">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title">  </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="portlet blue-hoki box">
                                    <div class="portlet-title" >
                                        <div class="caption"> Prescriptions </div>
                                    </div>
                                    <div class="portlet-body" id="showPrescriptions">

                                        <table class="table table-striped table-hover table-bordered">
                                            <thead>
                                                <tr>
                                                    <th>
                                                        Date
                                                    </th>
                                                    <th>
                                                        Drug Name
                                                    </th>

                                                    <th>
                                                        Edit
                                                    </th>
                                                    <th>
                                                        Print
                                                    </th>
                                                    <th>
                                                        <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->displaydoctorname==1){?> Doctor<?php }?>
                                                    </th>
                                                </tr>
                                            </thead>

                                        </table>

                                    </div>
                                    <div id="drugPrintShow">

                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">

                                <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>

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


    <!--------------------------------------------------------------------------- add Investigation Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="addPatientInvestigation" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds95">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title">  </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <form class="form-horizontal" role="form" action="" method="post" id="gynaInvest" enctype="multipart/form-data">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="portlet blue-hoki box">
                                        <div class="portlet-title">
                                            <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; "> Today <input type="text" class="form-control datepicker " id="invDate" name="invDate" value="<?php echo $_smarty_tpl->tpl_vars['presDate']->value;?>
"  readonly="" placeholder="Date" style="display: inline; width: 62%"> </div>
                                            <div class="actions">
                                                <button type="button" class="btn default printInvestigation" data-print ="0" data-controller="monitoring"> Save </button>
                                                <button type="button" class="btn default printInvestigation" data-print ="1" data-controller="monitoring"> Save and Print  </button>
                                                <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>
                                            </div>
                                            <label class="husbandx">
                                                <span>  Husband
                                                    <input type="checkbox" id="forHusbandInv" name="forHusband"  value="1" style="padding: 4px 10px;">
                                                </span>
                                            </label>
                                            <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; "> Print Date <input type="text" class="form-control datepicker " data-controller="antenalvisit"  id="printInvDate" name="printInvDate" value="<?php echo $_smarty_tpl->tpl_vars['presDate']->value;?>
"  readonly="" placeholder="Date" style="display: inline;width: 110px;margin: 0px 10px;"> </div>

                                        </div>
                                        <div class="portlet-body">
                                            <input type="hidden" id="pId1" value="" name="patientId"/>
                                            <div class="row" style="padding-left: 9px;padding-top:5px;overflow-y: scroll;">
                                                <div class="wds20 fleft">
                                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                    <?php  $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['group1']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
$_smarty_tpl->tpl_vars['cat']->_loop = true;
?>

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> <?php echo $_smarty_tpl->tpl_vars['cat']->value->name;?>

                                                        <span>
                                                            <input type="checkbox" data-gClass="<?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(1, null, 0);?>
                                                        <?php  $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['inv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cat']->value->invests; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['inv']->key => $_smarty_tpl->tpl_vars['inv']->value){
$_smarty_tpl->tpl_vars['inv']->_loop = true;
?>
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" class="iiin <?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check" id="" value="<?php echo $_smarty_tpl->tpl_vars['inv']->value->id;?>
" name="invCheck[]">
                                                            </span> <?php echo $_smarty_tpl->tpl_vars['inv']->value->name;?>

                                                        </label>

                                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'j', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['j']->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 } ?>
                                                    </div>
                                                    <?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 } ?>
                                                </div>
                                                <div class="wds20 fleft">
                                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                    <?php  $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['group2']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
$_smarty_tpl->tpl_vars['cat']->_loop = true;
?>

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> <?php echo $_smarty_tpl->tpl_vars['cat']->value->name;?>

                                                        <span>
                                                            <input type="checkbox" data-gClass="<?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(1, null, 0);?>
                                                        <?php  $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['inv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cat']->value->invests; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['inv']->key => $_smarty_tpl->tpl_vars['inv']->value){
$_smarty_tpl->tpl_vars['inv']->_loop = true;
?>
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" class="iiin <?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check" id="" value="<?php echo $_smarty_tpl->tpl_vars['inv']->value->id;?>
" name="invCheck[]">
                                                            </span> <?php echo $_smarty_tpl->tpl_vars['inv']->value->name;?>

                                                        </label>

                                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'j', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['j']->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 } ?>
                                                    </div>
                                                    <?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 } ?>
                                                </div>
                                                <div class="wds20 fleft">
                                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                    <?php  $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['group3']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
$_smarty_tpl->tpl_vars['cat']->_loop = true;
?>

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> <?php echo $_smarty_tpl->tpl_vars['cat']->value->name;?>

                                                        <span>
                                                            <input type="checkbox" data-gClass="<?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(1, null, 0);?>
                                                        <?php  $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['inv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cat']->value->invests; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['inv']->key => $_smarty_tpl->tpl_vars['inv']->value){
$_smarty_tpl->tpl_vars['inv']->_loop = true;
?>
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" id="" class="iiin <?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check"  value="<?php echo $_smarty_tpl->tpl_vars['inv']->value->id;?>
" name="invCheck[]">
                                                            </span> <?php echo $_smarty_tpl->tpl_vars['inv']->value->name;?>

                                                        </label>

                                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'j', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['j']->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 } ?>
                                                    </div>
                                                    <?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 } ?>
                                                </div>
                                                <div class="wds20 fleft">
                                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                    <?php  $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['group4']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
$_smarty_tpl->tpl_vars['cat']->_loop = true;
?>

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> <?php echo $_smarty_tpl->tpl_vars['cat']->value->name;?>

                                                        <span>
                                                            <input type="checkbox" data-gClass="<?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(1, null, 0);?>
                                                        <?php  $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['inv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cat']->value->invests; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['inv']->key => $_smarty_tpl->tpl_vars['inv']->value){
$_smarty_tpl->tpl_vars['inv']->_loop = true;
?>
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" id="" class="iiin <?php if ($_smarty_tpl->tpl_vars['cat']->value->name=='Male(Husband)'){?>husbandCheck<?php }?> <?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check" value="<?php echo $_smarty_tpl->tpl_vars['inv']->value->id;?>
" name="invCheck[]">
                                                            </span> <?php echo $_smarty_tpl->tpl_vars['inv']->value->name;?>

                                                        </label>

                                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'j', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['j']->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 } ?>
                                                    </div>
                                                    <?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 } ?>
                                                </div>

                                                <div class="wds20 fleft">
                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1">  Favorites
                                                        <span>
                                                            <input type="checkbox" data-gClass="favoriteCheck" class="iiin checkGroup">
                                                        </span>

                                                    </label>
                                                    <div class="checkbox-list">
                                                        <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(1, null, 0);?>
                                                        <?php  $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['inv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['favorites']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['inv']->key => $_smarty_tpl->tpl_vars['inv']->value){
$_smarty_tpl->tpl_vars['inv']->_loop = true;
?>
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" class="favoriteCheck iiin" id="" value="<?php echo $_smarty_tpl->tpl_vars['inv']->value->id;?>
" name="invCheck[]">
                                                            </span> <?php echo $_smarty_tpl->tpl_vars['inv']->value->name;?>

                                                        </label>

                                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'j', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['j']->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 } ?>
                                                    </div>

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

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> <?php echo $_smarty_tpl->tpl_vars['cat']->value->name;?>

                                                        <span>
                                                            <input type="checkbox" data-gClass="<?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(1, null, 0);?>
                                                        <?php  $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['inv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cat']->value->invests; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['inv']->key => $_smarty_tpl->tpl_vars['inv']->value){
$_smarty_tpl->tpl_vars['inv']->_loop = true;
?>
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" class="<?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check iiin" id="" value="<?php echo $_smarty_tpl->tpl_vars['inv']->value->id;?>
" name="invCheck[]">
                                                            </span> <?php echo $_smarty_tpl->tpl_vars['inv']->value->name;?>

                                                        </label>

                                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'j', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['j']->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 } ?>
                                                    </div>
                                                    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                                                    <?php } ?>

                                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                    <?php  $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['group5']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
$_smarty_tpl->tpl_vars['cat']->_loop = true;
?>

                                                    <label style="font-weight:bold; text-decoration:underline" for="form_control_1"> <?php echo $_smarty_tpl->tpl_vars['cat']->value->name;?>

                                                        <span>
                                                            <input type="checkbox" data-gClass="<?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check" class="iiin checkGroup">
                                                        </span>
                                                    </label>
                                                    <div class="checkbox-list">
                                                        <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(1, null, 0);?>
                                                        <?php  $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['inv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['cat']->value->invests; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['inv']->key => $_smarty_tpl->tpl_vars['inv']->value){
$_smarty_tpl->tpl_vars['inv']->_loop = true;
?>
                                                        <label>
                                                            <span>
                                                                <input type="checkbox" class="iiin <?php echo $_smarty_tpl->tpl_vars['cat']->value->id;?>
Check" id="" value="<?php echo $_smarty_tpl->tpl_vars['inv']->value->id;?>
" name="invCheck[]">
                                                            </span> <?php echo $_smarty_tpl->tpl_vars['inv']->value->name;?>

                                                        </label>

                                                        <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'j', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['j']->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 } ?>
                                                    </div>
                                                    <?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 } ?>
                                                </div>
                                            </div>


                                            <div  id="inv_div">

                                            </div>



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

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


        </div>
    </div>


    <!--------------------------------------------------------------------------- show Investigation Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="showPatientInvestigation" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds80">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title">  </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="portlet blue-hoki box">
                                    <div class="portlet-title">
                                        <div class="caption"> Investigations  </div>
                                    </div>
                                    <div class="portlet-body all">
                                        <div  id="showInvs">
                                            <table class="table table-striped table-hover table-bordered">
                                                <thead>
                                                    <tr>
                                                        <th> <div align="center">Date </div></th>
                                                        <th colspan="3"> <div align="center">Investigations </div></th>
                                                    </tr>
                                                </thead>

                                            </table>
                                        </div>
                                        <div  id="inv_divShow">

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>

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


</div>

<div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"  id="remarkModel">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"> Remarks </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">
                    <form action="" id="" method="post" class="form-horizontal  emptyform" >
                        <div class="form-body all" >
                            <!------===========================================------->
                            <div class="form-group">
                                <label class="col-md-1 control-label"> </label>
                                <div class="col-md-10">
                                    <div class="" >
                                        <table class="table table-striped table-hover table-bordered">
                                            <thead>
                                                <tr>
                                                    <th>
                                                        Remarks.
                                                    </th>
                                                    <td>
                                                        <textarea class="form-control txtc updateElement" id="remarks" rows="5" data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-colName="remarks" data-tableName="mointoringsheet" placeholder="Enter more text" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->remarks;?>
" ><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->remarks;?>
</textarea>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th>
                                                        HCG.
                                                    </th>
                                                    <td>
                                                        <select class="form-control  deleteoption  updateElement" id="hcg" data-val="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->hcg;?>
"
                                                                name="hcg" select-tablename="mointoringsheethcg" select-colname="name"
                                                                data-id="<?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->id;?>
" data-tablename="mointoringsheet"  data-colname="hcg" >
                                                            <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['hcgs']->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 ob_start();?><?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
<?php $_tmp17=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['monitorSheet']->value->hcg;?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp17==$_tmp18){?> selected <?php }?>><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
 </option>
                                                            <?php } ?>
                                                            <option value="-2" class="deleteoptincompo">Delete</option>
                                                        </select>
                                                    </td>
                                                </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                                <label class="col-md-1 control-label"> </label>
                            </div>

                            <!------===========================================------->

                            <!------===========================================------->
                            <div class="modal-footer">

                                <button type="button" id="amountcloseinput"   class="btn default" data-dismiss="modal">Close</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
    </div>
</div>


<div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"  id="edit_model">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"> Edit </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">
                    <form action="" id="" method="post" class="form-horizontal  emptyform" >
                        <div class="form-body all" >
                            <!------===========================================------->
                            <div class="form-group">
                                <label class="col-md-1 control-label"> </label>
                                <div class="col-md-10">
                                    <div id="alldatadiv" class="" > </div>
                                </div>
                                <label class="col-md-1 control-label"> </label>
                            </div>

                            <!------===========================================------->

                            <!------===========================================------->
                            <div class="modal-footer">

                                <button type="button" id="amountcloseinput"   class="btn default" data-dismiss="modal">Close</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
    </div>
</div>

<!------------------##############################-------------------- End of Models -----------------------#########################################-------------->


<?php }} ?>