<?php
	include ('common/connection.php');
	$pid=base64_decode($_REQUEST['viw']);
	$pdate=base64_decode($_REQUEST['pd']);
	$ym=date('Y-m');
	$plandate=$ym."-".$pdate;
	//echo "select * from treatment_plan_details where Patient_ID='".$pid."' and Plan_Date='".$plandate."'";
	$query_details=mysqli_query($con,"select * from treatment_plan_details where Patient_ID='".$pid."' and Plan_Date='".$plandate."'");
	if($check=mysqli_num_rows($query_details)>0)
	{
	while($fetch_data=mysqli_fetch_array($query_details))
	{
?>

<label>
<b>Report Type</b> : <?php echo $fetch_data['Type'] ?> &nbsp;&nbsp;&nbsp; <b>Report</b> : <?php echo $fetch_data['Result_1']." ".$fetch_data['Result_2']." ".$fetch_data['Result_3'] ?> &nbsp;&nbsp;&nbsp;<b>TNA Update Time</b> : <?php if($fetch_data['Update_Date_Time']!="0000-00-00 00:00:00"){ echo  date('d-m-Y h:i a',strtotime($fetch_data['Update_Date_Time']));}else {echo "NA";} ?><br/><br/>
</label>

<?php
}
	}
	else
	{
		echo "Treatment Plan Not Available";
	}
?>