| Current Path : /var/www/html/mmishra/icure/patient/ |
| Current File : /var/www/html/mmishra/icure/patient/mhistory.inc |
<h3 align='left'>Medical History</h3>
<center>
<?php
$tbl = 'registrations';
$rs = mysql_query("select * from employees where email like '$user@iiita.ac.in'");
if (mysql_num_rows($rs)) {
$o = mysql_fetch_object($rs);
$patid = $o->emp_no;
} else {
$rs = mysql_query("select * from students where email like '$user@iiita.ac.in'");
if (mysql_num_rows($rs)) {
$o = mysql_fetch_object($rs);
$patid = $o->roll_no;
}
}
if ($patid) {
echo "<table style='font-size:x-small; border-collapse: collapse' border='1' width='80%'>
<tr><th>Sr</th><th>Patient Name</th><th>Registration Detail</th><th>Medication Detail</th></tr>";
$sr = mysql_query("select * from $tbl where pat_id='$patid' order by reg_no desc");
if (mysql_num_rows($sr)) {
$i = 0;
while ($q = mysql_fetch_object($sr)) {
$i++;
echo "<tr valign='top'><td>$i</td>
<td>".($q->dependent ? $q->dependent : 'Self')."</td>
<td nowrap>RegNo.: $q->reg_no<br>Dated: $q->reg_date $q->reg_time<br>
For: ".doctor_detail($q->dr_id)."<br>By: ".staff_detail($q->login_id)."</td>
<td nowrap>".medications($q->reg_no)."</td>
</tr>";
}
} else
echo "<tr><td colspan='4'>None</td></tr>";
echo "</table>";
} else
echo "Your record does not exist.";
?>
</center>