<?php /* Smarty version Smarty-3.1.11, created on 2024-11-14 06:01:44
         compiled from "../views/obgy/ancsheet/add.html" */ ?>
<?php /*%%SmartyHeaderCode:436374962673602c8bdd910-27043347%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b52367bf5468b279a9c2e3a58073a566da631081' => 
    array (
      0 => '../views/obgy/ancsheet/add.html',
      1 => 1633993994,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '436374962673602c8bdd910-27043347',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'patientid' => 0,
    'infertilitysheetid' => 0,
    'hosturl' => 0,
    'infertilitysheet' => 0,
    'ancsheet' => 0,
    'id' => 0,
    'controllname' => 0,
    'awifep' => 0,
    'single' => 0,
    'wifeepc' => 0,
    'investigations' => 0,
    'operations' => 0,
    'i' => 0,
    'ancnewvisit' => 0,
    'presDate' => 0,
    'registeration' => 0,
    'comp' => 0,
    'preItr' => 0,
    'PatientPresByDate' => 0,
    'itr' => 0,
    'pre' => 0,
    'allDrugcats' => 0,
    'cat' => 0,
    'drugs' => 0,
    'drug' => 0,
    'ProgramesettingData' => 0,
    'allDrugTypes' => 0,
    'type' => 0,
    'allDrugDoses' => 0,
    'dos' => 0,
    'group1' => 0,
    'inv' => 0,
    'j' => 0,
    'group2' => 0,
    'group3' => 0,
    'group4' => 0,
    'favorites' => 0,
    'others' => 0,
    'group5' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_673602c959e020_47568215',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_673602c959e020_47568215')) {function content_673602c959e020_47568215($_smarty_tpl) {?>
<style type="text/css">
    .yellow{
        background: yellow;
    }
    .red{
        background: #d40404;
        color: #fff
    }
    h2{
        text-align: center;
    }
    hr{
        margin: 10px 40%;
        border: 1px solid;
    }
    .toggle{
        font-weight: 800;max-width: 130px;
    }
    .rowtoggle{
        padding-bottom: 10px;
    }
    .thhead{
        background: #fff !important;
        color: red !important
    }
    .addappend{
        color: red;
    }
    .colorred{
        color: red;
        font-size: 14px
    }
    .hr{
        margin: 20px 17%;
        border: 1px dotted;
    }
    .tdcolor{
        background: #aaa; border: 1px solid #000 !important;
    }
    td,th{
        border: 1px solid #000 !important;text-align: center !important; vertical-align: none !important; 
    }
    input{
        border: none !important;
    }
    table{
        width: 100% !important;
        padding: 0px 20px;
    }
    .hidetable{
        display: none;
    }
</style>
<div class="form-body">
    <input type="hidden" id="patientId" value="<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
"/>

    <div class="page-content-wrapper">
        <div class="page-content all">
            <div class="row ">
                <table class="table table-striped table-bordered table-hover nopdngtbl">
                    <tbody><tr class="odd gradeX" style="background: #dfece2">
                    <input type="hidden"    id="infertilitysheetid" value="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" >
                    <td class="bold">
                        <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&amp;patientid=1" class="blue gothislinkagnew" data-go="#tab_2_6">    Obst History  </a>
                    </td>
                    <td class="txtl "> <label class="bold " style="color:  #3598DC;">G : <span style="color: #000" id="obstg">
                                <?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->obstg;?>
</span > </label> 
                    </td>
                    <td class="txtl "> <label class="bold " style="color:  #3598DC;">P : <span style="color: #000" id="obstp"><?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->obstp;?>
 </span ></label> 
                    </td>
                    <td class="txtl "> <label class="bold " style="color:  #3598DC;">FT : <span style="color: #000" id="obstft"><?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->obstft;?>
 </span ></label> 
                    </td>
                    <td class="txtl "> <label class="bold " style="color:  #3598DC;">PT : <span style="color: #000" id="obstpt"><?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->obstpt;?>
</span > </label> 
                    </td>
                    <td class="txtl "> <label class="bold " style="color:  #3598DC;">EPC : <span style="color: #000" id="obstepc"><?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->obstepc;?>
</span > </label> 
                    </td>
                    <td class="txtl "> <label class="bold " style="color:  #3598DC;">LIVING : <span style="color: #000" id="obstliving"><?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->obstliving;?>
</span > </label> 
                    </td>

                    </tr>

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


            <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> ANC Sheet
                        </div>
                        <div class="actions">
                        </div>
                    </div>
                    <div class="portlet-title" style="text-align: center;">
                        <input class="form-control"  type="text"   name="importantnote" data-id="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->id;?>
" data-table="ancsheet"  value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->importantnote;?>
" placeholder="Critical Data" >
                        <div style="font-size: 15px"><?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->importantnote;?>
</div>
                    </div>
                    <div class="portlet-body form">
                        <form   class="form-horizontal  emptyform" >
                            <input type="hidden" id="id" name="id" value="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" />
                            <input type="hidden" id="controllname" name="id" value="<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
" />
                            <input type="hidden" id="controllName" name="controllName" value="<?php echo $_smarty_tpl->tpl_vars['controllname']->value;?>
" />
                            <input type="hidden" id="mainAntenatalId" value="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
"/>
                            <!-- <input type="hidden" id="tablep"  value="infertilitysheet" /> -->
                            <div class="form-body">

                                <h2 > ANC Sheet</h2>

                                <hr>
                                <a style="float: right;" href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/Ancsheet.php?ac=archive&amp;patientid=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
" class="btn btn-default btn-sm">
                                    Archive pregnancy
                                </a>
                                <table class="table table-bordered">
                                    <tbody>
                                        <tr>
                                            <th  colspan="1">LMP</th>
                                            <th  colspan="1">EDD</th>
                                            <th  colspan="1">G</th>
                                            <th  colspan="1">P</th>
                                            <th  colspan="1">EPC</th>
                                            <th  colspan="1">Last Hb</th>
                                            <th  colspan="1">Placenta</th>
                                            <th  colspan="1">Notes</th>
                                        </tr>
                                        <tr>
                                            <td width="7%"><input class="form-control datepicker eedlmp"  type="text"    value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->sheetlmp;?>
" id="lmp" name="sheetlmp" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet"  ></td>
                                            <td width="7%"><input class="form-control datepicker eedlmp"  type="text"   value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->sheetedd;?>
" id="edd" name="sheetedd" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet"   ></td>
                                            <td  width="7%" id="obstgv">
                                                <?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->obstg;?>
  
                                            </td>
                                            <td  width="7%" id="obstpv">
                                                <?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->obstp;?>

                                            </td>
                                            <td  width="7%" id="obstepcv">
                                                <?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->obstepc;?>

                                            </td>
                                            <td width="7%"><input class="form-control"  type="text" value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->sheetlast;?>
" name="sheetlast" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet"  ></td>
                                            <td  width="15%">
                                                <select  class="form-control getselectajax placenta" name="placenta" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
"  data-table="ancsheet"  data-celtable="placenta" id="placenta<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" >
                                                </select>
                                            </td>
                                            <td width="18%"><input class="form-control"  type="text"    value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->sheetnte;?>
" name="sheetnte" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet"  ></td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div class="row rowtoggle"  id="historyshow">
                                    <a class="btn grey-cascade btn-xs toggle" data-show="history2" >History</a>

                                </div>

                                <table class="table table-bordered hidetable history2" >
                                    <tbody>
                                        <tr>
                                            <td  colspan="1" width="10%" class="tdcolor">Menstrual History</td>
                                            <td  colspan="2" width="30%" class="tdcolor"> Medical History</td>
                                            <td  colspan="2" width="30%" class="tdcolor">Surgical History </td>
                                            <td  colspan="2" width="30%" class="tdcolor">Family History</td>
                                        </tr>
                                        <tr>
                                            <td  colspan="1" width="10%"> <input type="text" data-id="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->menstrualh;?>
" name="menstrualh" data-table="infertilitysheet" class="form-control" /></td>

                                            <td  colspan="1">
                                                <select multiple="" class="form-control getselectajax medicalhistory" name="medicalhistory" data-id="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
"  data-table="infertilitysheet"  data-celtable="medicalhistory" id="medicalhistory<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" >
                                                </select>
                                            </td>
                                            <td  colspan="1" width="10%"> <input type="text" data-id="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->w2medical;?>
" name="w2medical" data-table="infertilitysheet" class="form-control" /></td>
                                            <td  colspan="1">
                                                <select multiple="" class="form-control getselectajax surgicalhistory" name="surgicalhistory" data-id="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
"  data-table="infertilitysheet"  data-celtable="surgicalhistory" id="surgicalhistory<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" >
                                                </select>
                                            </td>
                                            <td  colspan="1" width="10%"> <input type="text" data-id="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->wsurgical;?>
" name="wsurgical" data-table="infertilitysheet" class="form-control" /></td>
                                            <td  colspan="1">
                                                <select multiple="" class="form-control getselectajax familyhistory" name="familyhistory" data-id="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
"  data-table="infertilitysheet"  data-celtable="familyhistory" id="familyhistory<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" >
                                                </select>
                                            </td>
                                            <td  colspan="1" width="10%"> <input type="text" data-id="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['infertilitysheet']->value->wfamily;?>
" name="wfamily" data-table="infertilitysheet" class="form-control" /></td>
                                        </tr>
                                    </tbody>
                                </table>

                                <table class="table table-bordered  hidetable history2" >
                                    <tbody id="awifep">
                                        <tr>
                                            <th scope="row" class="thhead" colspan="12">
                                                <a class="addappend" data-add="awifep" data-id="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
"  data-table="infertilitysheetid" id="awifeplocal">(Obst History) p</a>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td colspan="1" width="10%">Sex</td>
                                            <td colspan="1" width="5%">Name</td>
                                            <td colspan="1" width="10%">Date of D</td>
                                            <td colspan="1" width="5%">Age</td>
                                            <td colspan="1" width="10%">Mode of D</td>
                                            <td colspan="1" width="10%">Type of D</td>
                                            <td colspan="1" width="5%">W</td>
                                            <td colspan="1" width="5%">L</td>
                                            <td colspan="1" width="10%">Obst</td>
                                            <td colspan="1" width="25%" style="padding: 0px">
                                                <table style="width: 100%;margin-bottom: 0px;">
                                                    <tr>
                                                        <td colspan="3">CO</td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="1" width="33%">Method</td>
                                                        <td colspan="1" width="33%">Duration</td>
                                                        <td colspan="1" width="33%">Stopped</td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td  colspan="1" width="5%">Comment</td>
                                            <td colspan="1" width="5%"></td>
                                        </tr>
                                        <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['awifep']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
                                        <tr class="rowawifep<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
">   
                                            <td  width="10%">
                                                <select   class="form-control getselectajax wifesex" name="wifesex" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  data-celtable="wifesex" id="wifesex<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td width="5%"><input type="text" name="name" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->name;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  class="form-control" /></td>
                                            <td width="10%"><input class="form-control datepicker getymt"  type="text"    name="date" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->date;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"   ></td>
                                            <td width="5%" id="awifepmonth_<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"><?php echo $_smarty_tpl->tpl_vars['single']->value->wifeage;?>
</td>
                                            <td  width="10%">
                                                <select  class="form-control getselectajax wifemodeofd" name="wifemodeofd" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  data-celtable="wifemodeofd" id="wifemodeofd<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td   width="10%">
                                                <select   class="form-control getselectajax wifetypeofd" name="wifetypeofd" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  data-celtable="wifetypeofd" id="wifetypeofd<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td  width="5%" >
                                                <input type="text" name="wifew" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->wifew;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  class="form-control digitsOnly" />
                                            </td>
                                            <td  width="5%" >
                                                <input type="checkbox"  name="wifel" value="1"
                                                       data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  class="form-control checkbox" <?php if ($_smarty_tpl->tpl_vars['single']->value->wifel==1){?> checked <?php }?>>
                                            </td>
                                            <td  width="10%" style="width: 30px">
                                                <select  multiple="" class="form-control getselectajax wifeobst" name="wifeobst" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  data-celtable="wifeobst" id="wifeobst<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td width="25%" style="padding: 0px">
                                                <table style="width: 100%;margin-bottom: 0px;">
                                                    <tr>
                                                        <td  width="33%" style="max-width: 33px">
                                                            <select  multiple="" class="form-control getselectajax awifeppmethod" name="awifepmethod" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  data-celtable="awifepmethod" id="awifepmethod<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                            </select>
                                                        </td>
                                                        <td width="33%"><input type="text" name="duration" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->duration;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  class="form-control" /></td>
                                                        <td width="33%"><input type="text" name="stopped" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->stopped;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  class="form-control" /></td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td width="5%"><input type="text" name="comment" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->comment;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep"  class="form-control" /></td>
                                            <td width="5%">
                                                <a class="btn grey-cascade btn-xs  chekdeleterow" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="awifep">
                                                    <i class="fa fa-close"></i>
                                                </a>
                                            </td>
                                        </tr>
                                        <?php } ?>
                                    </tbody>
                                </table>
                                <table class="table table-bordered hidetable history2">
                                    <tbody id="wifeepc">
                                        <tr>
                                            <td colspan="7" style="background:#fff"  width="80%" class="tdcolor">
                                                <a class="addappend" data-add="wifeepc" style="color: red" data-id="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
"  data-table="infertilitysheetid" id="awifepclocal" >EPC</a></td>
                                            <td colspan="3" style="background:#fff" class="tdcolor">Last</td>
                                        </tr>
                                        <tr>
                                            <td >date</td>
                                            <td >Type</td>
                                            <td >W</td>
                                            <td >TTT</td>
                                            <td >Obst</td>
                                            <td >Histopath</td>
                                            <td >Cost</td>
                                            <td >D</td>
                                            <td >A</td>
                                            <td ></td>
                                        </tr>
                                        <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['wifeepc']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
                                        <tr class="rowwifeepc<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
">  
                                            <td width="10%"><input type="text" name="wifeepcdate" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->wifeepcdate;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="wifeepc" class="form-control datepicker" /></td>         
                                            <td >
                                                <select  class="form-control getselectajax wifeepctype" name="wifeepctype" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="wifeepc"  data-celtable="wifeepctype" id="wifeepctype<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td width="10%"><input type="text" name="wifeepcw" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->wifeepcw;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="wifeepc" class="form-control" /></td>
                                            <td >
                                                <select  class="form-control getselectajax wifeepcttt" name="wifeepcttt" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="wifeepc"  data-celtable="wifeepcttt" id="wifeepcttt<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td >
                                                <select   class="form-control getselectajax wifeepcobst" name="wifeepcobst" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="wifeepc"  data-celtable="wifeepcobst" id="wifeepcobst<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td width="10%"><input class="form-control"  type="text"  name="histopath" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->histopath;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="wifeepc" ></td>
                                            <td width="10%"><input type="text" name="coast" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->coast;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="wifeepc" class="form-control digitsOnly" /></td> 

                                            <td ><input type="text" name="wifeepcp" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->wifeepcp;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="wifeepc" class="form-control" /></td>
                                            <td ><input type="text" name="wifeepcepc" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->wifeepcepc;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="wifeepc" class="form-control" /></td>
                                            <td width="5%">
                                                <a class="btn grey-cascade btn-xs  chekdeleterow" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="wifeepc">
                                                    <i class="fa fa-close"></i>
                                                </a>
                                            </td>
                                        </tr>
                                        <?php } ?>
                                    </tbody>
                                </table>


                                <table class="table table-bordered">
                                    <tbody id="investigations">
                                        <tr>
                                            <th scope="row" style="color: #fff;background:red" colspan="11">
                                                <a class="addappend" style="color: #fff;" data-add="investigations"  data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
"  data-table="ancsheetid">  Investigations</a>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td width="10%"></td>
                                            <td  width="10%" class="colorred">Hb</td>
                                            <td width="10%"class="colorred">Plat</td>
                                            <td width="10%"class="colorred">FBS</td>
                                            <td width="10%"class="colorred">OGTT</td>
                                            <td width="10%"class="colorred">HBs Ag</td>
                                            <td width="10%"class="colorred"> HCV Ab</td>
                                            <td width="10%"class="colorred">CUA</td>
                                            <td width="10%"class="colorred">Ferritin</td>
                                            <td width="10%"class="colorred">Lab</td>
                                            <td width="10%"class="colorred"></td>
                                        </tr>
                                        <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['investigations']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
                                        <tr class="rowinvestigations<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"> 
                                            <th  >Date</th>
                                            <td ><input class="form-control datepicker"  type="text"  name="invesdhb" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->invesdhb;?>
"  ></td>
                                            <td ><input class="form-control datepicker"  type="text" name="invesdplat" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->invesdplat;?>
" 
                                                        ></td>
                                            <td ><input class="form-control datepicker"  type="text"  name="invesdfbs" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->invesdfbs;?>
" ></td>
                                            <td ><input class="form-control datepicker"  type="text"  name="invesdogtt" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->invesdogtt;?>
" ></td>
                                            <td ><input class="form-control datepicker"  type="text"   name="invesdhbs" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->invesdhbs;?>
" ></td>
                                            <td ><input class="form-control datepicker"  type="text"  name="invesdhcv" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->invesdhcv;?>
"  ></td>
                                            <td ><input class="form-control datepicker"  type="text"   name="invesdcua" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->invesdcua;?>
"  ></td>
                                            <td ><input class="form-control datepicker"  type="text"  name="invesdferr" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->invesdferr;?>
" ></td>
                                            <td ><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="ancsheet">
                                                                    Show </a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </div></td>
                                            <td width="5%">
                                                <a class="btn grey-cascade btn-xs deleterow" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations">
                                                    <i class="fa fa-close"></i>
                                                </a>
                                            </td>
                                        </tr>
                                        <tr class="rowinvestigations<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"> 
                                            <th  >Result</th>
                                            <td ><input class="form-control "  type="text"  name="investhb" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->investhb;?>
"  ></td>
                                            <td ><input class="form-control "  type="text" name="investplat" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->investplat;?>
" 
                                                        ></td>
                                            <td ><input class="form-control "  type="text"  name="investfbs" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->investfbs;?>
" ></td>
                                            <td ><input class="form-control "  type="text"  name="invesdogtt" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->invesdogtt;?>
" ></td>
                                            <td ><input class="form-control"  type="text"   name="investhbs" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->investhbs;?>
" ></td>
                                            <td ><input class="form-control "  type="text"  name="investhcv" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->investhcv;?>
"  ></td>
                                            <td ><input class="form-control "  type="text"   name="investcua" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->investcua;?>
"  ></td>
                                            <td ><input class="form-control "  type="text"  name="investferr" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="investigations" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->investferr;?>
" ></td>
                                            <td ></td>
                                            <td></td>
                                        </tr>
                                        <?php } ?>
                                    </tbody>
                                </table>
                                <table class="table table-bordered">
                                    <tbody>
                                        <tr>
                                            <th scope="row" style="color: #fff;background:red" colspan="10">
                                                4D
                                            </th>
                                        </tr>
                                        <tr>
                                            <td width="10%"></td>
                                            <td  class="colorred" width="40%">T1 Scan</td>
                                            <td class="colorred">T2 Scan</td>
                                        </tr>
                                        <tr>
                                            <th  >Date</th>
                                            <td ><input class="form-control datepicker"  type="text"     value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->tscandate;?>
" name="tscandate" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet"  ></td>
                                            <td ><input class="form-control datepicker"  type="text"      value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->ttscandate;?>
" name="ttscandate" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet"  ></td>
                                        </tr>
                                        <tr>
                                            <th  >W</th>
                                            <td ><input type="text"   value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->tscanw;?>
" name="tscanw" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet" class="form-control" /></td>
                                            <td ><input type="text"   value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->ttscanw;?>
" name="ttscanw" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <th  >Result</th>
                                            <td ><input type="text"   value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->tscanresult;?>
" name="tscanresult" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet" class="form-control" /></td>
                                            <td ><input type="text"   value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->ttscanresult;?>
" name="ttscanresult" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet" class="form-control" /></td>
                                        </tr>
                                        <tr>
                                            <th  >Report</th>
                                            <td ><input type="text"   value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->tscanreport;?>
" name="tscanreport" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet" class="form-control" /></td>
                                            <td ><input type="text"   value="<?php echo $_smarty_tpl->tpl_vars['ancsheet']->value->ttscanreport;?>
" name="ttscanreport" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" data-table="ancsheet" class="form-control" /></td>
                                        </tr>
                                    </tbody>
                                </table>
                                <table class="table table-bordered  ttt" >
                                    <tbody id="operations">
                                        <tr>
                                            <th scope="row" class="thhead" colspan="14">
                                                <a class="addappend" data-add="operations" data-id="<?php echo $_smarty_tpl->tpl_vars['infertilitysheetid']->value;?>
"  data-table="infertilitysheetid">  operations  </a>
                                            </th>
                                        </tr>
                                        <tr>
                                            <th  colspan="1"></th>
                                            <th  colspan="1">operation</th>
                                            <th  colspan="1">Date</th>
                                            <th  colspan="1">place</th>
                                            <th  colspan="1">histopath</th>
                                            <th  colspan="1">Cost</th>
                                            <th  colspan="1">nots</th>
                                            <th  colspan="1"></th>
                                        </tr>
                                        <?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable("1", null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['operations']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
                                        <tr class="rowoperations<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
">
                                            <td width="7%"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td  width="14%" style="max-width: 33px">
                                                <select   multiple="" class="form-control getselectajax operation" name="operation" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="operations"  data-celtable="operation" id="operation<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td  width="7%" >
                                                <input class="form-control datepicker"  type="text"     name="date" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->date;?>
" id="date_<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="operations"   >
                                            </td>
                                            <td width="7%"><select   class="form-control getselectajax place" name="place" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="operations"  data-celtable="place" id="place<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td  width="14%" style="max-width: 33px">
                                                <select   multiple="" class="form-control getselectajax histopath" name="histopath" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="operations"  data-celtable="histopath" id="histopath<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td width="7%"><input class="form-control digitsOnly"  type="text"     name="cost" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->cost;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="operations"   ></td>
                                            <td width="7%"><input class="form-control"  type="text"      name="note" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->note;?>
"  data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="operations"   ></td>
                                            <td width="5%">
                                                <a class="btn grey-cascade btn-xs deleterow" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="operations">
                                                    <i class="fa fa-close"></i>
                                                </a>
                                            </td>
                                        </tr>
                                        <?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                                        <?php } ?>
                                    </tbody>
                                </table>
                                <table class="table table-bordered">
                                    <tbody id="ancnewvisit">
                                        <tr>
                                            <th style="color: #fff;background:#19ae19" colspan="14"> 
                                                <a style="color: #fff"class="addappend" data-add="ancnewvisit" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
"  data-table="ancsheetid">New Visit</a>
                                            </th>
                                        </tr>
                                        <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['ancnewvisit']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
                                        <tr class="rowancnewvisit<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"> 
                                            <th width="10%" >Date</th>
                                            <th width="7%" >W</th>
                                            <th width="16%" >BW</th>
                                            <th  width="20%" >Notes</th>
                                            <th width="7%" >BP</th>
                                            <th  width="30%" >TTT (Button)</th>
                                            <th  width="5" ></th>
                                        </tr>
                                        <tr class="rowancnewvisit<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"> 
                                            <td ><input class="form-control datepicker vdate2 "  type="text"  name="newvisitdate" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="ancnewvisit"   value="<?php echo $_smarty_tpl->tpl_vars['single']->value->newvisitdate;?>
"></td>
                                            <td ><label data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" <?php if ($_smarty_tpl->tpl_vars['single']->value->newvisitdate<$_smarty_tpl->tpl_vars['ancsheet']->value->sheetlmp){?>style="color: red;font-size: 11px;" <?php }else{ ?> style="color: maroon; font-weight : bolder; font-size: 11px;" <?php }?>><?php echo $_smarty_tpl->tpl_vars['single']->value->newvisitw;?>
</label>
                                                <input class="form-control"  type="hidden"   name="newvisitw" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" id="newvisitw_<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="ancnewvisit"  value="<?php echo $_smarty_tpl->tpl_vars['single']->value->newvisitw;?>
" ></td>
                                            <td ><input class="form-control"  type="text"    name="newvisitbw" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="ancnewvisit"  value="<?php echo $_smarty_tpl->tpl_vars['single']->value->newvisitbw;?>
"></td>
                                            <td ><input class="form-control"  type="text"   name="newvisitnote" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="ancnewvisit"  value="<?php echo $_smarty_tpl->tpl_vars['single']->value->newvisitnote;?>
"></td>
                                            <td ><input class="form-control bp_mask"  type="text"   name="newvisitbp" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="ancnewvisit" value="<?php echo $_smarty_tpl->tpl_vars['single']->value->newvisitbp;?>
" ></td>

                                            <td  > 
                                                <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="ancsheet">
                                                                    Add </a>
                                                            </li>
                                                            <li>
                                                                <a href="javascript:;" id="showDrugs" data-controller="ancsheet">
                                                                    Show </a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </div>

                                            </td>
                                            <td>
                                                <a class="btn grey-cascade btn-xs deleterow" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="ancnewvisit">
                                                    <i class="fa fa-close"></i>
                                                </a>
                                            </td>
                                        </tr>


                                        <tr class="rowancnewvisit<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"> 
                                            <th width="10%" >N</th>
                                            <th width="7%" >EFW</th>
                                            <th width="16%" >Biom - FHR</th>
                                            <th width="20%" >Placenta</th>
                                            <th  width="7%" >AF</th>
                                            <th  width="20%" >Notes</th>
                                            <th  width="5" ></th>
                                        </tr>
                                        <tr class="rowancnewvisit<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"> 
                                            <td  >
                                                <select  class="form-control getselectajax usn" name="usn" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="ancnewvisit"  data-celtable="usn" id="usn<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>

                                            <td ><input class="form-control digitsOnly"  type="text"   name="usefw" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="ancnewvisit"  value="<?php echo $_smarty_tpl->tpl_vars['single']->value->usefw;?>
"  ></td>
                                            <td ><input class="form-control"  type="text"    name="usbiom" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="ancnewvisit"  value="<?php echo $_smarty_tpl->tpl_vars['single']->value->usbiom;?>
" ></td>
                                            <td  width="10%">
                                                <select  class="form-control getselectajax usplace" name="usplace" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="ancnewvisit"  data-celtable="usplace" id="usplace<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td  width="10%">
                                                <select  class="form-control getselectajax usaf" name="usaf" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="ancnewvisit"  data-celtable="usaf" id="usaf<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td ><input class="form-control"  type="text"   name="newvisitnote2" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="ancnewvisit"  value="<?php echo $_smarty_tpl->tpl_vars['single']->value->newvisitnote2;?>
" ></td>
                                            <td></td>

                                        </tr>
                                        <tr class="rowancnewvisit<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
">

                                            <td colspan="7"><input class="form-control"  type="text"   name="plan" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="ancnewvisit"  value="<?php echo $_smarty_tpl->tpl_vars['single']->value->plan;?>
" placeholder="plan"></td>

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

                                <div class="actions">
                                    <a href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/Ancsheet.php?ac=archive&amp;patientid=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
" class="btn btn-default btn-sm">
                                        Archive pregnancy
                                    </a>
                                    <button id="historys" data-kind="no" class="btn red historys">
                                        End Pregnancy
                                    </button>
                                </div>
                                <table class="table table-bordered  ttt" >
                                    <tbody id="registeration">
                                        <tr>
                                            <th scope="row" class="thhead" colspan="16">
                                                <a class="addappend" data-add="registeration" data-id="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
"  data-table="ancsheetid">  registeration  </a>
                                            </th>
                                        </tr>
                                        <tr>
                                            <th  colspan="1"></th>
                                            <th  colspan="1">(Obst History) P</th>
                                            <th  colspan="1">D - place</th>
                                            <th  colspan="1">origin</th>
                                            <!-- <th  colspan="1">D - place</th> -->
                                            <th  colspan="1">R - place</th>
                                            <th  colspan="1">type</th>
                                            <th  colspan="1">Cost</th>
                                            <th  colspan="1"></th> 
                                        </tr>
                                        <?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable("1", null, 0);?>
                                        <?php  $_smarty_tpl->tpl_vars['single'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['single']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['registeration']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['single']->key => $_smarty_tpl->tpl_vars['single']->value){
$_smarty_tpl->tpl_vars['single']->_loop = true;
?>
                                        <tr class="rowregisteration<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
">
                                            <td width="7%"><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                                            <td width="7%"><select   class="form-control select2me awifep" name="awifep" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="registeration"  data-celtable="awifep" id="awifep<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                    <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['awifep']->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 ($_smarty_tpl->tpl_vars['comp']->value->id==$_smarty_tpl->tpl_vars['single']->value->awifep){?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['comp']->value->name;?>
</option>
                                                    <?php } ?>
                                                </select>
                                            </td>
                                            <td width="7%"><select   class="form-control getselectajax place2" name="place2" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="registeration"  data-celtable="place2" id="place2<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td width="7%"><select   class="form-control getselectajax origin" name="origin" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="registeration"  data-celtable="origin" id="origin<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <!-- td width="7%"><input class="form-control"  type="text"   name="dplace" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="registeration"  value="<?php echo $_smarty_tpl->tpl_vars['single']->value->dplace;?>
" ></td> -->
                                            <td width="7%"><input class="form-control"  type="text"   name="rplace" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="registeration"  value="<?php echo $_smarty_tpl->tpl_vars['single']->value->rplace;?>
" ></td>

                                            <td width="7%"><select   class="form-control getselectajax type" name="type" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="registeration"  data-celtable="type" id="type<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-selid="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" >
                                                </select>
                                            </td>
                                            <td width="7%"><input class="form-control"  type="text"   name="coast" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
" data-table="registeration"  value="<?php echo $_smarty_tpl->tpl_vars['single']->value->coast;?>
" ></td>
                                            <td width="5%">
                                                <a class="btn grey-cascade btn-xs deleterow" data-id="<?php echo $_smarty_tpl->tpl_vars['single']->value->id;?>
"  data-table="registeration">
                                                    <i class="fa fa-close"></i>
                                                </a>
                                            </td>
                                        </tr>

                                        <?php $_smarty_tpl->tpl_vars["i"] = new Smarty_variable($_smarty_tpl->tpl_vars['i']->value+1, null, 0);?>
                                        <?php } ?>
                                    </tbody>
                                </table>

                                <div class="form-group">
                                    <div class="col-md-1"></div>
                                    <div class="col-md-8">
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>



<div class="all">   
    <!---------------------------------------------------------------------------add Drugs Model-------------------------------------------------------------------------------------->

    <div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="addPatientDrugs" style="min-width:1000px;">
        <div class="modal-dialog  modal-lg wds90">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close closeDrug" data-dismiss="modal" aria-hidden="true"></button>
                    <h4 class="modal-title">  </h4>
                </div>
                <div class="modal-body">
                    <div class="portlet-body form">
                        <form class="form-horizontal" role="form" action="" method="post" id="gynaDrugs" enctype="multipart/form-data">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="portlet blue-hoki box">
                                        <div class="portlet-title" >
                                            <div class="caption" style=" font-size: 16px; font-weight: 700; width: 280px; "> Today <input type="text" class="form-control datepicker " data-controller="ancsheet"  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="ancsheetdrugs">
                                                    <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="ancsheet"> </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="ancsheet"  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="ancsheetdrugs" 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="ancsheetdrugs" 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="ancsheetdrugs" 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="ancsheet" 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="ancsheet"> 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="ancsheet"> Save </button>
                                                <button type="button" class="btn default printInvestigation" data-print ="1" data-controller="ancsheet"> 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="ancsheet"  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>

<?php }} ?>