<?php /* Smarty version Smarty-3.1.11, created on 2024-08-14 14:38:50
         compiled from "../views/obgy/patients/patientdata.html" */ ?>
<?php /*%%SmartyHeaderCode:128562134466bc974ad69fa8-73949420%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c44979c1e31f0e30a2ac7fa80b2513e095e13d8b' => 
    array (
      0 => '../views/obgy/patients/patientdata.html',
      1 => 1690656254,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '128562134466bc974ad69fa8-73949420',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'hospitalView' => 0,
    'path' => 0,
    'openname' => 0,
    'hosturl' => 0,
    'simpleView' => 0,
    'programSetting' => 0,
    'patientdata' => 0,
    'new_dateofbirth_calc' => 0,
    'wifeStatus' => 0,
    'mirragemonths' => 0,
    'mirrageyears' => 0,
    'exmination' => 0,
    'patientid' => 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,
    'obstetricView' => 0,
    'myallobsteric' => 0,
    'pcounter' => 0,
    'cscounter' => 0,
    'abcounter' => 0,
    'Ectopiccounter' => 0,
    'vmodelcounter' => 0,
    'allpastmedicalcount' => 0,
    'allpastmedical' => 0,
    'myallpastmedical' => 0,
    'i' => 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,
    'allphsexualcount' => 0,
    'allphsexual' => 0,
    'data' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_66bc974b025951_14077365',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66bc974b025951_14077365')) {function content_66bc974b025951_14077365($_smarty_tpl) {?><meta charset="utf8" />
<div class="page-content-wrapper azdata">
    <div class="page-content" >
        <div class="row" <?php if ($_smarty_tpl->tpl_vars['hospitalView']->value==0){?> style="display: none;"  <?php }?>>
            <div class="top-menu" style=" background: #fff; height: 40px; ">
                <ul class="nav navbar-nav pull-right">
                    <!-- BEGIN USER LOGIN DROPDOWN -->
                    <!-- DOC: Apply "dropdown-dark" class after below "dropdown-extended" to change the dropdown styte -->
                    <li class="dropdown dropdown-user">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" style=" padding: 10px; ">
                            <img alt="" class="img-circle" src="<?php echo $_smarty_tpl->tpl_vars['path']->value;?>
/_assets/admin/layout/img/avatar3_small.png"  style=" height: 20px; "/>
                            <span class="username username-hide-on-mobile">
                                <?php echo $_smarty_tpl->tpl_vars['openname']->value;?>
  </span>
                            <i class="fa fa-angle-down"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-menu-default">
                            <li>
                                <a href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/_myprofile.php">
                                    <i class="icon-user"></i> My Profile</a>
                            </li>
                            <li class="divider">
                            </li>
                            <li>
                                <a href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/login.php?ac=logout">
                                    <i class="icon-key"></i> Log Out</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>


        <div class="row">
            <div class="col-md-12" style="padding-right: 0px; padding-left: 0px;">
                <div class="portlet box blue">
                    <!--                    <div class="portlet-title" style="height: 5px">
                                            <div class="caption">
                                                <i class="fa fa-edit"></i> Patient History Data
                                            </div>
                                        </div>-->
                    <div class="portlet-body" >
                        <!-- END PAGE HEADER-->
                        <!-- BEGIN PAGE CONTENT-->

                        <div class="row arabic">
                            <div class="aw_xblue">
                                <table class="table table-bordered table-hover table-striped nopdngtbl" style="direction: rtl;margin: 5px 0px;">
                                    <tr>
                                        <td  <?php if ($_smarty_tpl->tpl_vars['simpleView']->value==1){?>style="font-size: 18px;" <?php }?>>
                                            <table class="wds100">
                                                <tr>
                                                    <?php if ($_smarty_tpl->tpl_vars['programSetting']->value->system_lang==2){?>       
                                                    <td class="fleft" style="    border-right: 1px solid #000;">
                                                        <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['gender']==1){?>Male <?php }else{ ?> Female<?php }?> 
                                                    </td>
                                                    <?php }?>    
                                                    <td class="fright"><?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>
                                                </tr>
                                            </table>
                                        </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>
                                        <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']==4||$_smarty_tpl->tpl_vars['patientdata']->value['statuesid']==3){?><td colspan="4" class="wds15"></td><?php }?>
                                    </tr>
                                    <tr>
                                        <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']!=1){?>
                                        <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['mirragefromdate']){?>

                                        <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']==4){?>
                                        <td class="txtr"><?php echo $_smarty_tpl->tpl_vars['wifeStatus']->value;?>
 منذ  &nbsp; &nbsp; &nbsp;
                                            <?php }else{ ?> <td class="txtr"><?php echo $_smarty_tpl->tpl_vars['wifeStatus']->value;?>
 منذ &nbsp; &nbsp; &nbsp; &nbsp;
                                            <?php }?>
                                            <?php if ($_smarty_tpl->tpl_vars['mirragemonths']->value==0){?> <?php echo $_smarty_tpl->tpl_vars['mirrageyears']->value;?>
&nbsp; سنة
                                            <?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['mirragemonths']->value;?>
 : <?php echo $_smarty_tpl->tpl_vars['mirrageyears']->value;?>
&nbsp;     سنة
                                            <?php }?>
                                        </td>
                                        <?php }else{ ?>
                                        <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']==4){?><td class="txtr"><?php echo $_smarty_tpl->tpl_vars['wifeStatus']->value;?>
 منذ &nbsp; &nbsp; &nbsp;  <?php }else{ ?> <td class="txtr"><?php echo $_smarty_tpl->tpl_vars['wifeStatus']->value;?>
 منذ :  <?php }?>

                                            <?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="txtr" style=" direction: ltr; "> <a href="#" id="patientsBMI" data-bmi="<?php echo $_smarty_tpl->tpl_vars['exmination']->value->bmi;?>
" data-WT="<?php echo $_smarty_tpl->tpl_vars['exmination']->value->weight;?>
"  data-HT="<?php echo $_smarty_tpl->tpl_vars['exmination']->value->height;?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['exmination']->value->id;?>
">BMI : <?php echo $_smarty_tpl->tpl_vars['exmination']->value->bmi;?>
</a>  </td>
                                        <td class="txtr" colspan="1"> <a href="#" class="patientsfile">الملفات المرفقة</a>  </td>
                                        <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']==1||$_smarty_tpl->tpl_vars['patientdata']->value['statuesid']==4||$_smarty_tpl->tpl_vars['patientdata']->value['statuesid']==3){?>
                                        <?php if ($_smarty_tpl->tpl_vars['hospitalView']->value==1){?>
                                        <td rowspan="2" id="patientstatusno" class="wds15" colspan="2">
                                            <a class="a_edit" target="_blank" href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patients.php?ac=edit&id=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
">
                                                تعديل بيانات المريضة</a>
                                        </td>
                                        <td rowspan="2" id="patientstatusno" class="wds15">
                                            <a class="a_edit"  href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patients.php?ac=showendvisits&patientid=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
">
                                                تقرير خروج</a>
                                        </td>
                                        <?php }else{ ?>
                                        <td rowspan="2" id="patientstatusno" class="wds15" colspan="3">
                                            <a class="a_edit" target="_blank" href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patients.php?ac=edit&id=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
">
                                                تعديل بيانات المريضة</a>
                                        </td>
                                        <?php }?>

                                        <?php }?>
                                    </tr>
                                    <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['statuesid']!=1&&$_smarty_tpl->tpl_vars['patientdata']->value['statuesid']!=4&&$_smarty_tpl->tpl_vars['patientdata']->value['statuesid']!=3){?>
                                    <tr>
                                        <td class="txtr" <?php if ($_smarty_tpl->tpl_vars['simpleView']->value==1){?>style="font-size: 18px;" <?php }?> ><?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>

                                        <?php if ($_smarty_tpl->tpl_vars['hospitalView']->value==1){?>
                                        <td rowspan="2" id="patientstatusno" class="wds15">
                                            <a class="a_edit" target="_blank" href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patients.php?ac=edit&id=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
">
                                                تعديل بيانات المريضة</a>
                                        </td>
                                        <td rowspan="2" id="patientstatusno" class="wds15">
                                            <a class="a_edit"  href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patients.php?ac=showendvisits&patientid=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
">
                                                تقرير خروج</a>
                                        </td>
                                        <?php }else{ ?>
                                        <td rowspan="2" id="patientstatusno" class="wds15" colspan="2">
                                            <a class="a_edit" target="_blank" href="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patients.php?ac=edit&id=<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
">
                                                تعديل بيانات المريضة</a>
                                        </td>
                                        <?php }?>

                                    </tr>
                                    <?php }?>
                                </table>
                            </div>
                        </div>
                        <div class="row" <?php if ($_smarty_tpl->tpl_vars['simpleView']->value==1){?>style="display: none;" <?php }?>>



                            <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-striped table-bordered table-hover nopdngtbl" >
                                            <tr class="odd gradeX">

                                                <td class="bold">
                                                    <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" class="blue gothislinkagnew" data-go="#tab_0_0"> Menstrual H</a>
                                                </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:  #004179;">LMP </label> :  <?php echo $_smarty_tpl->tpl_vars['myphmenstrual']->value->phlMP;?>
</td><?php }?>


                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" data-id="" id="mensturaldata_btn">Detail</button>

                                                </td>
                                                <?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:  #004179;">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:  #004179;"> 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:  #004179;"> 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:  #004179;">LMP </label> : <?php echo $_smarty_tpl->tpl_vars['myphmenstrual']->value->phlMP;?>
 </td> <?php }?>


                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" data-id="" id="mensturaldata_btn">Detail</button>

                                                </td>



                                                <?php }?>





                                                <?php }else{ ?>
                                                <td class="txtl">
                                                    <label>data is empty</label>
                                                </td>
                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" data-id="" id="mensturaldata_btn">Detail</button>

                                                </td>



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

                                        <!-- ========================================================Contraception================================================================-->

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

                                                <td class="bold">
                                                    <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" class="blue gothislinkagnew" data-go="#tab_1_6">   Contraception H </a>
                                                </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:  #004179;">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:  #004179;"> 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:  #004179;"> 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:  #004179;"> Note : </label>  <?php echo $_smarty_tpl->tpl_vars['myallcontract']->value->contranote;?>
 </td> <?php }?>

                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" data-id="" id="contractdata_btn">Detail</button>
                                                </td>

                                                <?php }else{ ?>
                                                <td class="txtl">
                                                    <label>data is empty</label>
                                                </td>
                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" data-id="" id="contractdata_btn">Detail</button>
                                                </td>

                                                <?php }?>
                                            </tr>

                                        </table>
                                        <?php }?>



                                        <!-- ========================================================Obstetric H================================================================-->

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

                                                <td class="bold">
                                                    <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" class="blue gothislinkagnew" data-go="#tab_2_6">    Obstetric H </a>
                                                </td>



                                                <td class="txtl">
                                                    <input type="checkbox"   id="currently" value="1" class="updateElement" 
                                                           data-id="<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" data-tableName="patients" data-colName="currently"  
                                                           <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['currently']==1){?> checked <?php }?>>
                                                    <label class="bold"  style="color:  #004179;">G : </label> <span id="gCount" >   <?php echo $_smarty_tpl->tpl_vars['myallobsteric']->value;?>
  </span>  </td>

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

                                                <td class="txtl"> <label class="bold" style="color:  #004179;"> C.S : </label>  <?php echo $_smarty_tpl->tpl_vars['cscounter']->value;?>
</td>

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

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

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


                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" id="obstetricdata_btn">Detail</button>
                                                </td>

                                            </tr>

                                        </table>

                                        <?php }else{ ?>

                                        <table class="table table-striped table-bordered table-hover nopdngtbl" >
                                            <tr class="odd gradeX">

                                                <td class="bold">
                                                    <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" class="blue gothislinkagnew" data-go="#tab_2_6">    Obstetric H </a>
                                                </td>



                                                <td class="txtl"> <label class="bold" style="color:  #3598DC;">G : </label>   0</td>

                                                <td class="txtl"> <label class="bold" style="color:  #3598DC;"> P : </label>  0</td>

                                                <td class="txtl"> <label class="bold" style="color:  #3598DC;"> C.S : </label>  0</td>

                                                <td class="txtl"> <label class="bold" style="color:  #3598DC;"> AB : </label>  0</td>

                                                <td class="txtl"><label class="bold" style="color:  #3598DC;"> Ectopic : </label>  0</td>

                                                <td class="txtl"> <label class="bold" style="color:  #3598DC;"> V.mole : </label>  0</td>


                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" id="obstetricdata_btn">Detail</button>
                                                </td>

                                            </tr>

                                        </table>

                                        <?php }?>

                                        <?php }?>





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

                                                <td class="bold">
                                                    <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" class="blue gothislinkagnew" data-go="#tab_55_6" data-second-go="#tab_00_00">   Past Medical H </a>
                                                </td>

                                                <td class="txtl" style="width:8%;"> <label class="bold" style="color:  #004179;"> Disease : </label></td>
                                                <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                <td class="txtl">
                                                    <?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 echo $_smarty_tpl->tpl_vars['myallpastmedical']->value['name'];?>
,&nbsp;

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


                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" id="pastmedicaldata_btn">Detail</button>
                                                </td>




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











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

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

                                                <td class="bold">
                                                    <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" class="blue gothislinkagnew" data-go="#tab_55_6" data-second-go="#tab_10_6">     Past Surgical H </a>
                                                </td>



                                                <td class="txtl" style="width:8%;"><label class="bold" style="color:  #004179;"> Operation : </label></td>
                                                <td class="txtl">
                                                    <?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 echo $_smarty_tpl->tpl_vars['myallpastsurgical']->value['name'];?>
,&nbsp;


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


                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" id="phpastsurgical_btn">Detail</button>
                                                </td>





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



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

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

                                                <td class="bold">
                                                    <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" class="blue gothislinkagnew" data-go="#tab_55_6" data-second-go="#tab_20_6">   Past Gynecological H</a>
                                                </td>

                                                <td class="txtl" style="width:8%;"><label class="bold" style="color:  #004179;"> Operation : </label></td>
                                                <td class="txtl">
                                                    <?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 echo $_smarty_tpl->tpl_vars['myallphpastgynecological']->value['name'];?>
,&nbsp;


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




                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" id="phpastgynecological_btn">Detail</button>
                                                </td>




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








                                        <!-- ========================================================Past art H================================================================-->

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

                                                <td class="bold">
                                                    <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" class="blue gothislinkagnew" data-go="#tab_55_6" data-second-go="#tab_30_6">    Past ART </a>
                                                </td>

                                                <td class="txtl" style="width:8%;"><label class="bold" style="color:  #004179;"> Type : </label></td>
                                                <td class="txtl">
                                                    <?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 echo $_smarty_tpl->tpl_vars['myallphpastart']->value['name'];?>
,&nbsp;

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






                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" id="phpastart_btn">Detail</button>
                                                </td>







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

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

                                                <td class="bold">
                                                    <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" class="blue gothislinkagnew" data-go="#tab_4_6">    Family H</a>
                                                </td>


                                                <td class="txtl" style="width:8%;"><label class="bold" style="color:  #004179;"> Disease : </label></td>
                                                <td class="txtl">
                                                    <?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 echo $_smarty_tpl->tpl_vars['myallphfamily']->value['name'];?>
,&nbsp;


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





                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" id="phfamily_btn">Detail</button>
                                                </td>


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

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

                                                <td class="bold">
                                                    <a data-link="<?php echo $_smarty_tpl->tpl_vars['hosturl']->value;?>
/controllers/patienthistory.php?ac=show&patientid=<?php echo $_smarty_tpl->tpl_vars['patientId']->value;?>
" class="blue gothislinkagnew" data-go="#tab_4_7">    Sexual H</a>
                                                </td>
                                                <td class="txtl" style="width:8%;"><label class="bold" style="color:  #004179;"> Type : </label></td>
                                                <td class="txtl">
                                                    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
                                                    <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['allphsexual']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                                                    <?php echo $_smarty_tpl->tpl_vars['data']->value['name'];?>
,&nbsp;
                                                    <?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>
                                                <td style="width:1%;">
                                                    <button type="button" class="btn btn-xs green fright" id="phsexual_btn">Detail</button>
                                                </td>
                                            </tr>
                                        </table>
                                        <?php }?>


                                    </div>
                                    <div class="alert-danger_h opsrisk" style="    margin-top: 5px; <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['risktype']){?> <?php if ($_smarty_tpl->tpl_vars['patientdata']->value['risktype']==1){?> border: 3px solid green !important;<?php }elseif($_smarty_tpl->tpl_vars['patientdata']->value['risktype']==2){?> border: 3px solid #E0E037 !important;<?php }elseif($_smarty_tpl->tpl_vars['patientdata']->value['risktype']==3){?> border: 3px solid red !important;<?php }?> <?php }else{ ?>border: 3px solid red !important; <?php }?>">
                                        <div class="row">
                                            <div class="col-md-4" style="padding: 0px"> <b style=" float: left; width: 13%; "><u>Risks</u></b> <label style="color: black;font-weight: 600;float: left;width: 87%;"><?php if ($_smarty_tpl->tpl_vars['patientdata']->value['risk']){?> <?php echo $_smarty_tpl->tpl_vars['patientdata']->value['risk'];?>
  <?php }else{ ?> لايوجد <?php }?></label></div>

                                            <div class="col-md-5" style="padding: 0px"> <b style=" float: left; width: 11%; "><u>Notes : </u></b><label style="color: black;font-weight: 600;float: left;width: 89%;text-align: right;"><?php if ($_smarty_tpl->tpl_vars['patientdata']->value['importantnote']){?> <?php echo $_smarty_tpl->tpl_vars['patientdata']->value['importantnote'];?>
 <?php }else{ ?> لايوجد <?php }?></label> <span> </span></div>
                                            <div class="col-md-3 fright">
                                                <div class="col-md-6 " style=" text-align: right; padding: 0px;float:right;"> <label style="color: black;    font-weight: 600;"><?php if ($_smarty_tpl->tpl_vars['patientdata']->value['wifeblpatientdata']){?> <?php echo $_smarty_tpl->tpl_vars['patientdata']->value['wifeblpatientdata'];?>
 <?php }else{ ?> لايوجد  <?php }?></label> : <b><u> فصيله الدم</u></b> </div>
                                                <div class="col-md-6 " style=" text-align: right; padding: 0px; float:right; ">  <label style="color: black;    font-weight: 600;"><?php if ($_smarty_tpl->tpl_vars['patientdata']->value['husblpatientdata']){?> <?php echo $_smarty_tpl->tpl_vars['patientdata']->value['husblpatientdata'];?>
 <?php }else{ ?> لايوجد <?php }?></label>  : <b><u> فصيله الزوج </u></b></div>
                                            </div>
                                        </div>
                                    </div>



                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
</div>
<!-- END PAGE CONTENT-->
<!-- END CONTENT -->

<!--==============================================================model for detail ============================================================================ -->
<div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"  id="phdetail_model">
    <div class="modal-dialog wds80">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"> SHOW DATA </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">
                    <div id="alldetails"></div>
                    <div class="modal-footer">
                        <button type="button" class="btn default" data-dismiss="modal">Close</button>
                    </div>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
    </div>
</div>
<div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"  id="ptfilemodel">
    <div class="modal-dialog wds49">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"> SHOW DATA </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">

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


<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false"   id="showBmi" style="min-width:1000px;">
    <div class="modal-dialog  modal-lg wds12">
        <div class="modal-content" style=" width: 198px; ">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">  </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">
                    <div class="row">
                        <div class="col-md-12" style="background: #85aff3;border-radius: 5%;">
                            <div class="portlet blue-hoki box" style="box-shadow: 0 0 0;">
                                <div class="portlet-title" style=" background-color: #c20a1c; ">
                                    <div class="caption">  BMI Calculations   </div>
                                </div>
                                <div class="portlet-body all" style=" background-color: #85aff3; ">
                                    <div>
                                        <table class="table table-striped table-hover table-bordered" style="margin-top:5px; width: 198px; position: relative; left: -20px; border: 0;">
                                            <thead>
                                                <tr>
                                                    <th> <div align="center">Weight </div></th>
                                                    <td style=" width: 60px; ">
                                                        <input type="text" class="form-control  examinationBMI positivefloat" id="examinationWeight" data-id="" data-colName="weight" data-tableName="examination" value="" />
                                                    </td>
                                                    <th>Kg</th>
                                                </tr>
                                                <tr>
                                                    <th> <div align="center">Height </div></th>
                                                    <td>
                                                        <input type="text" class="form-control   examinationBMI positivefloat" id="examinationHeight" data-id="" data-colName="height" data-tableName="examination" value="" />
                                                    </td>
                                                    <th>M</th>
                                                </tr>
                                                <tr>
                                                    <th> <div align="center">BMI </div></th>
                                                    <td>
                                                        <input type="text" class="form-control " disabled="disabled" id="examinationBMI" data-id="" data-colName="bmi" data-tableName="examination" value="" />
                                                    </td>
                                                    <th>Kg/ m²</th>
                                                </tr>
                                            </thead>

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

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

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

<?php }} ?>