<?php /* Smarty version Smarty-3.1.11, created on 2024-08-26 07:27:42
         compiled from "../views/obgy/gyna/add.html" */ ?>
<?php /*%%SmartyHeaderCode:51482942366cc90de7f9324-76595742%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'bf8887ae450e461cb2c6ee3395704b73f02bbe88' => 
    array (
      0 => '../views/obgy/gyna/add.html',
      1 => 1647246460,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '51482942366cc90de7f9324-76595742',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'programesetting' => 0,
    'main_Obj' => 0,
    'presDate' => 0,
    'ProgramesettingData' => 0,
    'allgyna' => 0,
    'gyna_obj' => 0,
    'allcomplaint' => 0,
    'comp' => 0,
    'alldiagnosis' => 0,
    'mydiagnosis' => 0,
    'patientid' => 0,
    'iDsArray' => 0,
    'ultrasoundForm' => 0,
    'allgynaUS' => 0,
    'gUs' => 0,
    'i' => 0,
    'j' => 0,
    'preItr' => 0,
    'PatientPresByDate' => 0,
    'itr' => 0,
    'pre' => 0,
    'allDrugcats' => 0,
    'cat' => 0,
    'drugs' => 0,
    'drug' => 0,
    'allDrugTypes' => 0,
    'type' => 0,
    'allDrugDoses' => 0,
    'dos' => 0,
    'group1' => 0,
    'inv' => 0,
    'group2' => 0,
    'group3' => 0,
    'group4' => 0,
    'favorites' => 0,
    'others' => 0,
    'group5' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66cc90de97b2a1_73880430',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66cc90de97b2a1_73880430')) {function content_66cc90de97b2a1_73880430($_smarty_tpl) {?><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">
                            <div class="caption">
                                <?php if ($_smarty_tpl->tpl_vars['programesetting']->value->programview==1){?> GYNA <?php }?>
                            </div>
                        </div>

                    </div>
                    <div class="portlet-body">


                        <table class="table table-striped table-hover table-bordered">
                            <thead>
                            <tr>

                                <th class="col-md-12">
                                    Notes
                                </th>

                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>
                                    <textarea class="form-control txtc updateElement" rows="1" data-id="<?php echo $_smarty_tpl->tpl_vars['main_Obj']->value->id;?>
" data-colName="notes" data-tableName="maingyna" placeholder="Enter more text"
                                              data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="<?php echo $_smarty_tpl->tpl_vars['main_Obj']->value->notes;?>
"><?php echo $_smarty_tpl->tpl_vars['main_Obj']->value->notes;?>
</textarea>
                                </td>

                            </tr>
                            <tr>
                                <td>
                                    <textarea class="form-control txtc updateElement" rows="1" data-id="<?php echo $_smarty_tpl->tpl_vars['main_Obj']->value->id;?>
" data-colName="plan" data-tableName="maingyna" placeholder="Plan"
                                              data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="<?php echo $_smarty_tpl->tpl_vars['main_Obj']->value->plan;?>
"><?php echo $_smarty_tpl->tpl_vars['main_Obj']->value->plan;?>
</textarea>
                                </td>

                            </tr>
                            </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">
                            All visits
                        </div>
                        <div class="actions">
                            <a href="javascript:;" class="btn btn-default btn-sm" id="gyna_add">
                                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="gyna">
                                            Add </a>
                                    </li>
                                    <li>
                                        <a href="javascript:;" id="showDrugs" data-controller="gyna">
                                            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="gyna">
                                            Show </a>
                                    </li>
                                </ul>
                            </div>
                        </div>


                        <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->programview==1){?>
                        <div class="actions">
                            <a href="javascript:;" class="btn btn-default btn-sm" id="addUS">
                                &nbsp;&nbsp;
                                US
                                &nbsp;&nbsp;&nbsp;
                            </a>
                        </div>
                        <?php }else{ ?>
                        <div class="actions">
                            <div class="btn-group">
                                <a class="btn btn-default btn-sm" href="javascript:;" data-toggle="dropdown">
                                    P.H <i class="fa fa-angle-down"></i>
                                </a>
                                <ul class="dropdown-menu pull-right">
                                    <li>
                                        <a href="javascript:;" id="addph" data-controller="gyna">
                                            Add </a>
                                    </li>
                                    <li>
                                        <a href="javascript:;" id="showph" data-controller="gyna">
                                            Show </a>
                                    </li>
                                </ul>
                            </div>
                        </div>

                        <?php }?>

                        <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->infertility==1){?>
                        <div class="actions">
                            <a href="javascript:;" class="btn btn-default btn-sm" id="addInf">
                                Infertility
                            </a>
                        </div>

                        <?php }?>


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

                        </div>
                        <table class="table table-striped table-hover table-bordered" id="gyna">
                            <thead>
                            <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->diagnosshow==0){?>
                            <tr>
                                <th class="col-md-2 wds12">
                                    Date
                                </th>
                                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->gynalmp==1){?>
                                <th class="col-md-2 wds12">
                                    LMP
                                </th>
                                <th style="width: 26%;">
                                    Complaint
                                </th>
                                <th style="width: 26%;">
                                    Diagnosis
                                </th>

                                <th>
                                    Notes
                                </th>

                                <?php }else{ ?>
                                <th style="width: 29%;">
                                    Complaint
                                </th>
                                <th style="width: 29%;">
                                    Diagnosis
                                </th>

                                <th>
                                    Notes
                                </th>

                                <?php }?>


                                <th style="width: 5px;">
                                    Delete
                                </th>
                            </tr>

                            <?php }else{ ?>
                            <tr>
                                <th class="col-md-2 wds12">
                                    Date
                                </th>
                                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->gynalmp==1){?>
                                <th class="col-md-2 wds12">
                                    LMP
                                </th>
                                <th style="width: 29%;">
                                    Complaint
                                </th>
                                <th>
                                    Notes
                                </th>
                                <?php }else{ ?>
                                <th style="width: 29%;">
                                    Complaint
                                </th>
                                <th>
                                    Notes
                                </th>

                                <?php }?>

                                <th style="width: 5px;">
                                    Delete
                                </th>
                            </tr>

                            <?php }?>

                            </thead>
                            <tbody>
                            <?php  $_smarty_tpl->tpl_vars['gyna_obj'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['gyna_obj']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allgyna']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['gyna_obj']->key => $_smarty_tpl->tpl_vars['gyna_obj']->value){
$_smarty_tpl->tpl_vars['gyna_obj']->_loop = true;
?>
                            <tr>
                                <td>
                                    <input type="text" class="form-control datepicker" data-id="<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->id;?>
" data-colName="gynadate" data-tableName="gyna" value="<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->gynadate;?>
"/>
                                </td>

                                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->gynalmp==1){?>
                                <td>
                                    <input type="text" class="form-control datepicker" data-id="<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->id;?>
" data-colName="gynalmp" data-tableName="gyna" value="<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->gynalmp;?>
"/>
                                </td>
                                <?php }?>

                                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->diagnosshow==0){?>
                                <td>
                                    <!--     -->
                                    <!--select2me complaint-->

                                    <select multiple="" size="1" class="form-control select2me complaint updateDiagnosis" id="complaint<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->id;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->id;?>
"
                                            data-colName="complaintid" data-tableName="gyna">
                                        <option value="">choose</option>

                                        <?php  $_smarty_tpl->tpl_vars['comp'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['comp']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allcomplaint']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['comp']->key => $_smarty_tpl->tpl_vars['comp']->value){
$_smarty_tpl->tpl_vars['comp']->_loop = true;
?>
                                        <option value="<?php echo $_smarty_tpl->tpl_vars['comp']->value->id;?>
" <?php if (in_array($_smarty_tpl->tpl_vars['comp']->value->id,$_smarty_tpl->tpl_vars['gyna_obj']->value->compselect)){?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['comp']->value->name;?>
</option>
                                        <?php } ?>
                                        <option value="-1" class="addDiagnosis">Add</option>
                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                    </select>

                                </td>
                                <td>
                                    <!--     -->
                                    <!--select2me diagnosis-->

                                    <select multiple="" size="1" class="form-control select2me diagnosis updateDiagnosis" id="diagnosis<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->id;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->id;?>
"
                                            data-colName="diagnosisid" data-tableName="gyna">
                                        <option value="">choose</option>

                                        <?php  $_smarty_tpl->tpl_vars['mydiagnosis'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['mydiagnosis']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['alldiagnosis']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['mydiagnosis']->key => $_smarty_tpl->tpl_vars['mydiagnosis']->value){
$_smarty_tpl->tpl_vars['mydiagnosis']->_loop = true;
?>
                                        <option value="<?php echo $_smarty_tpl->tpl_vars['mydiagnosis']->value->id;?>
" <?php if (in_array($_smarty_tpl->tpl_vars['mydiagnosis']->value->id,$_smarty_tpl->tpl_vars['gyna_obj']->value->select)){?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['mydiagnosis']->value->name;?>
</option>
                                        <?php } ?>
                                        <option value="-1" class="addDiagnosis">Add</option>
                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                    </select>
                                </td>
                                <?php }else{ ?>


                                <td>
                                    <input type="text" class="form-control updateElement" data-id="<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->id;?>
" data-colName="complaint" data-tableName="gyna" value="<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->complaint;?>
"
                                           data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="<?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value->complaint;?>
"/>

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


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

</div>
<input type="hidden" id="patientId" value="<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
"/>
<input type="hidden" id="controllName" value="gyna"/>
<input type="hidden" id="iDsArray" value="<?php echo $_smarty_tpl->tpl_vars['iDsArray']->value;?>
"/>
<input type="hidden" id="ultrasoundForm" value="<?php echo $_smarty_tpl->tpl_vars['ultrasoundForm']->value;?>
"/>
<!----#########################################################################  model ##############################################################################################################--->
<div class="all">
    <!--------------------------------------------------------------------------- simple form Ultrasound Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false" id="SimplePatientUS" style="min-width:1000px;">
        <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">
                                            <i class="fa fa-cogs"></i> Ultrasound
                                        </div>
                                        <div class="actions">
                                            <a href="javascript:;" class="btn btn-default btn-sm addRowH" data-type="ussimple">
                                                <i class="fa fa-plus"></i> Add </a>

                                            <a href="javascript:;" class="btn btn-default btn-sm printUsRows" data-type="usgyna">
                                                <i class="fa fa-print"></i> print </a>

                                        </div>
                                    </div>
                                    <div class="portlet-body scroll_y showNumGyna">

                                        <table class="table table-striped table-hover table-bordered">

                                            <thead>
                                            <tr>
                                                <th rowspan="2">
                                                    <!--<input type="checkbox" id="usPrintAll">-->
                                                </th>
                                                <th rowspan="2" class="cent" style=" width: 100px; ">
                                                    Date
                                                </th>
                                                <th rowspan="2" class="cent" style=" width: 60px; ">
                                                    Day
                                                </th>
                                                <th colspan="2" class="cent">
                                                    Right Ovary
                                                </th>

                                                <th colspan="2" class="cent">
                                                    Left Ovary
                                                </th>
                                                <th rowspan="2" class="cent" style=" width: 60px; ">
                                                    Endo
                                                </th>

                                                <th rowspan="2" class="cent">
                                                    Notes
                                                </th>
                                                <th rowspan="2" class="cent">
                                                    Delete
                                                </th>
                                                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->displaydoctorname==1){?>
                                                <th rowspan="2">
                                                    Doctor
                                                </th>
                                                <?php }?>
                                            </tr>
                                            <tr>
                                                <th style=" width: 60px; background: #c6d7f2;">
                                                    No
                                                </th>

                                                <th style="background: #c6d7f2;">
                                                    Size
                                                </th>
                                                <th style=" width: 60px; background: #c6d7f2;">
                                                    No
                                                </th>

                                                <th style="background: #c6d7f2;">
                                                    Size
                                                </th>
                                                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->displaydoctorname==1){?> <?php }?>

                                            </tr>
                                            </thead>


                                            <tbody id="ussimple">
                                            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                            <?php  $_smarty_tpl->tpl_vars['gUs'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['gUs']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allgynaUS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['gUs']->key => $_smarty_tpl->tpl_vars['gUs']->value){
$_smarty_tpl->tpl_vars['gUs']->_loop = true;
?>
                                            <tr>
                                                <td>
                                                    <input type="checkbox" class="usPrint" id="usPrint<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" name="pic[]" value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
"/>
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control datepicker updateElement" readonly="" placeholder="Date" data-colName="date" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
"
                                                           data-tableName="gynaus" value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->date;?>
"/>
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="Day" data-colName="day" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->day;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="R.No" data-colName="ovraylno" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->ovraylno;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="R.size" data-colName="ovraylsize" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->ovraylsize;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="L.No" data-colName="ovrayrno" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->ovrayrno;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="L.size" data-colName="ovrayrsize" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->ovrayrsize;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="Endo" data-colName="endo" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->endo;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="Notes" data-colName="notes" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->notes;?>
">
                                                </td>

                                                <td>
                                                    <a class="btn grey-cascade btn-xs deletemsgEX" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" style=" float: left;" href="#" data-link="gyna" data-fn="delgynaus">
                                                        <i class="fa fa-close"></i>
                                                    </a>
                                                </td>
                                                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->displaydoctorname==1){?>
                                                <td class="bold">
                                                    <?php echo $_smarty_tpl->tpl_vars['gUs']->value->doctorname;?>

                                                </td>
                                                <?php }?>
                                            </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 } ?>
                                            </tbody>
                                        </table>
                                        <input type="hidden" id="ussimpleItr" value="<?php echo $_smarty_tpl->tpl_vars['i']->value;?>
"/>
                                    </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>

    <!--------------------------------------------------------------------------- complete form Ultrasound Model-------------------------------------------------------------------------------------->
    <div class="modal fade " tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false" id="completePatientUS" style="min-width:1000px;">
        <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">
                                            <i class="fa fa-cogs"></i> Ultrasound
                                        </div>
                                        <div class="actions">
                                            <a href="javascript:;" class="btn btn-default btn-sm addRowH" data-type="uscomplete">
                                                <i class="fa fa-plus"></i> Add </a>

                                            <a href="javascript:;" class="btn btn-default btn-sm printUsRows" data-type="usgyna">
                                                <i class="fa fa-print"></i> print </a>

                                        </div>
                                    </div>
                                    <div class="portlet-body scroll_y showNumGyna">

                                        <table class="table table-striped table-hover table-bordered">
                                            <thead>
                                            <tr>
                                                <th>
                                                    <input type="checkbox" id="usPrintAll">
                                                </th>
                                                <th class="cent">
                                                    #
                                                </th>
                                                <th class="cent">
                                                    Date
                                                </th>
                                                <th class="cent">
                                                    Day
                                                </th>
                                                <th class="cent">
                                                    Endo
                                                </th>

                                                <th colspan="3" class="cent">
                                                    UTERUS
                                                </th>

                                                <th colspan="3" class="cent">
                                                    CERVIX
                                                </th>

                                                <th colspan="3" class="cent">
                                                    OVARY Lt
                                                </th>

                                                <th colspan="3" class="cent">
                                                    OVARY Rt
                                                </th>


                                                <th class="cent">
                                                    LTovary
                                                </th>
                                                <th class="cent">
                                                    Rtovary
                                                </th>
                                                <th class="cent">
                                                    Delete
                                                </th>
                                                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->displaydoctorname==1){?>
                                                <th>
                                                    Doctor
                                                </th>
                                                <?php }?>

                                            </tr>
                                            <tr>
                                                <th>

                                                </th>
                                                <th>

                                                </th>
                                                <th class="col-md-1">

                                                </th>
                                                <th>

                                                </th>
                                                <th>

                                                </th>
                                                <th>
                                                    L
                                                </th>

                                                <th>
                                                    W
                                                </th>
                                                <th>
                                                    V
                                                </th>

                                                <th>
                                                    L
                                                </th>

                                                <th>
                                                    W
                                                </th>
                                                <th>
                                                    V
                                                </th>
                                                <th>
                                                    L
                                                </th>

                                                <th>
                                                    W
                                                </th>
                                                <th>
                                                    V
                                                </th>
                                                <th>
                                                    L
                                                </th>

                                                <th>
                                                    W
                                                </th>
                                                <th>
                                                    V
                                                </th>
                                                <th>

                                                </th>
                                                <th>

                                                </th>
                                                <th>

                                                </th>
                                                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->displaydoctorname==1){?>
                                                <th>

                                                </th>
                                                <?php }?>


                                            </tr>
                                            </thead>
                                            <tbody id="uscomplete">
                                            <?php $_smarty_tpl->tpl_vars['j'] = new Smarty_variable(1, null, 0);?>
                                            <?php  $_smarty_tpl->tpl_vars['gUs'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['gUs']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allgynaUS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['gUs']->key => $_smarty_tpl->tpl_vars['gUs']->value){
$_smarty_tpl->tpl_vars['gUs']->_loop = true;
?>
                                            <tr>
                                                <td>
                                                    <input type="checkbox" class="usPrint" id="usPrint<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" name="pic[]" value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
"/>
                                                </td>
                                                <td>
                                                    <?php echo $_smarty_tpl->tpl_vars['j']->value;?>

                                                </td>
                                                <td>
                                                    <input type="text" class="form-control datepicker updateElement" readonly="" placeholder="Date" data-colName="date" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
"
                                                           data-tableName="gynaus" value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->date;?>
"/>
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="Day" data-colName="day" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->day;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="Endo" data-colName="endo" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->endo;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="L" data-colName="uterusl" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->uterusl;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="W" data-colName="uterusw" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->uterusw;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="V" data-colName="uterusv" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->uterusv;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="L" data-colName="cervixl" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->cervixl;?>
">
                                                </td>

                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="W" data-colName="cervixw" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->cervixw;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="V" data-colName="cervixv" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->cervixv;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="L" data-colName="ovrayll" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->ovrayll;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="W" data-colName="ovraylw" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->ovraylw;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="V" data-colName="ovraylv" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->ovraylv;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="L" data-colName="ovrayrl" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->ovrayrl;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="W" data-colName="ovrayrw" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->ovrayrw;?>
">
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control updateElement" placeholder="V" data-colName="ovrayrv" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-tableName="gynaus"
                                                           value="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->ovrayrv;?>
">
                                                </td>
                                                <td>
                                                    <?php if ($_smarty_tpl->tpl_vars['gUs']->value->lfolliclesno==0){?>
                                                    <a href="#" class="btn green btn-block btn-xs addLTovary" id="addLTovary<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-type="add" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
"> ADD </a>
                                                    <?php }else{ ?>
                                                    <a href="#" class="btn green btn-block btn-xs addLTovary" data-type="show" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
"> Show </a>
                                                    <?php }?>
                                                </td>
                                                <td>
                                                    <?php if ($_smarty_tpl->tpl_vars['gUs']->value->rfolliclesno==0){?>
                                                    <a href="#" class="btn green btn-block btn-xs addRtovary" id="addRtovary<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" data-type="add" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
"> ADD </a>
                                                    <?php }else{ ?>
                                                    <a href="#" class="btn green btn-block btn-xs addRtovary" data-type="show" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
"> Show </a>
                                                    <?php }?>

                                                </td>

                                                <td>
                                                    <a class="btn grey-cascade btn-xs deletemsgEX" data-id="<?php echo $_smarty_tpl->tpl_vars['gUs']->value->id;?>
" style=" float: left;" href="#" data-link="gyna" data-fn="delgynaus">
                                                        <i class="fa fa-close"></i>
                                                    </a>
                                                </td>
                                                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->displaydoctorname==1){?>
                                                <td class="bold">
                                                    <?php echo $_smarty_tpl->tpl_vars['gUs']->value->doctorname;?>

                                                </td>
                                                <?php }?>
                                            </tr>

                                            <?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 } ?>
                                            </tbody>
                                        </table>
                                        <input type="hidden" id="uscompleteItr" value="<?php echo $_smarty_tpl->tpl_vars['j']->value;?>
"/>
                                        <input type="hidden" id="currentBtnId" value=""/>

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


    </div>


    <!---------------------------------------------------------------------------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="gyna"
                                                                                                                                          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="gynadrugs">
                                                    <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="gyna"></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="antenalvisit" 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="gynadrugs" 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="gynadrugs" 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="gynadrugs"
                                                                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="gyna" 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>
                                            <!--<div class="md-checkbox" id="husbandFor">
                                                <input type="checkbox" id="forHusband" name="forHusband"  class="md-check" value="1" data-controller="gyna">
                                                <label for="forHusband" class="bold">
                                                    <span></span>
                                                    <span class="check"></span>
                                                    <span class="box"></span>
                                                    Make this for Husband </label>
                                            </div>-->

                                            <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="gyna"> 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 diagnosis Model-------------------------------------------------------------------------------------->
    <div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false" id="add_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"> Add New </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <form action="" id="" method="post" class="form-horizontal  emptyform">
                            <div class="form-body">
                                <!------===========================================------->
                                <div class="form-group">
                                    <div class="col-md-1"></div>
                                    <label class="col-md-3 control-label txtl"> Name </label>
                                    <div class="col-md-8">
                                        <input type="text" class="addDiagnosisName wds95" id="diagnosisName" data-select="" data-tablename="" data-id="" value="">
                                    </div>
                                </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>
    <!--------------------------------------------------------------------------- edit diagnosis Model-------------------------------------------------------------------------------------->
    <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">
                                <!------===========================================------->
                                <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>

    <!--------------------------------------------------------------------------- antenatal form Ultrasound gynaRTovary-------------------------------------------------------------------------------------->

    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false" id="gynaRTovary" style="min-width:1000px;">
        <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"> Follicles</div>
                                    </div>
                                    <div class="portlet-body form">
                                        <form class="form-horizontal" role="form" action="" method="post" id="Rfocildata" enctype="multipart/form-data">
                                            <div class="form-group form-md-line-input rr">
                                                <label class="col-md-2 control-label bold" for="folliclesNumbers">Follicles Numbers : </label>
                                                <div class="col-md-2">
                                                    <input type="text" class="form-control positiveNo" id="RfolliclesNumbers" name="RfolliclesNumbers" data-type="rightTovary"
                                                           placeholder="Follicles Numbers">
                                                    <div class="form-control-focus">
                                                    </div>
                                                </div>
                                            </div>

                                            </br>

                                            <table class="table table-striped table-hover table-bordered">
                                                <thead>
                                                <tr>
                                                    <th>
                                                        Name
                                                    </th>
                                                    <th>
                                                        Length
                                                    </th>
                                                    <th>
                                                        Width
                                                    </th>
                                                    <th>
                                                        Volume
                                                    </th>

                                                </tr>
                                                </thead>
                                                <tbody id="rTovary">

                                                </tbody>
                                            </table>
                                            <input type="hidden" class="form-control" id="rgynaUsId" name="rgynaUsId" value="">
                                            <input type="hidden" class="form-control" id="tovaryTypeR" name="tovaryType" value="right">
                                        </form>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn default saveFocil rr" data-type="right" data-controller="gyna"> Save</button>
                                <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>

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

    <!--------------------------------------------------------------------------- antenatal form Ultrasound gynaLTovary-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false" id="gynaLTovary" style="min-width:1000px;">
        <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"> Follicles</div>
                                    </div>
                                    <div class="portlet-body form">
                                        <form class="form-horizontal" role="form" action="" method="post" id="focildata" enctype="multipart/form-data">
                                            <div class="form-group form-md-line-input ff">
                                                <label class="col-md-2 control-label bold" for="folliclesNumbers">Follicles Numbers : </label>
                                                <div class="col-md-2">
                                                    <input type="text" class="form-control positiveNo" id="folliclesNumbers" name="folliclesNumbers" data-type="leftTovary"
                                                           placeholder="Follicles Numbers">
                                                    <div class="form-control-focus">
                                                    </div>
                                                </div>
                                            </div>

                                            </br>

                                            <table class="table table-striped table-hover table-bordered">
                                                <thead>
                                                <tr>
                                                    <th>
                                                        Name
                                                    </th>
                                                    <th>
                                                        Length
                                                    </th>
                                                    <th>
                                                        Width
                                                    </th>
                                                    <th>
                                                        Volume
                                                    </th>

                                                </tr>
                                                </thead>
                                                <tbody id="Tovary">

                                                </tbody>
                                            </table>
                                            <input type="hidden" class="form-control " id="lgynaUsId" name="lgynaUsId" value="">
                                            <input type="hidden" class="form-control" id="tovaryTypeL" name="tovaryType" value="left">
                                        </form>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn default saveFocil ff" data-type="left" data-controller="gyna"> Save</button>
                                <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="gyna"> Save</button>
                                                <button type="button" class="btn default printInvestigation" data-print="1" data-controller="gyna"> 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 class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false" id="showPatientPH" 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"> Present History</div>
                                    </div>
                                    <div class="portlet-body all">
                                        <div id="showPHDiv">
                                            <table class="table table-striped table-hover table-bordered">
                                                <thead>
                                                <tr>
                                                    <th>
                                                        <div align="center">Date</div>
                                                    </th>
                                                    <th colspan="3">
                                                        <div align="center">Present History</div>
                                                    </th>
                                                </tr>
                                                </thead>

                                            </table>
                                        </div>
                                        <div id="PH_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 id="newDrugTableDiv"></div>
<!------------------##############################-------------------- End of Models -----------------------#########################################-------------->
<div id="modalShow"></div>

<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" id="infertilityModal" style="min-width:1000px;">

</div>

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