<?php /* Smarty version Smarty-3.1.11, created on 2024-08-22 12:27:55
         compiled from "../views/obgy/reports/completesearch.html" */ ?>
<?php /*%%SmartyHeaderCode:43609810666c7049b563629-08032530%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '55c2403e125ac9edb1e4c718f71168a491bdfc34' => 
    array (
      0 => '../views/obgy/reports/completesearch.html',
      1 => 1477471866,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '43609810666c7049b563629-08032530',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'patientdata' => 0,
    'new_dateofbirth_calc' => 0,
    'mirragemonths' => 0,
    'mirrageyears' => 0,
    'new_dateofbirth_husband' => 0,
    'patientId' => 0,
    'phmenstrualcount' => 0,
    'idData' => 0,
    'phregualrity' => 0,
    'myphmenstrual' => 0,
    'phamount' => 0,
    'phdysmenorrhoea' => 0,
    'myallcontractcount' => 0,
    'idData1' => 0,
    'phcontracttype' => 0,
    'myallcontract' => 0,
    'myallobsteric' => 0,
    'pcounter' => 0,
    'abcounter' => 0,
    'Ectopiccounter' => 0,
    'vmodelcounter' => 0,
    'allpastmedicalcount' => 0,
    'allpastmedical' => 0,
    'i' => 0,
    'myallpastmedical' => 0,
    'allpastsurgicalcount' => 0,
    'allpastsurgical' => 0,
    'myallpastsurgical' => 0,
    'allphpastgynecologicalcount' => 0,
    'allphpastgynecological' => 0,
    'myallphpastgynecological' => 0,
    'allphpastartcount' => 0,
    'allphpastart' => 0,
    'myallphpastart' => 0,
    'allphfamilycount' => 0,
    'allphfamily' => 0,
    'myallphfamily' => 0,
    'allexmination' => 0,
    'programSetting' => 0,
    'myallexmination' => 0,
    'allsemen' => 0,
    'semen' => 0,
    'allhsg' => 0,
    'hsg' => 0,
    'allustv' => 0,
    'ustv' => 0,
    'alllaparoscopy' => 0,
    'lap' => 0,
    'allhysteroscopy' => 0,
    'hyst' => 0,
    'allmrict' => 0,
    'mri' => 0,
    'allhormon' => 0,
    'hormon' => 0,
    'allpathology' => 0,
    'path' => 0,
    'allgyna' => 0,
    'gyna_obj' => 0,
    'allgynaUS' => 0,
    'ProgramesettingData' => 0,
    'gUs' => 0,
    'us' => 0,
    'fo' => 0,
    'idates' => 0,
    'inv' => 0,
    'invest' => 0,
    'dates' => 0,
    'date' => 0,
    'allObj' => 0,
    'mainObj' => 0,
    'h' => 0,
    'myObject' => 0,
    'aUs' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66c7049b87e6c5_74284233',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66c7049b87e6c5_74284233')) {function content_66c7049b87e6c5_74284233($_smarty_tpl) {?><div id="prind">
    <div class="clearfix"></div>
    <!----#########################################---------HISTORY------------############################################################################################---->
    <div class="row arabic">
        <div class="aw_xblue">
            <table class="table table-bordered table-hover  nopdngtbl" style="direction: rtl;margin: 5px 0px;">
                <tr>
                    <td class="txtr"><?php if (!empty($_smarty_tpl->tpl_vars['patientdata']->value['wifetype'])){?><?php echo $_smarty_tpl->tpl_vars['patientdata']->value['wifetype'];?>
 <?php }?>/ <?php echo $_smarty_tpl->tpl_vars['patientdata']->value['wifename'];?>
</td>
                    <td class="txtr"><?php if ($_smarty_tpl->tpl_vars['new_dateofbirth_calc']->value!=''){?> <?php echo $_smarty_tpl->tpl_vars['new_dateofbirth_calc']->value;?>
 سنة <?php }?>  </td>
                    <td class="txtr"><?php if (!empty($_smarty_tpl->tpl_vars['patientdata']->value['wifejob'])){?><?php echo $_smarty_tpl->tpl_vars['patientdata']->value['wifejob'];?>
<?php }?></td>
                    <td class="txtr"><?php echo $_smarty_tpl->tpl_vars['patientdata']->value['address'];?>
</td>
                    <td class="txtr wds15">رقم المريضة : <?php echo $_smarty_tpl->tpl_vars['patientdata']->value['statusno'];?>
</td>
                </tr>
                <tr>
                    <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']!=1){?>
                    <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['mirragefromdate']){?>
                    <td class="txtr">متزوجة منذ :<?php if ($_smarty_tpl->tpl_vars['mirragemonths']->value==0){?> <?php echo $_smarty_tpl->tpl_vars['mirrageyears']->value;?>
 سنة 
                        <?php }elseif($_smarty_tpl->tpl_vars['mirrageyears']->value==0){?> <?php if ($_smarty_tpl->tpl_vars['mirragemonths']->value==1){?><?php echo $_smarty_tpl->tpl_vars['mirragemonths']->value;?>
 شهر <?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['mirragemonths']->value;?>
 شهور <?php }?>
                        <?php }else{ ?> <?php echo $_smarty_tpl->tpl_vars['mirrageyears']->value;?>
سنة  -<?php if ($_smarty_tpl->tpl_vars['mirragemonths']->value==1){?><?php echo $_smarty_tpl->tpl_vars['mirragemonths']->value;?>
 شهر <?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['mirragemonths']->value;?>
 شهور <?php }?>
                        <?php }?> </td>
                    <?php }else{ ?>
                    <td class="txtr">متزوجة منذ :</td>

                    <?php }?>
                    <td class="txtr"> الذكور: <?php echo $_smarty_tpl->tpl_vars['patientdata']->value['boyson'];?>
 </td>
                    <td class="txtr"> الإناث: <?php echo $_smarty_tpl->tpl_vars['patientdata']->value['girlson'];?>
 </td>
                    <?php }?>
                    <td class="attintbl2rows" colspan="2">   </td>
                    <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']==1){?>
                    <td rowspan="2" id="patientstatusno" class="wds15" colspan="3">

                    </td>
                    <?php }?>
                </tr>
                <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']!=1){?>
                <tr>
                    <td class="txtr"><?php if (!empty($_smarty_tpl->tpl_vars['patientdata']->value['husbandtype'])){?><?php echo $_smarty_tpl->tpl_vars['patientdata']->value['husbandtype'];?>
 <?php }?>/ <?php echo $_smarty_tpl->tpl_vars['patientdata']->value['husdandname'];?>
</td>
                    <td class="txtr"><?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']!=3){?><?php if ($_smarty_tpl->tpl_vars['new_dateofbirth_husband']->value!=''){?> <?php echo $_smarty_tpl->tpl_vars['new_dateofbirth_husband']->value;?>
 سنة <?php }?> <?php }?></td>
                    <td class="txtr"><?php if (!empty($_smarty_tpl->tpl_vars['patientdata']->value['husbandjob'])){?><?php echo $_smarty_tpl->tpl_vars['patientdata']->value['husbandjob'];?>
 <?php }?></td>
                    <td rowspan="2" id="patientstatusno" class="wds15" colspan="2">

                    </td>
                </tr>
                <?php }?>
            </table>
        </div>
    </div>
    <div class="row">



        <input type="hidden" id="patientid" value="<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
"/>

        <div class="row">
            <div class="col-md-12" style="padding-right: 0px; padding-left: 0px;">

                <div class="aw_green">

                    <?php if ($_smarty_tpl->tpl_vars['phmenstrualcount']->value>0){?>
                    <table class="table  table-bordered table-hover nopdngtbl" >
                        <tr class="odd gradeX">

                            <td class="bold">
                                Menstrual H
                            </td>

                            <?php if ($_smarty_tpl->tpl_vars['idData']->value=="yes"){?>
                            <?php if (!empty($_smarty_tpl->tpl_vars['phregualrity']->value)&&($_smarty_tpl->tpl_vars['phregualrity']->value->id==1||$_smarty_tpl->tpl_vars['phregualrity']->value->id==2)){?>

                            <?php if ($_smarty_tpl->tpl_vars['phregualrity']->value){?><td class="txtl"> <?php echo $_smarty_tpl->tpl_vars['phregualrity']->value->name;?>
</td><?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['myphmenstrual']->value->phlMP){?><td class="txtl"> <label class="bold" style="color:  #3598DC;">LMP </label> <?php echo $_smarty_tpl->tpl_vars['myphmenstrual']->value->phlMP;?>
</td><?php }?>

                            <?php }else{ ?>
                            <?php if ($_smarty_tpl->tpl_vars['myphmenstrual']->value->menarche){?> <td class="txtl"> <?php echo $_smarty_tpl->tpl_vars['myphmenstrual']->value->menarche;?>
 <label class="bold" style="color:  #3598DC;">Y </label> </td>   <?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['myphmenstrual']->value->duration){?> <td class="txtl"> <?php echo $_smarty_tpl->tpl_vars['myphmenstrual']->value->duration;?>
 <label class="bold" style="color:  #3598DC;"> D  </label></td> <?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['myphmenstrual']->value->length){?> <td class="txtl"> <?php echo $_smarty_tpl->tpl_vars['myphmenstrual']->value->length;?>
 <label class="bold" style="color:  #3598DC;"> D </label></td> <?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['phregualrity']->value){?> <td class="txtl"> <?php echo $_smarty_tpl->tpl_vars['phregualrity']->value->name;?>
</td> <?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['phamount']->value){?> <td class="txtl"> <?php echo $_smarty_tpl->tpl_vars['phamount']->value->name;?>
</td> <?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['phdysmenorrhoea']->value){?> <td class="txtl"> <?php echo $_smarty_tpl->tpl_vars['phdysmenorrhoea']->value->name;?>
</td> <?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['myphmenstrual']->value->phlMP){?> <td class="txtl"> <label class="bold" style="color:  #3598DC;">LMP </label> <?php echo $_smarty_tpl->tpl_vars['myphmenstrual']->value->phlMP;?>
</td> <?php }?>

                            <?php }?>

                            <?php }else{ ?>
                            <td class="txtl">
                                <label>data is empty</label>
                            </td>
                            <?php }?>
                        </tr>
                    </table>
                    <?php }?> 

                    <!-- ========================================================Contraception================================================================-->
                    <?php if ($_smarty_tpl->tpl_vars['myallcontractcount']->value>0){?>

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

                        <tr class="odd gradeX">

                            <td class="bold">
                                Contraception H 
                            </td>
                            <?php if ($_smarty_tpl->tpl_vars['idData1']->value=="yes"){?>

                            <?php if ($_smarty_tpl->tpl_vars['phcontracttype']->value->name){?> <td class="txtl"><label class="bold" style="color:  #3598DC;">Type : </label> <?php echo $_smarty_tpl->tpl_vars['phcontracttype']->value->name;?>
 </td><?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['myallcontract']->value->contduration){?> <td class="txtl"> <label class="bold" style="color:  #3598DC;"> Duration : </label>  <?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->contduration;?>
 Y</td><?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['myallcontract']->value->contstopped){?> <td class="txtl"> <label class="bold" style="color:  #3598DC;"> Stopped : </label>   <?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->contstopped;?>
 Y</td><?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['myallcontract']->value->contranote){?> <td class="txtl"> <label class="bold" style="color:  #3598DC;"> Note : </label>  <?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->contranote;?>
</td> <?php }?>


                            <?php }else{ ?>
                            <td class="txtl">
                                <label>data is empty</label>
                            </td>
                            <?php }?>
                        </tr>

                    </table>
                    <?php }?>



                    <!-- ========================================================Obstetric H================================================================-->
                    <?php if ($_smarty_tpl->tpl_vars['myallobsteric']->value>0){?>
                    <table class="table  table-bordered table-hover nopdngtbl" >
                        <tr class="odd gradeX">

                            <td class="bold">
                                Obstetric H
                            </td>



                            <td class="txtl"><label class="bold" style="color:  #3598DC;">G : </label>   <?php echo $_smarty_tpl->tpl_vars['myallobsteric']->value;?>
</td>

                            <td class="txtl"><label class="bold" style="color:  #3598DC;"> P : </label>  <?php echo $_smarty_tpl->tpl_vars['pcounter']->value;?>
</td>

                            <td class="txtl"><label class="bold" style="color:  #3598DC;"> AB : </label>  <?php echo $_smarty_tpl->tpl_vars['abcounter']->value;?>
</td>

                            <td class="txtl"><label class="bold" style="color:  #3598DC;"> Ectopic : </label>  <?php echo $_smarty_tpl->tpl_vars['Ectopiccounter']->value;?>
</td>

                            <td class="txtl"><label class="bold" style="color:  #3598DC;"> V.mole : </label>  <?php echo $_smarty_tpl->tpl_vars['vmodelcounter']->value;?>
</td>

                        </tr>


                    </table>
                    <?php }?>







                    <!-- ========================================================Past Medical H================================================================-->
                    <table class="table  table-bordered table-hover nopdngtbl" >
                        <?php if ($_smarty_tpl->tpl_vars['allpastmedicalcount']->value>0){?>
                        <tr class="odd gradeX">

                            <td class="bold">
                                Past Medical H 
                            </td>

                            <td class="txtl">
                                <label class="bold" style="color:  #3598DC;"> Disease : </label>
                                <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                <?php  $_smarty_tpl->tpl_vars['myallpastmedical'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myallpastmedical']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allpastmedical']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myallpastmedical']->key => $_smarty_tpl->tpl_vars['myallpastmedical']->value){
$_smarty_tpl->tpl_vars['myallpastmedical']->_loop = true;
?>
                                <?php if ($_smarty_tpl->tpl_vars['i']->value==1){?>
                                <?php echo $_smarty_tpl->tpl_vars['myallpastmedical']->value['name'];?>

                                <?php }else{ ?>
                                ,<?php echo $_smarty_tpl->tpl_vars['myallpastmedical']->value['name'];?>

                                <?php }?>

                                <?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 } ?>
                            </td>
                        </tr>
                        <?php }?>

                        <!-- ========================================================Past surgical H================================================================-->

                        <?php if ($_smarty_tpl->tpl_vars['allpastsurgicalcount']->value>0){?>
                        <tr class="odd gradeX">

                            <td class="bold">
                                Past Surgical H
                            </td>

                            <td class="txtl">

                                <label class="bold" style="color:  #3598DC;"> Operation : </label>

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

                                <?php }else{ ?>
                                ,<?php echo $_smarty_tpl->tpl_vars['myallpastsurgical']->value['name'];?>

                                <?php }?>

                                <?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 } ?>
                            </td>

                        </tr>
                        <?php }?>



                        <!-- ========================================================Past Gynecological H================================================================-->

                        <?php if ($_smarty_tpl->tpl_vars['allphpastgynecologicalcount']->value>0){?>
                        <tr class="odd gradeX">

                            <td class="bold">
                                Past Gynecological 
                            </td>

                            <td class="txtl">

                                <label class="bold" style="color:  #3598DC;"> Operation : </label>

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

                                <?php }else{ ?>
                                ,<?php echo $_smarty_tpl->tpl_vars['myallphpastgynecological']->value['name'];?>

                                <?php }?>

                                <?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 } ?>
                            </td>

                        </tr>
                        <?php }?>
                        <!-- ========================================================Past art H================================================================-->

                        <?php if ($_smarty_tpl->tpl_vars['allphpastartcount']->value>0){?>
                        <tr class="odd gradeX">

                            <td class="bold">
                                Past ART 
                            </td>

                            <td class="txtl">

                                <label class="bold" style="color:  #3598DC;"> Type :  </label>

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

                                <?php }else{ ?>
                                ,<?php echo $_smarty_tpl->tpl_vars['myallphpastart']->value['name'];?>

                                <?php }?>

                                <?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 } ?>
                            </td>
                        </tr>
                        <?php }?>

                        <!-- ========================================================Family H================================================================-->
                        <?php if ($_smarty_tpl->tpl_vars['allphfamilycount']->value>0){?>
                        <tr class="odd gradeX">

                            <td class="bold">
                                Family H
                            </td>




                            <td class="txtl">

                                <label class="bold" style="color:  #3598DC;"> Disease :  </label>

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

                                <?php }else{ ?>
                                ,<?php echo $_smarty_tpl->tpl_vars['myallphfamily']->value['name'];?>

                                <?php }?>

                                <?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 } ?>
                            </td>
                        </tr>
                        <?php }?>


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


    <!----#########################################------EXAMINATION------##################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allexmination']->value)){?>
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    Examination
                </th>
            </tr>
            <tr>
                <th>Date</th>
                <th>WT.</th>
                <th>HT.</th>
                <th>BMI</th>
                <th>BP</th>
                <th>pulse</th>
                <th>Head & neck</th>
                <th>Chest & heart</th>
                <th>Abdomen</th>
                <th>Pelvis</th>
                <th>Extremitis</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['myallexmination'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myallexmination']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allexmination']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myallexmination']->key => $_smarty_tpl->tpl_vars['myallexmination']->value){
$_smarty_tpl->tpl_vars['myallexmination']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['examinationdate'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['weight'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['height'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['bmi'];?>
</td>
                <td><input type="text" class="bp_mask" value="<?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['b_p'];?>
" disabled style="border: none;background: inherit ;width: 50px;"/></td>
                <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['pulse'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['headandneck'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['chestandheart'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['abdomen'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['pelvis'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['extremitis'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['myallexmination']->value['docname'];?>
</td> <?php }?>
            </tr>
            <?php } ?>
        </tbody>
    </table>
    <?php }?>   
    <!----#########################################------SEMEN------##################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allsemen']->value)){?> 
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    Semen
                </th>
            </tr>
            <tr>
                <th>Date</th>
                <th>Count</th>
                <th>MotilityA</th>
                <th>MotilityA+B</th>
                <th>Normal</th>
                <th>Pus cells</th>
                <th>Notes</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['semen'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['semen']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allsemen']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['semen']->key => $_smarty_tpl->tpl_vars['semen']->value){
$_smarty_tpl->tpl_vars['semen']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['semen']->value['sdate'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['semen']->value['count'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['semen']->value['motilitya'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['semen']->value['motilityab'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['semen']->value['normal'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['semen']->value['puscell'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['semen']->value['notes'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['semen']->value['docname'];?>
</td> <?php }?>
            </tr>
            <tr>
                <td></td>
                <td><label class="checkbox-inline "><?php if (!empty($_smarty_tpl->tpl_vars['semen']->value['normaltype'])){?> Normal <?php }?></label></td>
                <td><label class="checkbox-inline "><?php if (!empty($_smarty_tpl->tpl_vars['semen']->value['oligo'])){?> Oligo sprerm <?php }?></label></td>
                <td><label class="checkbox-inline "><?php if (!empty($_smarty_tpl->tpl_vars['semen']->value['astheno'])){?> Astheno sperm <?php }?></label></td>
                <td><label class="checkbox-inline "><?php if (!empty($_smarty_tpl->tpl_vars['semen']->value['tetrato'])){?> Tetrato sperm <?php }?></label></td>
                <td></td>
                <td></td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td></td> <?php }?>
            </tr>
            <?php } ?>
        </tbody>
    </table>
    <?php }?>

    <!----#########################################------HSG------##################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allhsg']->value)){?>                         
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    HSG
                </th>
            </tr>
            <tr>
                <th>Date</th>
                <th>Uterus</th>
                <th>R.tube</th>
                <th>L.tube</th>
                <th>Smear</th>
                <th>Notes</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['hsg'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['hsg']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allhsg']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['hsg']->key => $_smarty_tpl->tpl_vars['hsg']->value){
$_smarty_tpl->tpl_vars['hsg']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['hsg']->value['sdate'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hsg']->value['uterus'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hsg']->value['rtube'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hsg']->value['ltube'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hsg']->value['smear'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hsg']->value['notes'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['hsg']->value['docname'];?>
</td> <?php }?>
            </tr>
            <?php } ?>
        </tbody>
    </table>

    <?php }?>
    <!----################################################################ USTV  ####################################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allustv']->value)){?>  

    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    US/TVS
                </th>
            </tr>
            <tr>
                <th>Date</th>
                <th>Uterus</th>
                <th>R.adnexa</th>
                <th>L.adnexa</th>
                <th>Pelvis</th>
                <th>Notes</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['ustv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['ustv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allustv']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['ustv']->key => $_smarty_tpl->tpl_vars['ustv']->value){
$_smarty_tpl->tpl_vars['ustv']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['ustv']->value['sdate'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['ustv']->value['uterus'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['ustv']->value['radnexa'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['ustv']->value['ladnexa'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['ustv']->value['pelvis'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['ustv']->value['notes'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['ustv']->value['docname'];?>
</td> <?php }?>
            </tr>
            <?php } ?>
        </tbody>
    </table>
    <?php }?>

    <!----###################################################################----LAPAROSCOPY-----#################################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['alllaparoscopy']->value)){?> 

    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    LAPAROSCOPY
                </th>
            </tr>
            <tr>
                <th>Date</th>
                <th>Uterus</th>
                <th>R.adnexa</th>
                <th>L.adnexa</th>
                <th>Pelvis</th>
                <th>Notes</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['lap'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['lap']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['alllaparoscopy']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['lap']->key => $_smarty_tpl->tpl_vars['lap']->value){
$_smarty_tpl->tpl_vars['lap']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['lap']->value['sdate'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['lap']->value['uterus'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['lap']->value['radnexa'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['lap']->value['ladnexa'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['lap']->value['pelvis'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['lap']->value['notes'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['lap']->value['docname'];?>
</td> <?php }?>
            </tr>
            <?php } ?>
        </tbody>
    </table>
    <?php }?>
    <!----#########################################################---HYSTEROSCOPY----################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allhysteroscopy']->value)){?> 

    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    HYSTEROSCOPY
                </th>
            </tr>
            <tr>
                <th>Date</th>
                <th>Cervix</th>
                <th>Uterine Cavity</th>
                <th>R.Ostium</th>
                <th>L.Ostium</th>
                <th>Notes</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['hyst'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['hyst']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allhysteroscopy']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['hyst']->key => $_smarty_tpl->tpl_vars['hyst']->value){
$_smarty_tpl->tpl_vars['hyst']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['hyst']->value['sdate'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hyst']->value['cervix'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hyst']->value['uterine'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hyst']->value['rostium'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hyst']->value['lostium'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hyst']->value['notes'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['hyst']->value['docname'];?>
</td> <?php }?>
            </tr>
            <?php } ?>
        </tbody>
    </table>

    <?php }?>
    <!----#######################################################################--------MRICT-----------#############################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allmrict']->value)){?>  
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    MRI/CT
                </th>
            </tr>
            <tr>
                <th>Date</th>
                <th>Uterus</th>
                <th>R.adnexa</th>
                <th>L.adnexa</th>
                <th>Pelvis</th>
                <th>Notes</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['mri'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['mri']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allmrict']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['mri']->key => $_smarty_tpl->tpl_vars['mri']->value){
$_smarty_tpl->tpl_vars['mri']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['mri']->value['sdate'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['mri']->value['uterus'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['mri']->value['radnexa'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['mri']->value['ladnexa'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['mri']->value['pelvis'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['mri']->value['notes'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['mri']->value['docname'];?>
</td> <?php }?>
            </tr>
            <?php } ?>
        </tbody>
    </table>
    <?php }?>
    <!----##############################################################-------HORMON-----------------######################################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allhormon']->value)){?>   

    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="19" class="bg-grey-gallery bg-font-grey-gallery">
                    HORMONES
                </th>
            </tr>
            <tr>
                <th>Date</th>
                <th>FSH</th>
                <th>LH</th>
                <th>PRL</th>
                <th>E2</th>
                <th>AMH</th>
                <th>FreeT</th>
                <th>TotalT</th>
                <th>P4</th>
                <th>TSH</th>
                <th>T3</th>
                <th>T4</th>
                <th>DHEAS</th>
                <th>DHT</th>
                <th>B.HCG </th>
                <th>InhibinB</th>
                <th>ASD</th>
                <th>Notes</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
            <tr>
                <td></td>
                <td>mIU/ml</td>
                <td>mIU/ml</td>
                <td>ng/ml</td>
                <td>pg/ml</td>

                <td>ng/ml</td>
                <td>pg/ml</td>
                <td>ng/dl</td>
                <td>ng/ml</td>

                <td>uIU/ml</td>
                <td>ng/ml</td>
                <td>ug/dl</td>
                <td>ug/dl</td>

                <td>ng/ml</td>
                <td>mIU/ml</td>
                <td>pg/ml</td>
                <td>ng/ml</td>

                <td></td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td></td> <?php }?>
            </tr>
        </thead>                                            
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['hormon'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['hormon']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allhormon']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['hormon']->key => $_smarty_tpl->tpl_vars['hormon']->value){
$_smarty_tpl->tpl_vars['hormon']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['sdate'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['fsh'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['lh'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['prl'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['etwo'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['amh'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['freet'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['totalt'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['pfour'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['tsh'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['tthree'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['tfour'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['dheas'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['dht'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['bhcg'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['inhibinb'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['asd'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['notes'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['hormon']->value['docname'];?>
</td> <?php }?>
            </tr>
            <?php } ?>
        </tbody>
    </table>

    <?php }?>



    <!----#############################################################---------PATHOLOGY-------#######################################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allpathology']->value)){?>
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    PATHOLOGY
                </th>
            </tr>
            <tr>
                <th>Date</th>
                <th>Cytology</th>
                <th>Histopathology</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['path'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['path']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allpathology']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['path']->key => $_smarty_tpl->tpl_vars['path']->value){
$_smarty_tpl->tpl_vars['path']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['path']->value['sdate'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['path']->value['cytology'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['path']->value['histopathology'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['path']->value['docname'];?>
</td> <?php }?>
            </tr>
            <?php } ?>
        </tbody>
    </table>
    <?php }?>
    <!----#################################################################--------------GYNA VISITS-----------------------###################################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allgyna']->value)){?>
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    Gyna Visits
                </th>
            </tr>
            <tr>
                <th>Date</th>
                <th>Complaint</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->diagnosshow==0){?> <th>Diagnosis</th><?php }?>
                <th>Notes</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['gyna_obj'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['gyna_obj']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allgyna']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['gyna_obj']->key => $_smarty_tpl->tpl_vars['gyna_obj']->value){
$_smarty_tpl->tpl_vars['gyna_obj']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value['gynadate'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->diagnosshow==0){?>
                <td><?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value['complaintxt'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value['diagnosistxt'];?>
</td>
                <?php }else{ ?>
                <td><?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value['complaint'];?>
</td>                                        
                <?php }?>

                <td><?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value['notes'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['gyna_obj']->value['docname'];?>
</td> <?php }?>
            </tr>
            <?php } ?>
        </tbody>       
    </table>
    <?php }?>
    <!----########################################################################================Folliculometry=================############################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allgynaUS']->value)){?>
    <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->ultrasound==0){?>
                            <table class="table table-striped table-hover table-bordered" >

                                            <thead>
                                                <tr>
                                                    <th colspan="25" class="bg-grey-gallery bg-font-grey-gallery">
                                                        Folliculometry
                                                    </th>
                                                </tr>
                                                <tr>
                                                    <th rowspan="2" class="cent" style=" width: 100px; ">
                                                        Date
                                                    </th>
                                                    <th rowspan="2" class="cent" style=" width: 60px; ">
                                                        Day
                                                    </th>
                                                    <th colspan="2" class="cent">
                                                        Right Ovary
                                                    </th>

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

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

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

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

                                                </tr>
                                            </thead>


                                            <tbody id="ussimple">
                                                <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                <?php  $_smarty_tpl->tpl_vars['gUs'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['gUs']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allgynaUS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['gUs']->key => $_smarty_tpl->tpl_vars['gUs']->value){
$_smarty_tpl->tpl_vars['gUs']->_loop = true;
?>
                                                <tr>
                                                    <td>
                                                        <?php echo $_smarty_tpl->tpl_vars['gUs']->value->date;?>

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

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

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

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

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

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

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

                                                    </td>
                                                    <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->displaydoctorname==1){?>
                                                    <td class="bold">
                                                        <?php echo $_smarty_tpl->tpl_vars['gUs']->value->doctorname;?>

                                                    </td>
                                                    <?php }?>
                                                </tr>
                                                <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
                                                <?php } ?>
                                            </tbody>
                                        </table>
                            <?php }else{ ?>
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="25" class="bg-grey-gallery bg-font-grey-gallery">
                    Folliculometry
                </th>
            </tr>
            <tr>
                <th rowspan="2" scope="col">Date</th>
                <th rowspan="2" scope="col">Day</th>
                <th rowspan="2" scope="col">Endo</th>
                <th colspan="3" scope="col" class="bg-grey bg-font-grey">Uterus</th>
                <th colspan="3" scope="col">Cervix</th>
                <th colspan="3" scope="col" class="bg-grey bg-font-grey">OVARY Lt</th>
                <th colspan="3" scope="col">OVARY Rt</th>
                <th colspan="4" scope="col" class="bg-grey bg-font-grey">LTovary</th>
                <th colspan="4" scope="col">Rtovary</th>
                <th rowspan="2" scope="col"><?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>Doctor<?php }?></th>
            </tr>
            <tr>
                <td class="bg-grey bg-font-grey">l</td>
                <td class="bg-grey bg-font-grey">w</td>
                <td class="bg-grey bg-font-grey">v</td>
                <td>l</td>
                <td>w</td>
                <td>v</td>
                <td class="bg-grey bg-font-grey">l</td>
                <td class="bg-grey bg-font-grey">w</td>
                <td class="bg-grey bg-font-grey">v</td>
                <td>l</td>
                <td>w</td>
                <td>v</td>
                <td class="bg-grey bg-font-grey">name</td>
                <td class="bg-grey bg-font-grey">Length</td>
                <td class="bg-grey bg-font-grey">Width</td>
                <td class="bg-grey bg-font-grey">Volume</td>
                <td>Name</td>
                <td>Length</td>
                <td>Width</td>
                <td>Volume</td>
            </tr>
        </thead>
        <?php  $_smarty_tpl->tpl_vars['us'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['us']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allgynaUS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['us']->key => $_smarty_tpl->tpl_vars['us']->value){
$_smarty_tpl->tpl_vars['us']->_loop = true;
?>
        <tr class="odd gradeXH">
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->date;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->day;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->endo;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->uterusl;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->uterusw;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->uterusv;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->cervixl;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->cervixw;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->cervixv;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->ovrayll;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->ovraylw;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->ovraylv;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->ovrayrl;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->ovrayrw;?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['us']->value->ovraylv;?>
</td>
            <td colspan='4' style=" padding: 0; ">
                <table width="100%" class="table  table-bordered table-hover nopdngtbl">
                    <?php  $_smarty_tpl->tpl_vars['fo'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['fo']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['us']->value->focilsl; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['fo']->key => $_smarty_tpl->tpl_vars['fo']->value){
$_smarty_tpl->tpl_vars['fo']->_loop = true;
?>
                    <tr>
                        <td style=" width: 54px; "><?php echo $_smarty_tpl->tpl_vars['fo']->value->name;?>
</td>
                        <td style=" width: 63px; "><?php echo $_smarty_tpl->tpl_vars['fo']->value->length;?>
</td>
                        <td style=" width: 56px; "><?php echo $_smarty_tpl->tpl_vars['fo']->value->width;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['fo']->value->volume;?>
</td>
                    </tr>
                    <?php } ?>
                </table>
            </td>

            <td colspan='4' style=" padding: 0; ">
                <table width="100%" class="table  table-bordered table-hover nopdngtbl">
                    <?php  $_smarty_tpl->tpl_vars['fo'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['fo']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['us']->value->focilsr; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['fo']->key => $_smarty_tpl->tpl_vars['fo']->value){
$_smarty_tpl->tpl_vars['fo']->_loop = true;
?>
                    <tr>
                        <td><?php echo $_smarty_tpl->tpl_vars['fo']->value->name;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['fo']->value->length;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['fo']->value->width;?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['fo']->value->volume;?>
</td>
                    </tr>
                    <?php } ?>
                </table>
            </td>
            <td><?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?> <?php echo $_smarty_tpl->tpl_vars['us']->value->doctorname;?>
<?php }?></td>
        </tr>
        <?php } ?>
    </table>
                            <?php }?>
    <?php }?>
    <!----########################################################################================Investigation=======================############################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['idates']->value)){?>
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    investigation
                </th>
            </tr>
            <tr>
                <th></th>
                <th>Wife</th>
                <th>Husband</th>
            </tr>

        </thead>
        <?php  $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['inv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['idates']->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;
?>
        <tr class="odd gradeXH">
            <td><?php echo $_smarty_tpl->tpl_vars['inv']->value['date'];?>
</td>
            <td>
                <?php  $_smarty_tpl->tpl_vars['invest'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['invest']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['inv']->value['investsw']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['invest']->key => $_smarty_tpl->tpl_vars['invest']->value){
$_smarty_tpl->tpl_vars['invest']->_loop = true;
?>
                <b><?php echo $_smarty_tpl->tpl_vars['invest']->value->invname;?>
: </b><?php if (!empty($_smarty_tpl->tpl_vars['invest']->value->investresult)){?> <?php echo $_smarty_tpl->tpl_vars['invest']->value->investresult;?>
 <?php }else{ ?> --- <?php }?>,
                <?php } ?>
            </td>
            <td>
                <?php  $_smarty_tpl->tpl_vars['invest'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['invest']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['inv']->value['investsh']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['invest']->key => $_smarty_tpl->tpl_vars['invest']->value){
$_smarty_tpl->tpl_vars['invest']->_loop = true;
?>
                <b><?php echo $_smarty_tpl->tpl_vars['invest']->value->invname;?>
: </b><?php if (!empty($_smarty_tpl->tpl_vars['invest']->value->investresult)){?> <?php echo $_smarty_tpl->tpl_vars['invest']->value->investresult;?>
 <?php }else{ ?> --- <?php }?>,
                <?php } ?>
            </td>
        </tr>
        <?php } ?>
    </table>
    <?php }?>

    <!----#######################################################------------------TREATMRNT---------------------------#############################################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['dates']->value)){?>

    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    Treatment
                </th>
            </tr>
            <tr>
                <th></th>
                <th>Wife</th>
                <th>Husband</th>
            </tr>

        </thead>
        <tbody>
            <?php  $_smarty_tpl->tpl_vars['date'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['date']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['dates']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['date']->key => $_smarty_tpl->tpl_vars['date']->value){
$_smarty_tpl->tpl_vars['date']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td>
                    <?php echo $_smarty_tpl->tpl_vars['date']->value["date"];?>

                </td>
                <td>
                    <?php if (!empty($_smarty_tpl->tpl_vars['date']->value["drugdos"])){?> <?php echo $_smarty_tpl->tpl_vars['date']->value["drugdos"];?>
 <?php }?>
                </td>
                <td>
                    <?php if (!empty($_smarty_tpl->tpl_vars['date']->value["drugtype"])){?> <?php echo $_smarty_tpl->tpl_vars['date']->value["drugtype"];?>
 <?php }?>
                </td>
            </tr>

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


    <?php }?>
    <!----###################################################################----ANTENATAL VISITS----------#################################################################################################-->
    <?php if (!empty($_smarty_tpl->tpl_vars['allObj']->value)){?>
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    Antenatal Visits
                </th>
            </tr>

        </thead>
    </table>

    <?php $_smarty_tpl->tpl_vars['h'] = new Smarty_variable(1, null, 0);?>
    <?php  $_smarty_tpl->tpl_vars['mainObj'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['mainObj']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allObj']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['mainObj']->key => $_smarty_tpl->tpl_vars['mainObj']->value){
$_smarty_tpl->tpl_vars['mainObj']->_loop = true;
?>
    <?php if (!empty($_smarty_tpl->tpl_vars['mainObj']->value->antvisit)||!empty($_smarty_tpl->tpl_vars['mainObj']->value->ttt)||!empty($_smarty_tpl->tpl_vars['mainObj']->value->Us)||!empty($_smarty_tpl->tpl_vars['mainObj']->value->lab)){?>
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <thead>
            <tr>
                <th colspan="12" class="bg-grey-gallery bg-font-grey-gallery">
                    Pregnancy No. <?php echo $_smarty_tpl->tpl_vars['h']->value;?>

                </th>
            </tr>                      
        </thead>
        <tbody>

            <?php if (!empty($_smarty_tpl->tpl_vars['mainObj']->value->antvisit)){?>
        <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
            <tr>
                <th>Date</th>
                <th>W</th>
                <th>Complaint</th>
                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->diagnosshow==0){?>
                <th>Diagnosis</th>
                <?php }?>
                <th>Wt</th>
                <th>Bp</th>
                <th>Notes</th>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?><th>Doctor</th><?php }?>
            </tr>
            <?php  $_smarty_tpl->tpl_vars['myObject'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['myObject']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['mainObj']->value->antvisit; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['myObject']->key => $_smarty_tpl->tpl_vars['myObject']->value){
$_smarty_tpl->tpl_vars['myObject']->_loop = true;
?>
            <!-----------------������ ����� ��� ���------------------------->

            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['myObject']->value['antenaldate'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myObject']->value['w'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->diagnosshow==0){?>
                <td><?php echo $_smarty_tpl->tpl_vars['myObject']->value['complaintid'];?>
</td>
                <?php }else{ ?>
                <td><?php echo $_smarty_tpl->tpl_vars['myObject']->value['complaint'];?>
</td>
                <?php }?>
                <?php if ($_smarty_tpl->tpl_vars['ProgramesettingData']->value->diagnosshow==0){?>
                <td><?php echo $_smarty_tpl->tpl_vars['myObject']->value['diagnosisid'];?>
</td>
                <?php }?>
                <td><?php echo $_smarty_tpl->tpl_vars['myObject']->value['wt'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myObject']->value['bp'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['myObject']->value['notes'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['myObject']->value['doctorname'];?>
</td> <?php }?>
            </tr>
            <?php } ?>
        </table>
        <?php }?>

        <!------------------------------ANTENATAL TTT---------------------------------------------->
        <?php if (!empty($_smarty_tpl->tpl_vars['mainObj']->value->ttt)){?>
        <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
            <tr>
                <th colspan="6">TTT</th>
            </tr>
            <tr>
                <th></th>
                <th>Wife</th>
                <th>Husband</th>
            </tr>

            <?php  $_smarty_tpl->tpl_vars['date'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['date']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['mainObj']->value->ttt; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['date']->key => $_smarty_tpl->tpl_vars['date']->value){
$_smarty_tpl->tpl_vars['date']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td>
                    <?php echo $_smarty_tpl->tpl_vars['date']->value["date"];?>

                </td>
                <td>
                    <?php if (!empty($_smarty_tpl->tpl_vars['date']->value["drugdos"])){?><?php echo $_smarty_tpl->tpl_vars['date']->value["drugdos"];?>
 <?php }?>
                </td>
                <td>
                    <?php if (!empty($_smarty_tpl->tpl_vars['date']->value["drugtype"])){?><?php echo $_smarty_tpl->tpl_vars['date']->value["drugtype"];?>
 <?php }?>
                </td>

            </tr>
            <?php } ?>
        </table>
        <?php }?>
        <!------------------------------ANTENATAL US---------------------------------------------->
        <?php if (!empty($_smarty_tpl->tpl_vars['mainObj']->value->Us)){?>

        <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
            <tr>
                <th colspan="12">US</th>
            </tr>
            <tr>
                <th>Date</th>
                <th>N(GA)</th>
                <th>GS</th>
                <th>CRL</th>
                <th>FHR</th>
                <th>BPD</th>
                <th>FL</th>
                <th>Placenta</th>
                <th>AI</th>
                <th>FWT</th>
                <th>Notes</th>
                <th><?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>Doctor<?php }?></th>
            </tr>
            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
            <?php  $_smarty_tpl->tpl_vars['aUs'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['aUs']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['mainObj']->value->Us; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['aUs']->key => $_smarty_tpl->tpl_vars['aUs']->value){
$_smarty_tpl->tpl_vars['aUs']->_loop = true;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['date'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['nga'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['gs'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['crl'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['fhr'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['bpd'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['fl'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['placenta'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['ai'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['fwt'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['notes'];?>
</td>
                <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->displaydoctorname==1){?>   <td><?php echo $_smarty_tpl->tpl_vars['aUs']->value['doctorname'];?>
</td> <?php }?>
            </tr>
            <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
            <?php } ?>
        </table>
        <?php }?>
        <!------------------------------ANTENATAL LAB---------------------------------------------->
        <?php if (!empty($_smarty_tpl->tpl_vars['mainObj']->value->lab)){?>
        <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
            <tr>
                <th colspan="3">Lab</th>
            </tr>
            <tr>
                <th></th>
                <th>Wife</th>
                <th>Husband</th>
            </tr>
            <?php  $_smarty_tpl->tpl_vars['inv'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['inv']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['mainObj']->value->lab; 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;
?>
            <tr class="odd gradeXH">
                <td><?php echo $_smarty_tpl->tpl_vars['inv']->value['date'];?>
</td>
                <td>

                    <?php  $_smarty_tpl->tpl_vars['invest'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['invest']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['inv']->value['investsw']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['invest']->key => $_smarty_tpl->tpl_vars['invest']->value){
$_smarty_tpl->tpl_vars['invest']->_loop = true;
?>
                    <b>  <?php echo $_smarty_tpl->tpl_vars['invest']->value->invname;?>
: </b><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['invest']->value->investresult;?>
<?php $_tmp1=ob_get_clean();?><?php if (!empty($_tmp1)){?><?php echo $_smarty_tpl->tpl_vars['invest']->value->investresult;?>
<?php }else{ ?> --- <?php }?> ,
                    <?php } ?>
                </td>
                <td>

                    <?php  $_smarty_tpl->tpl_vars['invest'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['invest']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['inv']->value['investsh']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['invest']->key => $_smarty_tpl->tpl_vars['invest']->value){
$_smarty_tpl->tpl_vars['invest']->_loop = true;
?>
                    <b>  <?php echo $_smarty_tpl->tpl_vars['invest']->value->invname;?>
: </b><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['invest']->value->investresult;?>
<?php $_tmp2=ob_get_clean();?><?php if (!empty($_tmp2)){?><?php echo $_smarty_tpl->tpl_vars['invest']->value->investresult;?>
<?php }else{ ?> --- <?php }?> ,
                    <?php } ?>
                </td>
            </tr>
            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable('i'+1, null, 0);?>
            <?php } ?>


        </table>
        <?php }?>

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


    <?php }?>
    <!----####################################################################################################################################################################-->








    <div class="form-group form-md-line-input has-info" style="padding-top: 0px !important;" id="notDiv">
        <label class="col-md-1 control-label" for="form_control_1" style="font-weight: bold;">Notes</label>
        <div class="col-md-10">
            <textarea class="form-control" rows="3" placeholder="Enter more text" id="reportNote"></textarea>
            <div class="form-control-focus">
            </div>
        </div>
        <br /><br />
    </div>
    <br /><br />
    <div class="clearfix"></div>
</div><?php }} ?>