<?php
include('../config/config.php');
include('../classes/classDiagnostic.php');
/*echo '<pre>';
print_r($_POST);
print_r($_SESSION);
echo '</pre>';
exit;*/
if(isset($_GET['dellabtest'])&&$_GET['dellabtest']!='')
{
	try
	{
		$labtest_id = base64_decode($_GET['dellabtest']);
		
		$delTestOB = new classDiagnostic;
		$delTestOB->updateLabTestActiveOrInactive($labtest_id,0);
		
		header("Location:mgmtlabtests.php");
	}
	catch (MyException $e)
	{
		$error_message = $e->getUserMsg();
	}
}


try
{
	$labtestOb = new classDiagnostic;
	$labtestOb->setOrganizationID($_SESSION['security']['org_id']);
	$labtest_dropdown = $labtestOb->retrieveLabTests();
}
catch (MyException $e)
{
	$error_message = $e->getUserMsg();
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/print.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <link rel="shortcut icon" href="../images/favicon.png">
    <title>Med2TEC Hospital Management Information System</title> 
    <link href="../css/print.css" rel="stylesheet">
    <link href="../datepicker/jquery-ui.css" rel="stylesheet" >  
    <script type="text/javascript" src="../datepicker/jquery-1.9.1.js"></script>
	<script type="text/javascript" src="../datepicker/jquery-ui.js"></script> 
</head>

<body> 
<div align="right"> 
 <SCRIPT LANGUAGE="JavaScript">  
if (window.print) {
document.write('<form class="no-print"><input type=button name=print value="Print" onClick="window.print()"></form>');
}
</script></div>

<section class="wrapper">
<div style="background:#FFF; padding:0px 0px 0; height:auto;">
  <table cellspacing="0" cellpadding="0" width="100%" border="0" style="font-size:11px;">
    <tbody>
      <tr>
        <td align="left" style="background:#fff;"><img alt="" src="../images/org_print_logos/<?php echo $_SESSION['security']['org_id']?>.png" style="width:100%;"></td>
      </tr>
    </tbody>
  </table>
  
</br>

</div>

<div class="row">
          <section class="panel">
            <header class="panel-heading">
              <h2><!-- InstanceBeginEditable name="title" -->LIST OF BlOOD TESTS<!-- InstanceEndEditable --></h2>
            </header>

  <br />
  
<!-- InstanceBeginEditable name="main" -->
  <!-- page start-->
  <div class="panel-body" style="padding-top: 0px; margin-top: -34px;">
              <div class="adv-table">
              
                <table  class="bottomBorder" cellpadding="0" cellspacing="0" width="100%">
                
                  <thead>
                  
                    <tr>
                      <th width="10%" align="center">T-Code</th>
                      <th width="10%">Abbreviation</th>
                      <th width="25%" align="left">Test Name</th>
                      <th width="15%" align="left">Normal Value</th>
                      <th width="15%" align="left">Unit</th>
                      <th width="15%" align="right">Price (Rs.)</th>
                    </tr>
                    
                  </thead>
                  
                  <tbody>
                   <?php
					if(isset($labtest_dropdown[0]['labtest_id'])&&$labtest_dropdown[0]['labtest_id']!='')
					{
						for($g=0;$g<count($labtest_dropdown);$g++)
						{
							
								if($g%2==0){$class='gradeX';}else{$class='gradeC';}
								
								?>
								<tr class="<?php echo $class;?>">
								
                                <td align="center"><?php echo $labtest_dropdown[$g]['labtest_id'];?></td>
								<td align="left"><?php echo strtoupper($labtest_dropdown[$g]['labtest_abb']);?></td>
                                <td align="left"><?php echo strtoupper($labtest_dropdown[$g]['labtest_name']);?></td>
                               
                                <td align="left"><?php echo $labtest_dropdown[$g]['normal_value'];?></td>
                                <td align="left"><?php echo $labtest_dropdown[$g]['unit'];?></td>
                                <td align="right"><?php echo number_format($labtest_dropdown[$g]['labtest_cost'],2);?></td>
								
								</tr>
                                
                                
                                
                                
                                
                                 <?php
						}
					}
					else
					{
						?>
                        <tr>
                        <table>
                        <tr><td>No Entry Fround!</td></tr>
                        </table>
                        </tr>
                        <?php
					}
					?>

                  </tbody>
                  
                </table>
                
              
                
              </div>
            </div>
  <!-- page end-->

<!--<p align="center" style="font-size:12px; font-family:Arial, Helvetica, sans-serif; margin-top:260px;"><strong>For Appointment Call at 042-35151666 (bring your Patient ID Card)</strong>317 A-1, Nursery Stop, Township, Lahore 042-35151666 (Not Valid for Court or any Legal Purpose)</p>
--><!-- InstanceEndEditable -->
</section>
</div>

<!--<p align="center" style="font-size:12px; font-family:Arial, Helvetica, sans-serif; margin-top:260px;"><strong><!--317 A-1, Nursery Stop, Township, Lahore. 
Ph: 042-35151666</strong><br />
For Appointment call at 042-35151666 (bring your Patient ID Card) </p>-->

   <div class="sidepop" style="float:right;">
    <div class="sidepopbutton stemp"><div style="color: rgb(0, 0, 0); text-align: right; font-size: 10px; margin-top: 4px; position: absolute; right: 180px;">© Software by Softusion Inc. 0322 6155 219</div>   
    </div>
</div>

<!--<div class="sidepop" style="float:right;">
    <div class="sidepopbutton stemp"><div style="color:#000; text-align:right; font-size:9px;">© Software designed by Softusion Inc. Contact us at 0322 6155 219</div>   
    </div>
</div>-->


          
</body>
<!-- InstanceEnd --></html>