| Current Path : /var/www/html/mmishra/icure/staff/ |
| Current File : /var/www/html/mmishra/icure/staff/phreport1.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><td>Patient Name:</td><td>".$o->patient_name($regno)."</td>
<td>Age:</td><td>........Years.</td><td>Sex:</td><td>M/F</td></tr>
</table>
<table border='1' width='100%'>
<tr><th>Haematology</th><th>Biochemical</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>";
if (strpos($o->test_name,'Exam') && !$z) {
echo "<b>URINE EXAMINATION</b><br>";
$z++;
}
echo str_replace("Urine Examination",' ',$o->test_name);
echo "</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";
}