<?php /* Smarty version Smarty-3.1.11, created on 2024-08-26 07:42:48
         compiled from "../views/obgy/antenalvisit/add.html" */ ?>
<?php /*%%SmartyHeaderCode:99709145266cc946849b7b9-82738825%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c6aac0b75c63fc92fb23838d5615889d40d54d39' => 
    array (
      0 => '../views/obgy/antenalvisit/add.html',
      1 => 1636636384,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '99709145266cc946849b7b9-82738825',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'hosturl' => 0,
    'patientid' => 0,
    'mainObj' => 0,
    'p' => 0,
    'lastPlacenta' => 0,
    'presDate' => 0,
    'ProgramesettingData' => 0,
    'allantenalvisit' => 0,
    'myObject' => 0,
    'allcomplaint' => 0,
    'comp' => 0,
    'alldiagnosis' => 0,
    'mydiagnosis' => 0,
    'iDsArray' => 0,
    'terminate' => 0,
    'data' => 0,
    'place' => 0,
    'allAntUS' => 0,
    'aUs' => 0,
    'i' => 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,
    'j' => 0,
    'group2' => 0,
    'group3' => 0,
    'group4' => 0,
    'favorites' => 0,
    'others' => 0,
    'group5' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66cc94686d5433_11455735',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66cc94686d5433_11455735')) {function content_66cc94686d5433_11455735($_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">
                            <i class="fa fa-edit"></i> Antenatal visits
                        </div>
                        <div class="actions">
                            <a href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/antenalvisit.php?ac=archive&patientid=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
" class="btn btn-default btn-sm">
                                Archive pregnancy
                            </a>
                        </div>

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


                        <table class="table table-striped table-hover table-bordered">
                            <thead>
                                <tr>
                                    <th class="col-md-2 wds7">
                                        LMP
                                    </th>
                                    <th class="col-md-2 wds7">
                                        EDD
                                    </th>
                                    <!--                                    <th class="col-md-2">
                                                                            IVF
                                                                        </th>-->
                                    <th class="col-md-1 wds2">
                                        G
                                    </th>
                                    <th class="col-md-1 wds2">
                                        P
                                    </th>

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

                                    <th class="col-md-1 wds3">
                                        Hb
                                    </th>
                                    <th class="col-md-1 wds5">
                                        Placenta
                                    </th>
                                    <th class="col-md-1 wds1">

                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        <input type="text" class="form-control  datepicker" data-id="<?php echo $_smarty_tpl->tpl_vars['mainObj']->value->id;?>
" data-colName="lmp" id="lmp" data-tableName="mainantenental" value="<?php echo $_smarty_tpl->tpl_vars['mainObj']->value->lmp;?>
" readonly />
                                    </td>
                                    <td>
                                        <input type="text" class="form-control datepicker" data-id="<?php echo $_smarty_tpl->tpl_vars['mainObj']->value->id;?>
"  data-colName="eed" id="eed" data-tableName="mainantenental" value="<?php echo $_smarty_tpl->tpl_vars['mainObj']->value->eed;?>
" readonly/>
                                    </td>
                                    <!--                                    <td>
                                                                            <input type="text" class="form-control" id="ivf" value="<?php echo $_smarty_tpl->tpl_vars['mainObj']->value->ivf;?>
" readonly/>
                                                                        </td>-->
                                    <td>
                                        <?php echo $_smarty_tpl->tpl_vars['mainObj']->value->g;?>

                                    </td>
                                    <td>
                                        <?php echo $_smarty_tpl->tpl_vars['p']->value;?>

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


                                    <td>
                                        <input type="text" class="form-control updateElement" data-id="<?php echo $_smarty_tpl->tpl_vars['mainObj']->value->id;?>
" data-colName="placentaOut" id="placentaOut" value="<?php echo $_smarty_tpl->tpl_vars['lastPlacenta']->value;?>
" />
                                    </td>
                                    <td>
                                        <a href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/instruction.php?ac=showtransfer&patientid=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
" class="btn btn-default btn-sm" >
                                            Print</a>
                                    </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">
                            <i class="fa fa-edit"></i> All visits
                        </div>
                        <div class="actions">
                            <a href="javascript:;" class="btn btn-default btn-sm" id="antenal_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="antenalvisit">
                                            Add </a>
                                    </li>
                                    <li>
                                        <a href="javascript:;" id="showDrugs" data-controller="antenalvisit">
                                            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="antenalvisit">
                                            Show </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <!--
                            <div class="actions">
                                <span class="btn btn-default btn-sm addicobtn">
                                    TTT

                                    <a href="javascript:;" id="addDrug" data-date="<?php echo $_smarty_tpl->tpl_vars['presDate']->value;?>
" data-controller="antenalvisit">
                                        <i class="fa fa-plus"></i> </a>

                                    <a href="javascript:;" id="showDrugs" data-controller="antenalvisit">
                                        <i class="fa fa-eye"></i> </a>
                                </span>
                            </div>
                            <div class="actions">
                                <span class="btn btn-default btn-sm addicobtn">
                                    Lab

                                    <a href="javascript:;" id="addInv">
                                        <i class="fa fa-plus"></i> </a>

                                    <a href="javascript:;" id="showInv" data-controller="antenalvisit">
                                        <i class="fa fa-eye"></i> </a>
                                </span>
                            </div>
                        -->
                        <div class="actions">
                            <a href="javascript:;" class="btn btn-default btn-sm" id="addUS">
                                &nbsp;&nbsp;
                                US
                                &nbsp;&nbsp;&nbsp;
                            </a>
                        </div>
                    </div>

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

                        <table class="table table-striped table-hover table-bordered" id="antenalvisit">
                            <thead>
                                <tr>
                                    <th class="col-md-2 wds11">
                                        Date
                                    </th>
                                    <th class="wds3">
                                        W
                                    </th>
                                    <th class="wds30">
                                        Complaint
                                    </th>
                                    <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->diagnosshow==0){?>
                                    <th class="wds30">
                                        Diagnosis
                                    </th>
                                    <?php }?>
                                    <th class="wds6">
                                        Wt
                                    </th>
                                    <th class="wds7">
                                        Bp
                                    </th>

                                    <th class="wds40">
                                        Notes
                                    </th>
                                    <th>
                                        Delete
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php  $_smarty_tpl->tpl_vars['myObject'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myObject']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allantenalvisit']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myObject']->key => $_smarty_tpl->tpl_vars['myObject']->value){
$_smarty_tpl->tpl_vars['myObject']->_loop = true;
?>
                                <tr>
                                    <td>
                                        <input type="text" class="form-control datepicker vdate" data-id="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->id;?>
" data-colName="antenaldate" data-tableName="antenalvisit" value="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->antenaldate;?>
" readonly />
                                    </td>

                                    <td>
                                        <label data-id="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->id;?>
" <?php if ($_smarty_tpl->tpl_vars['myObject']->value->dateFlag==1){?>style="color: red;font-size: 18px;" <?php }else{ ?> style="color: maroon; font-weight : bolder; font-size: 18px;" <?php }?>><?php echo $_smarty_tpl->tpl_vars['myObject']->value->w;?>
</label>
                                    </td>
                                    <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->diagnosshow==0){?>
                                    <td>
                                        <!--     -->
                                        <!--select2me complaint-->
                                        <select multiple="" size="1" class="form-control select2me complaintant updateDiagnosis" id="complaint<?php echo $_smarty_tpl->tpl_vars['myObject']->value->id;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->id;?>
" data-colName="complaintid" data-tableName="antenalvisit">
                                            <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['myObject']->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 diagnosisant updateDiagnosis" id="diagnosis<?php echo $_smarty_tpl->tpl_vars['myObject']->value->id;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->id;?>
" data-colName="diagnosisid" data-tableName="antenalvisit">
                                            <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['myObject']->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['myObject']->value->id;?>
" data-colName="complaint" data-tableName="antenalvisit" value="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->complaint;?>
" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->complaint;?>
" />
                                    </td>
                                    <?php }?>
                                    <td>
                                        <input type="text" class="form-control updateElement" data-id="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->id;?>
" data-colName="wt" data-tableName="antenalvisit" value="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->wt;?>
"/>
                                    </td>
                                    <td>
                                        <input type="text" class="form-control bp_mask updateElement" data-id="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->id;?>
" data-colName="bp" data-tableName="antenalvisit" value="<?php echo $_smarty_tpl->tpl_vars['myObject']->value->bp;?>
"/>
                                    </td>


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

                                <?php } ?>
                            </tbody>
                        </table>

                        <button id="antenalvisit_add" class="btn red">
                            End Pregnancy
                        </button>


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

</div>

<input type="hidden" id="patientId" value="<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
"/>
<input type="hidden" id="mainAntenatalId" value="<?php echo $_smarty_tpl->tpl_vars['mainObj']->value->id;?>
"/>
<input type="hidden" id="controllName" value="antenalvisit"/>
<input type="hidden" id="iDsArray" value="<?php echo $_smarty_tpl->tpl_vars['iDsArray']->value;?>
"/>
<!----#########################################################################  model ##############################################################################################################--->
<div class="all">
    <!--------------------------------------------------------------------------- End Pregnancy Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="endPregnancy_model" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds90">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title"> End Pregnancy </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> Patient history - Obstetric H data
                                        </div>
                                    </div>
                                    <div class="portlet-body">


                                        <form id="endPregH-form">
                                            <div class="row clinick">




                                                <div class="col-md-2">
                                                    <!--
                                                    <div class="form-group form-md-line-input has-info">
                                                        <div class="input-group">
                                                            <input type="text" required class="form-control"  name="obstrduration" id="obstrduration" data-colName="obstrduration"   data-id="" value="" data-tableName="phobstetric" />
                                                            <span class="input-group-addon">W</span>
                                                            <label for="contduration">Duration</label>
                                                        </div>
                                                    </div>
                                                    -->
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input type="text" class="form-control" required name="obstrduration" id="obstrduration" data-colName="obstrduration"   data-id="">
                                                        <label for="form_control_1">Duration</label>
                                                        <span class="input-group-addon">Week</span>
                                                    </div>
                                                </div>



                                                <div class="col-md-2">
                                                    <div class="form-group">
                                                        <label class="control-label col-md-2 ls2">Termination</label>
                                                        <select  class="form-control obstermination editme" data-class="obstermination" required id="obstermination" data-itr="" name="obstermination" data-colName="obstermination"   data-id=""  data-tableName="phobstetric" >

                                                            <option value="">choose</option>
                                                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['terminate']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                                                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                            <?php } ?>
                                                            <option value="-2" class="deleteoptincompo">Delete</option>

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




                                                <div class="col-md-2">
                                                    <div class="form-group">
                                                        <label class="control-label col-md-2 ls2">Place</label>
                                                        <select  class="form-control obsplace editme" data-class="obsplace" required id="obsplace"  data-itr=""  name="obsplace" data-colName="obsplace" data-id="" data-tableName="phobstetric" >
                                                            <option value="">choose</option>
                                                            <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['place']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                                                            <option value="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
"><?php echo $_smarty_tpl->tpl_vars['data']->value->name;?>
</option>
                                                            <?php } ?>
                                                            <option value="-2" class="deleteoptincompo">Delete</option>

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



                                                <div class="col-md-2">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input type="text" class="form-control datepicker" required name="obsdate" id="obsdate" data-colName="obsdate"  data-id="" value="" data-tableName="phobstetric"/>
                                                        <label for="obsdate">Date</label>
                                                    </div>
                                                </div>

                                                <div class="col-md-3">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input type="text" class="form-control" required name="obsnote" id="obsnote" data-colName="obsnote"  data-id=""  value="" data-tableName="phobstetric"/>
                                                        <label for="obsnote">Note</label>
                                                    </div>
                                                </div>


                                            </div>
                                        </form>





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

                                <button type="button" class="btn green" id="endpreg"> save </button>
                                <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">
                                    <label class="col-md-1 control-label"> Name </label>
                                    <div class="col-md-10">
                                        <input type="text" class="addDiagnosisName" id="diagnosisName" data-select="" data-tablename="" data-id="" value="">
                                    </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>
    <!--------------------------------------------------------------------------- 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 Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="antPatientUS" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds90">
            <div class="modal-content">
                <div class="modal-header">
                    <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"> Ultrasound </div>
                                        <div class="actions">
                                            <a href="javascript:;" class="btn btn-default btn-sm addRowH" data-type="usantenatal">
                                                <i class="fa fa-plus"></i> Add </a>

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




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

                                        <table class="table table-striped table-hover table-bordered" dir="ltr">
                                            <thead>
                                                <tr>
                                                    <th class="wds1">
                                                        <input type="checkbox" id="usPrintAll">
                                                    </th>
                                                    <th class="wds1">
                                                        #
                                                    </th>
                                                    <th class="wds10">
                                                        Date
                                                    </th>
                                                    <th class="wds3">
                                                        W
                                                    </th>
                                                    <th class="wds5">
                                                        N
                                                    </th>
                                                    <th class="wds5">
                                                        GS
                                                    </th>
                                                    <th class="wds5">
                                                        CRL
                                                    </th>
                                                    <th class="wds5">
                                                        FHR
                                                    </th>
                                                    <th class="wds5">
                                                        BPD
                                                    </th>

                                                    <th class="wds5">
                                                        FL
                                                    </th>
                                                    <th class="wds15">
                                                        Placenta
                                                    </th>

                                                    <th class="wds5">
                                                        AI
                                                    </th>

                                                    <th class="wds5">
                                                        FWT
                                                    </th>
                                                    <th>
                                                        Notes
                                                    </th>


                                                    <th class="wds1">
                                                        Delete
                                                    </th>
                                                    <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->displaydoctorname==1){?>
                                                    <th class="wds1">
                                                        Doctor
                                                    </th>
                                                    <?php }?>
                                                </tr>
                                            </thead>
                                            <tbody id="usantenatal">
                                                <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                <?php  $_smarty_tpl->tpl_vars['aUs'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['aUs']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allAntUS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['aUs']->key => $_smarty_tpl->tpl_vars['aUs']->value){
$_smarty_tpl->tpl_vars['aUs']->_loop = true;
?>
                                                <tr>
                                                    <td>
                                                        <input type="checkbox" class="usPrint" id="usPrint<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  name="pic[]"  value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"/>
                                                    </td>

                                                    <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>

                                                    <td>
                                                        <input type="text" class="form-control datepicker updateElement usDate" readonly="" placeholder="Date" data-colName="date" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->date;?>
"/>
                                                    </td>
                                                    <td>
                                                        <label id="usLabel<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
" <?php if ($_smarty_tpl->tpl_vars['aUs']->value->dateFlag==1){?>style="color: red;font-size: 18px;" <?php }else{ ?> style="color: maroon; font-weight : bolder; font-size: 18px;" <?php }?>><?php echo $_smarty_tpl->tpl_vars['aUs']->value->w;?>
</label>
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement" placeholder="N" data-colName="nga" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->nga;?>
">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement" placeholder="GS" data-colName="gs" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->gs;?>
">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement" placeholder="CRL" data-colName="crl" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->crl;?>
">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement" placeholder="FHR" data-colName="fhr" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->fhr;?>
">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement" placeholder="BPD" data-colName="bpd" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->bpd;?>
">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement" placeholder="FL" data-colName="fl" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->fl;?>
">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement" placeholder="Placenta" data-colName="placenta" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->placenta;?>
">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement" placeholder="AI" data-colName="ai" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->ai;?>
">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement" placeholder="FWT" data-colName="fwt" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->fwt;?>
">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement amrpop" placeholder="Notes" data-colName="notes" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
"  data-tableName="mainantenentalus" value="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->notes;?>
">
                                                    </td>
                                                    <td>
                                                        <a class="btn grey-cascade btn-xs deletemsgEX" data-id="<?php echo $_smarty_tpl->tpl_vars['aUs']->value->id;?>
" style=" float: left;" href="#" data-link="antenalvisit" data-fn="delantus">
                                                            <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['aUs']->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="usantenatalItr" 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>


    <!---------------------------------------------------------------------------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 " data-controller="antenalvisit"  id="presDate" name="presDate" value="<?php echo $_smarty_tpl->tpl_vars['presDate']->value;?>
"  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="mainantenentaldrugs">
                                                    <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="antenalvisit"> </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="mainantenentaldrugs" 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="mainantenentaldrugs" 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="mainantenentaldrugs" 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="antenalvisit" data-fn="addprescription">
                                                                <i class="fa fa-close"></i>
                                                            </a>
                                                        </td>
                                                    </tr>
                                                    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'itr', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['itr']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                                                    <?php } ?>

                                                </tbody>
                                            </table>



                                            <input type="hidden" id="pId" value="" name="patientId"/>
                                            <input type="hidden" id="preType" value="" name="preType"/>
                                            <input type="hidden" id="mainId" value="" name="mainId"/>
                                            <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="antenalvisit"> Print  </button>
                                    <button type="button" class="btn default closeDrug" id="closemodel" data-dismiss="modal"> Close</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

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

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

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

                                        </table>

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

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

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

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

    <!--------------------------------------------------------------------------- add Investigation Model-------------------------------------------------------------------------------------->
    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="addPatientInvestigation" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds95">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title">  </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <form class="form-horizontal" role="form" action="" method="post" id="gynaInvest" enctype="multipart/form-data">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="portlet blue-hoki box">
                                        <div class="portlet-title">
                                            <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; "> Today <input type="text" class="form-control datepicker " id="invDate" name="invDate" value="<?php echo $_smarty_tpl->tpl_vars['presDate']->value;?>
"  readonly="" placeholder="Date" style="display: inline; width: 62%"> </div>
                                            <div class="actions">
                                                <button type="button" class="btn default printInvestigation" data-print ="0" data-controller="antenalvisit"> Save </button>
                                                <button type="button" class="btn default printInvestigation" data-print ="1" data-controller="antenalvisit"> 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"/>
                                            <input type="hidden" id="mainId1" value="" name="mainId"/>
                                            <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 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"> Investigations  </div>
                                    </div>
                                    <div class="portlet-body">
                                        <div  id="showInvs">
                                            <table class="table table-striped table-hover table-bordered">
                                                <thead>
                                                    <tr>
                                                        <th> <div align="center">Date </div></th>
                                                        <th colspan="3"> <div align="center">Investigations </div></th>
                                                    </tr>
                                                </thead>

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

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

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


</div>

<div id="newDrugTableDiv"></div>



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


<?php }} ?>