Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/icure/doctor/
Upload File :
Current File : /var/www/html/mmishra/icure/doctor/reports.inc

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

$rep = $_REQUEST["rep"];

if ($rep == 'daily') $regdate = date("Y-m-d");
else $regdate = date("Y-m");

if ($regdate) {
	$sqls = array("select reg_no,concat(reg_date,' ',reg_time) as dated,concat(pat_group,'-',pat_id,' (',dependent,')') as patient,dr_id as doctor,login_id as staff from registrations where reg_date like '$regdate%' order by reg_no desc",
        "select reg_no,concat(medicine,'- ',dose,', ',frequency,' times, ',course_days,' days') as prescription,login_id as staff from prescriptions where pres_datetime like '$regdate%' order by pres_id",
	"select reg_no,adm_datetime as ADT,diagnosis,referral,dis_datetime as DDT,login_id as staff from admissions where adm_datetime like '$regdate%'",
	"select reg_no,dis_datetime as date_time,med_name as medicine,qty,a.login_id as staff from medications as a, medicines as b where a.med_id=b.med_id and dis_datetime like '$regdate%' order by reg_no desc");

	$no = 0;
	foreach ($sqls as $sql) {
		echo "<p align='left'><b>".$heads[$no]."</b></p>";
		$no++;

		echo list_tabledata($sql);
	}
}

?>
</center>