<?php /* Smarty version Smarty-3.1.11, created on 2026-02-11 07:22:59
         compiled from "../views/obgy/reports/completeprint.html" */ ?>
<?php /*%%SmartyHeaderCode:508039354698c9ed334ccb5-90626322%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a91fa05d7e7acb70f007c7d002d47bbfa7510458' => 
    array (
      0 => '../views/obgy/reports/completeprint.html',
      1 => 1597313762,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '508039354698c9ed334ccb5-90626322',
  '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,
    'maingyna' => 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_698c9ed3591817_64217200',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_698c9ed3591817_64217200')) {function content_698c9ed3591817_64217200($_smarty_tpl) {?><div id="prind" class="prntbl2">
    
    <style>


        .prntbl2 {
            padding:0px !important;
            width:95% !important;
            margin:0px auto !important;
        }.prntbl2 table{
            border-collapse: collapse !important;
            width:100% !important;
            margin:0px !important;
            padding:0px !important;
        }
        .prntbl2 table th {
            background-color: #2D2D2D !important;
            background: #2D2D2D !important;
            border:0px solid #000000 !important;
            border-width:0px 0px 1px 1px !important;
            font-size:15px !important;
            font-family:Arial !important;
            font-weight:bold !important;
            color: #FFFFFF !important;
            text-align: center !important;
        }.prntbl2 tr:hover td{

        }
        .prntbl2 tr:nth-child(odd){background-color: #E0E0E0 !important;}
        .prntbl2 tr:nth-child(even)    { background-color:#ffffff !important; }
        .prntbl2 td{
            border:1px solid #000000 !important;
            padding: 0px 3px !important;
            font-size: 13px !important;
            font-family: tahoma !important;
            color:#000000 !important;
            text-align: left !important;
        }


        .prntbl2 th, .prntbl2 tt, .prntbl2 td {
            line-height: 20px !important;
            padding: 1px 5px !important;


        }

        .prntbl2 span {
            font-weight: 700;
        }

    </style>

    
    <div class="clearfix"></div>
    <!----#########################################---------HISTORY------------############################################################################################---->
    <div >
        <div>
            <table style="direction: rtl;margin: 5px 0px;"  border="1">
                <tr>
                    <td ><?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 ><?php if ($_smarty_tpl->tpl_vars['new_dateofbirth_calc']->value!=''){?> <?php echo $_smarty_tpl->tpl_vars['new_dateofbirth_calc']->value;?>
 سنة <?php }?>  </td>
                    <td ><?php if (!empty($_smarty_tpl->tpl_vars['patientdata']->value['wifejob'])){?><?php echo $_smarty_tpl->tpl_vars['patientdata']->value['wifejob'];?>
<?php }?></td>
                    <td ><?php echo $_smarty_tpl->tpl_vars['patientdata']->value['address'];?>
</td>
                    <td>رقم المريضة : <?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 >متزوجة منذ :<?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 >متزوجة منذ :</td>

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

                    </td>
                    <?php }?>
                </tr>
                <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']!=1){?>
                <tr>
                    <td ><?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 ><?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 ><?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" colspan="2">

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



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

        <div >
            <div style="padding-right: 0px; padding-left: 0px;">

                <div>

                    <?php if ($_smarty_tpl->tpl_vars['phmenstrualcount']->value>0){?>
                    <table border="1">
                        <tr >

                            <td>
                                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> <?php echo $_smarty_tpl->tpl_vars['phregualrity']->value->name;?>
</td><?php }?>

                            <?php if ($_smarty_tpl->tpl_vars['myphmenstrual']->value->phlMP){?><td> <label 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> <?php echo $_smarty_tpl->tpl_vars['myphmenstrual']->value->menarche;?>
 <label style="color:  #3598DC;">Y </label> </td>   <?php }?>

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

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

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

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

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

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

                            <?php }?>

                            <?php }else{ ?>
                            <td>
                                <label>data is empty</label>
                            </td>
                            <?php }?>
                        </tr>
                    </table>
                    <?php }?>

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

                    <table border="1">

                        <tr >

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

                            <?php if ($_smarty_tpl->tpl_vars['phcontracttype']->value->name){?> <td><label 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> <label 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> <label 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> <label style="color:  #3598DC;"> Note : </label>  <?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->contranote;?>
</td> <?php }?>


                            <?php }else{ ?>
                            <td>
                                <label>data is empty</label>
                            </td>
                            <?php }?>
                        </tr>

                    </table>
                    <?php }?>



                    <!-- ========================================================Obstetric H================================================================-->
                    <?php if ($_smarty_tpl->tpl_vars['myallobsteric']->value>0){?>
                    <table border="1">
                        <tr>

                            <td>
                                Obstetric H
                            </td>



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

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

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

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

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

                        </tr>


                    </table>
                    <?php }?>







                    <!-- ========================================================Past Medical H================================================================-->
                    <table border="1">
                        <?php if ($_smarty_tpl->tpl_vars['allpastmedicalcount']->value>0){?>
                        <tr>

                            <td>
                                Past Medical H
                            </td>

                            <td>
                                <label 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>

                            <td>
                                Past Surgical H
                            </td>

                            <td>

                                <label 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>

                            <td>
                                Past Gynecological
                            </td>

                            <td>

                                <label 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>

                            <td>
                                Past ART
                            </td>

                            <td>

                                <label 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>

                            <td>
                                Family H
                            </td>




                            <td>

                                <label 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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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>
                <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: 75px;"/></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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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>
                <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><?php if (!empty($_smarty_tpl->tpl_vars['semen']->value['normaltype'])){?>   Normal <?php }?></label></td>
                <td><label> <?php if (!empty($_smarty_tpl->tpl_vars['semen']->value['oligo'])){?>    Oligo sprerm<?php }?></label></td>
                <td><label> <?php if (!empty($_smarty_tpl->tpl_vars['semen']->value['astheno'])){?>   Astheno sperm<?php }?></label></td>
                <td><label><?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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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>
                <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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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>
                <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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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>
                <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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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>
                <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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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>
                <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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="20">
                    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==0){?><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==0){?>   <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>
                <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==0){?>   <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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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>
                <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)||(!empty($_smarty_tpl->tpl_vars['maingyna']->value)&&($_smarty_tpl->tpl_vars['maingyna']->value->notes!=''||$_smarty_tpl->tpl_vars['maingyna']->value->plan!=''))){?>
    <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">
                    <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->programview==1){?>
                    Gyna Visits
                    <?php }else{ ?>
                    Follow Up Visits
                    <?php }?>
                </th>
            </tr>

        </thead>
    </table>
    <?php }?>

    <?php if (!empty($_smarty_tpl->tpl_vars['maingyna']->value)&&($_smarty_tpl->tpl_vars['maingyna']->value->notes!=''||$_smarty_tpl->tpl_vars['maingyna']->value->plan!='')){?>
    <table class="table  table-bordered table-hover" style="margin-bottom: 0px; margin-top: 10px;">
        <tbody>
            <?php if ($_smarty_tpl->tpl_vars['maingyna']->value->notes!=''){?>
            <tr>
                <th style="width: 7%;">Notes</th>
                <td><?php echo $_smarty_tpl->tpl_vars['maingyna']->value->notes;?>
</td>
            </tr>
            <?php }?>

            <?php if ($_smarty_tpl->tpl_vars['maingyna']->value->plan!=''){?>
            <tr>
                <th style="width: 7%;" >Plan</th>
                <td><?php echo $_smarty_tpl->tpl_vars['maingyna']->value->plan;?>
</td>
            </tr>
            <?php }?>
        </tbody> 
    </table>
    <?php }?>




    <?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>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 style="margin-bottom: 0px; margin-top: 10px;" border="1" >
        <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" style="border:1px solid #000 !important;">
                    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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="25">
                    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">Uterus</th>
                <th colspan="3" scope="col">Cervix</th>
                <th colspan="3" scope="col">OVARY Lt</th>
                <th colspan="3" scope="col">OVARY Rt</th>
                <th colspan="4" scope="col">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>l</td>
                <td>w</td>
                <td>v</td>
                <td>l</td>
                <td>w</td>
                <td>v</td>
                <td>l</td>
                <td>w</td>
                <td>v</td>
                <td>l</td>
                <td>w</td>
                <td>v</td>
                <td>name</td>
                <td>Length</td>
                <td>Width</td>
                <td>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>
            <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%">
                    <?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%">
                    <?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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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>
            <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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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>
                <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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
        <thead>
            <tr>
                <th colspan="12">
                    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 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><input type="text" class="bp_mask" value="<?php echo $_smarty_tpl->tpl_vars['myObject']->value['bp'];?>
" disabled style="border: none;background: inherit ;width: 75px;"/></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 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>
                <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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
            <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>
                <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 style="margin-bottom: 0px; margin-top: 10px;" border="1">
            <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>
                <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 style="padding-top: 0px !important;" id="pnotDiv">
        <label style="font-weight: bold;">Notes</label>
        <div>
            <p id="preportNote"></p>
            <div></div>
        </div>
        <br /><br />
    </div>
    <br /><br />

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

</div>
<?php }} ?>