Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/icure/admin/
Upload File :
Current File : /var/www/html/mmishra/icure/admin/phreport.inc

<h3 align='left'>Pathology Report</h3>
<center>
<?php

$tbl 	= 'phresults';
$regno 	= $_REQUEST["regno"];

if ($regno) {
	if (is_registration($regno)) {
		echo registration_detail($regno);
	
		//if (is_prescription($regno)) {
			echo "<div align='right'>Date Time: ".date("Y-m-d H:i:s")."</div>

			<h3><u>REPORT</u></h3>

        	<table border='1' width='100%'>
        	<tr><th>Haematology</th><th>Biochemical</th><th>Urine Examination</th></tr>
			<tr valign='top'><td><table border='0' width='100%'>
			<tr><th>Sr.</th><th>Test</th><th>Normal Range</th><th>Result</th></tr>";	

			$rs = mysql_query("select * from phtests where test_group='Haemetology' order by test_id");
			while ($o = mysql_fetch_object($rs)) {
				$i++;
 				echo "<tr><td align='center'>$i</td><td>$o->test_name</td><td>$o->test_range</td>
				<td align='center'>";

	        	$sr = mysql_query("select * from $tbl where reg_no=$regno and test_id=$o->test_id");
           		while ($q = mysql_fetch_object($sr)) {
					echo $q->test_result;
				}
				echo "</td></tr>";
			}
			echo "</table></td><td><table border='0' width='100%'>
        	<tr><th>Sr.</th><th>Test</th><th>Normal Range</th><th>Result</th></tr>";
        		
			$i = 0;
        	$rs = mysql_query("select * from phtests where test_group='Biochemical' order by test_id");
		    while ($o = mysql_fetch_object($rs)) {
        		$i++;
 				echo "<tr><td align='center'>$i</td><td>$o->test_name</td><td>$o->test_range</td>
				<td align='center'>";

	        	$sr = mysql_query("select * from $tbl where reg_no=$regno and test_id=$o->test_id");
           		while ($q = mysql_fetch_object($sr)) {
					echo $q->test_result;
				}
				echo "</td></tr>";
      		}
			echo "</table></td><td><table border='0' width='100%'>
        	<tr><th>Sr.</th><th>Test</th><th>Normal Range</th><th>Result</th></tr>";
        		
			$i = 0;
        	$rs = mysql_query("select * from phtests where test_group='Urine Examination' order by test_name");
		    while ($o = mysql_fetch_object($rs)) {
        		$i++;
           		echo "<tr><td align='center'>$i</td><td>" .str_replace("Urine Examination",'&nbsp;&nbsp;&nbsp;&nbsp;',$o->test_name). "</td><td>$o->test_range</td>
           		<td align='center'>";
                        
           		$sr = mysql_query("select * from $tbl where reg_no=$regno and test_id=$o->test_id");
           		while ($q = mysql_fetch_object($sr)) {
               		echo $q->test_result;
           		}
           		echo "</td></tr>";
       		}
			echo "</table></td></tr>
			</table>
		
			<br><br>
			<div align='right'>
			<b>Reported by: </b>(<?php echo $user; ?>) _______________________
			</div>";
		//} else
		//	echo "No prescription";
	} else {
		echo "No registration";
	}
}
?>
</center>