<?php ob_start();   
session_start();
include ('connection.php') ;

  if (!isset($_SESSION['is_logged_in'])) {
    header("Location:login.php");
    die();
    }
	date_default_timezone_set('Asia/Calcutta');
$today = date("d/m/Y");
$today3 = date("Y-m-d");
$today1 = date("d/m");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>

<body>
<?php
$queryls1 = "select * from  prescription  where prescription_id='".$_REQUEST['prescription_id']."'";
$resultls1  = mysqli_query($conn,$queryls1);	
while($row=mysqli_fetch_array($resultls1))
{
$prescription_date = $row['prescription_date'];
$height = $row['height'];
$age = $row['age'];
$weight = $row['weight'];
$pulse = $row['pulse'];
$HO = $row['HO'];
$CO = $row['CO'];
$KP_Drops = $row['KP_Drops'];
$dose_name = $row['dose_name'];
$dose = $row['dose'];
$dose_time = $row['dose_time'];
$dose_at = $row['dose_at'];
$next_followup_on = $row['next_followup_on'];
$next_followup_at = $row['next_followup_at'];
$registration_id= $row['registration_id'];
$TchartID = $row['TchartID'];
}

$qry9 = "select * from patient_register where registration_id = '$registration_id'";
$re9 = mysqli_query($conn,$qry9);
while($row=mysqli_fetch_array($re9))
{  
$patient_name  = $row['patient_name'];
}				
	

?>
<br />
<div align="center"><img src="logo2.png" width="350" height="72" /></div><br />

<table width="100%" border="1" style="border-collapse:collapse">
<tr>
<td colspan="7"><div align="right" style="padding:3px; padding-right:10px; font-family:Arial, Helvetica, sans-serif; font-size:14px; line-height:140%;">Dr.  Ashish  Gaikwad<br />
MD, BAMS, CCH<br />
Nadivaidya<br />
<strong>Reg. No. : I-47123-A</strong>
</div></td>
</tr>
<tr>
<td colspan="4"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px">NAME - <?php echo $patient_name?></div></td>
<td><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px">AGE : <?php echo $age?></div></td>
<td><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px">Wt : <?php echo $weight?></div></td>
<td><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px">DATE : <?php echo $prescription_date?></div></td>
</tr>
<tr>
<td colspan="3"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px">PULSE : <?php echo $pulse?> </div></td>
<td colspan="2"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px">H/O : <?php echo $HO?></div></td>
<td colspan="2"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px">C/O : <?php echo $CO?></div></td>
</tr>
<tr>
<td colspan="7"><div align="center" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>KANAKA PRASHANA <?php echo $KP_Drops?>  Drops</strong></div></td>
</tr>
<tr>
<td colspan="7"><div align="center" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:16px"><strong>MEDICATION</strong></div></td>
</tr>
<tr>
<td bgcolor="#FFFFCC"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Herbs</strong></div></td>
<td bgcolor="#FFFFCC"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Morning</strong></div></td>
<td bgcolor="#FFFFCC"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Noon</strong></div></td>
<td bgcolor="#FFFFCC"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Evening</strong></div></td>
<td bgcolor="#FFFFCC"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Night</strong></div></td>
<td bgcolor="#FFFFCC"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Bedtime</strong></div></td>
<td bgcolor="#FFFFCC"><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><strong>Home Remidies</strong></div></td>
</tr>
<?php
$queryls1 = "select * from  more_prescription  where prescription_id = '".$_REQUEST['prescription_id']."'";
$resultls1  = mysqli_query($conn,$queryls1);	
while($row=mysqli_fetch_array($resultls1))
{
$herbs = $row['herbs'];
$morning = $row['morning'];
$noon = $row['noon'];
$evening = $row['evening'];
$night = $row['night'];
$bedtime = $row['bedtime'];
$home_remidies = $row['home_remidies'];

$query21 = "select * from medicines_master where medicines_id='$herbs'";
$result21 = mysqli_query($conn,$query21);
while($row=mysqli_fetch_array($result21))
{
$medicines = $row['medicines'];
}
?>
<tr>
<td><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><?php echo $medicines?></div></td>
<td><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><?php echo $morning?></div></td>
<td><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><?php echo $noon?></div></td>
<td><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><?php echo $evening?></div></td>
<td><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><?php echo $night?></div></td>
<td><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><?php echo $bedtime?></div></td>
<td><div align="left" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px"><?php echo $home_remidies?></div></td>
</tr><?php } ?>
<tr>
<td height="34" colspan="7"><div align="left"  style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px">
<p><strong>NEXT FOLLOW UP DATE:</strong> &nbsp; <?php echo $next_followup_on?> &nbsp;&nbsp; <strong>Time:</strong> <?php echo $next_followup_at?></p>
</div></td>
</tr>
<tr>
<td height="28" colspan="7"><div align="left"  style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:14px">
<p><strong>PANCHAKARMA </strong></p>
<?php
$qry9 = "select * from therapy_chart_more where TchartID = '$TchartID'";
$re9 = mysqli_query($conn,$qry9);
while($row=mysqli_fetch_array($re9))
{  
$therapy_name  = $row['therapy_name'];
$appointment_date = $row['appointment_date'];
$appointment_time = $row['appointment_time']; 
}	
?><p style="font-size:14px; line-height:180%;"> <strong>PROGRAME:</strong> <?php echo $therapy_name;?>
<br /><strong>Date:</strong> <?php echo $appointment_date;?><br />
<strong>Time:</strong> <?php echo $appointment_time;	?></p>
</div></td>
</tr>
<tr>
<td height="65" colspan="4" valign="middle">&nbsp;</td>
<td colspan="3" valign="top"><div align="right" style="padding:3px; padding-right:10px; font-size:14px; font-family:Arial, Helvetica, sans-serif"><strong>Dr. Ashish M Gaikwad</strong></div></td>
</tr>
<tr>
<td colspan="7" valign="middle"><div align="left" style="font-family:Arial, Helvetica, sans-serif; font-size:9px">Negligence of any instruction given by physician cause to any disturbance in t/t will not responsibility of Kanakaveda</div></td>
</tr>
<tr>
<td colspan="7" valign="middle"><div align="center" style="padding:3px; font-family:Arial, Helvetica, sans-serif; font-size:12px">KANAKAVEDA, B-9, Sujata Niwas, S V Road, Opp. Siddharth Hotel, Bandra West, Mumbai &ndash; 400050<br />
www.kanakavedaayurveda.com | Contact - +91 9820145314 | 022 65010463</div></td>
</tr>
</table>
</body>
</html>
