| Current Path : /var/www/html/mmishra/icure/doctor/ |
| Current File : /var/www/html/mmishra/icure/doctor/medication.inc |
<h3 align='left'>Medication</h3>
<center>
<?php
$tbl = 'medications';
$regdate = $_REQUEST["regdate"];
$patgroup = $_REQUEST["patgroup"];
if (!$patgroup) $patgroup = 'Others';
$dated = $_REQUEST["dated"];
if (!$dated) $dated = date("Y-m-d");
$dated1 = date('Y-m-d', strtotime($dated .' -1 day'));
$dated2 = date('Y-m-d', strtotime($dated .' +1 day'));
echo "<a href='?pg=$pg&dated=$dated1&patgroup=$patgroup'>$dated1</a>
<font size='+1' color='red'>[ $dated ]</font>";
if ($dated != date("Y-m-d")) echo "<a href='?pg=$pg&dated=$dated2&patgroup=$patgroup'>$dated2</a>";
echo "<br>
Patient group <b><font size='+1'>[</font>";
foreach ($patgps as $pgp) {
$i++;
echo "<input type='radio' name='patgroup' value='$pgp'";
echo " onchange=\"javascript: document.location.href='?pg=$pg&dated=$dated&patgroup='+this.value\"";
echo ($patgroup == $pgp ? ' checked' : ''). '>';
echo ($patgroup == $pgp ? "<font size='+1' color='red'>$pgp</font>" : "$pgp");
}
echo "<font size='+1'> ]</font></b>
<table border='1' width='70%'>
<tr><th>Sr</th><th width='35%'>Patient</th><th width='30%'>Registration</th><th width='30%'>Medication</th></tr>";
$i = 0;
$rs = mysql_query("select distinct m.reg_no,r.pat_id from $tbl m, registrations r
where m.reg_no=r.reg_no and pat_group='$patgroup' and dis_datetime like '$dated%'") ;
while ($o = mysql_fetch_object($rs)) {
$i++;
echo "<tr valign='top'><td>$i</td>
<td nowrap style='font-size:x-small'>".patient_detail($o->pat_id)."</td>
<td nowrap style='font-size:x-small'>".registrations($o->reg_no)."</td>
<td nowrap style='font-size:x-small'>".medications($o->reg_no)."</td>
</tr>";
}
?>
</table>
</center>