Mr.Fn4ticHz Shell
Server IP : 162.240.98.243  /  Your IP : 3.143.0.85
Web Server : Apache
System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : btiyawmy ( 1003)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/btiyawmy/www/login.easenup.in/FO/Patient/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/btiyawmy/www/login.easenup.in/FO/Patient/printall.php
<?php
session_start();
include("../../dbconnection.php");
require_once("../../../LoginManager.php");
require_once("../../../DBManager.php");
require_once("../../../patientmanager.php");
$title='Clinical Note';

if(!isset($_SESSION['uname']))
{
echo "<script>alert('Session Expired..');</script><script>window.location='../index.php';</script>";
}



$narayan=LoginManager::currentUser();
$harilal=LoginManager::getUserTypeByuname("$narayan");
$sql ="SELECT * FROM site_users WHERE userno='$harilal'";
		$qsql = mysqli_query($con,$sql);
		$rs = mysqli_fetch_array($qsql);
	
$sql ="SELECT * FROM hco WHERE adminid='$rs[entered_by]'";
$qsql = mysqli_query($con,$sql);
$rs1 = mysqli_fetch_array($qsql);
$usertype=$rs1['adminid'];

	
$hco ="SELECT * FROM hco WHERE adminid='$rs[entered_by]'";
$Qhco = mysqli_query($con,$hco);
$Rowhco = mysqli_fetch_array($Qhco);
$usertype=$Rowhco['adminid'];

	 $sql ="SELECT * FROM admin WHERE id='$Rowhco[adminid]'";
		$qsql = mysqli_query($con,$sql);
		$ra = mysqli_fetch_array($qsql);

$patient ="SELECT * FROM addaspatient WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]'";
$qpatient = mysqli_query($con,$patient);
$rpatient = mysqli_fetch_array($qpatient);

         $sql1 ="SELECT * FROM patient WHERE patientid='$rpatient[patientid]'";
		$qsql1 = mysqli_query($con,$sql1);
		$rspi1 = mysqli_fetch_array($qsql1);
		

	$sqlpatient1 = "SELECT * FROM site_users WHERE userno='$rsp[entered_by]'";
	$qsqlpatient1 = mysqli_query($con,$sqlpatient1);
	$rsn = mysqli_fetch_array($qsqlpatient1);
	 $pricedue=$rsp['pricetotal'];
	 
	 
	 
	 ?>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>All Print</title>

		<meta name="description" content="3 styles with inline editable feature" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="../assets/css/bootstrap.min.css" />
		<link rel="stylesheet" href="../assets/font-awesome/4.5.0/css/font-awesome.min.css" />

		<!-- page specific plugin styles -->
		<link rel="stylesheet" href="../assets/css/jquery-ui.custom.min.css" />
		<link rel="stylesheet" href="../assets/css/jquery.gritter.min.css" />
		<link rel="stylesheet" href="../assets/css/select2.min.css" />
		<link rel="stylesheet" href="../assets/css/bootstrap-datepicker3.min.css" />
		<link rel="stylesheet" href="../assets/css/bootstrap-editable.min.css" />

		<!-- text fonts -->
		<link rel="stylesheet" href="../assets/css/fonts.googleapis.com.css" />

		<!-- ace styles -->
		<link rel="stylesheet" href="../assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />

		<!--[if lte IE 9]>
			<link rel="stylesheet" href="../assets/css/ace-part2.min.css" class="ace-main-stylesheet" />
		<![endif]-->
		<link rel="stylesheet" href="../assets/css/ace-skins.min.css" />
		<link rel="stylesheet" href="../assets/css/ace-rtl.min.css" />

		<!--[if lte IE 9]>
		  <link rel="stylesheet" href="../assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->
		<script src="../assets/js/ace-extra.min.js"></script>

		<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

		<!--[if lte IE 8]>
		<script src="../assets/js/html5shiv.min.js"></script>
		<script src="../assets/js/respond.min.js"></script>
		<![endif]-->
	</head>

	<body class="no-skin">
		<div id="navbar" class="navbar navbar-default          ace-save-state">
		<?php include('../includes/header.php'); ?><!-- /.navbar-container -->
		</div>

		<div class="main-container ace-save-state" id="main-container">
			<script type="text/javascript">
				try{ace.settings.loadState('main-container')}catch(e){}
			</script>

			<div id="sidebar" class="sidebar                  responsive                    ace-save-state">
				<script type="text/javascript">
					try{ace.settings.loadState('sidebar')}catch(e){}
				</script>

				<?php include('top-header-icon.php'); ?><!-- /.sidebar-shortcuts -->

			<?php include('sidebar.php'); ?>
			
			<!-- /.nav-list -->

				<div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
					<i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
				</div>
			</div>

			<div class="main-content">
				<div class="main-content-inner">
					<div class="breadcrumbs ace-save-state" id="breadcrumbs">
						<ul class="breadcrumb">
							<li>
								<i class="ace-icon fa fa-home home-icon"></i>
								<a href="#">Home</a>
							</li>

						
							<li class="active">All Print</li>
						</ul><!-- /.breadcrumb -->

						<div class="nav-search" id="nav-search">
							<form class="form-search">
								<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="ace-icon fa fa-search nav-search-icon"></i>
								</span>
							</form>
						</div><!-- /.nav-search -->
					</div>

					<div class="page-content">
						<div class="ace-settings-container" id="ace-settings-container">
							<div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
								<i class="ace-icon fa fa-file-text-o bigger-130"></i>
							</div>

							<?php include("incident_sidebar.php"); ?><!-- /.ace-settings-box -->
						</div><!-- /.ace-settings-container -->


					<!-- /.page-header -->

						<div class="row">
					<div class='col-sm-12'>
					    	<div class="clearfix">
									
									
										<input type="button" value="Print" onclick="printDiv()" class="btn btn-sm btn-success" style='float:right;'> 
									
									
									
										</div>
					 <div id="GFG">
					     
					     <!--covid 19-->
		<?php
$save_Activity=$con->query("SELECT * FROM `save_activity` WHERE prescriptionid=$_GET[prescriptionid] AND  userno=$_GET[patientid]");		
while($RowActivity=$save_Activity->fetch_array()){	
		
if($RowActivity['discription']=='Intial Assessment<br>Covid 19 Checklist<br>Doc.no-'){    
		?>			     
	<div class='col-sm-12'>
	     <div class="container">
        <div class="row">
            
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>Covid 19 Checklist<br>Doc.no-'";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>Covid 19 Checklist<br>Doc.no-'){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>      
  
    
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">Covid 19 Checklist
 </strong></h4>
<table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
<?php
  	$CovidChecklist ="SELECT * FROM CovidChecklist WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qCovidChecklist = mysqli_query($con,$CovidChecklist);
		while($rCovidChecklist = mysqli_fetch_array($qCovidChecklist))
		{
if($rCovidChecklist[symptoms_fever] == 'on'){
    echo " <tr><td width='50%'>Do you have symptoms such as fever, cough, sneezing, sore throat, fatigue, sense of smell, changes in taste, and body aches?: </td>
<td width='50%'> Yes </td></tr>";
} else{
    echo "<tr><td width='50%'>Do you have symptoms such as fever, cough, sneezing, sore throat, fatigue, sense of smell, changes in taste, and body aches?: </td>
<td width='50%'> No </td></tr>";
}
if($rCovidChecklist[difficulty_breathing] == 'on'){
    echo " <tr><td width='50%'>Do you have difficulty of breathing?: </td>
<td width='50%'> Yes </td></tr>";
} else{
    echo "<tr><td width='50%'>Do you have difficulty of breathing?: </td>
<td width='50%'> No </td></tr>";
}
if($rCovidChecklist[country_days] == 'on'){
    echo " <tr><td width='50%'>Have you travelled outside the country in the last 30 days?: </td>
<td width='50%'> Yes </td></tr>";
} else{
    echo "<tr><td width='50%'>Have you travelled outside the country in the last 30 days?: </td>
<td width='50%'> No </td></tr>";
}
if($rCovidChecklist[other_cities] == 'on'){
    echo " <tr><td width='50%'>Have you traveled to other cities in India in 15 days?: </td>
<td width='50%'> Yes </td></tr>";
} else{
    echo "<tr><td width='50%'>Have you traveled to other cities in India in 15 days?: </td>
<td width='50%'> No </td></tr>";
}
if($rCovidChecklist[two_weeks] == 'on'){
    echo " <tr><td width='50%'>Were you a Covid-19 positive patient in the last two weeks? or suspect in a case of covid-19 ?: </td>
<td width='50%'> Yes </td></tr>";
} else{
    echo "<tr><td width='50%'>Were you a Covid-19 positive patient in the last two weeks? or suspect in a case of covid-19 ?: </td>
<td width='50%'> No </td></tr>";
}
if($rCovidChecklist[health_facility] == 'on'){
    echo " <tr><td width='50%'>Have you visited a health care facility in the past two weeks?: </td>
<td width='50%'> Yes </td></tr>";
} else{
    echo "<tr><td width='50%'>Have you visited a health care facility in the past two weeks?: </td>
<td width='50%'> No </td></tr>";
}
}
?>

</table>

<?php
  	$CC ="SELECT * FROM CovidChecklist WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qCC = mysqli_query($con,$CC);
		while($rCC = mysqli_fetch_array($qCC))
		{
	    $SU ="SELECT * FROM site_users WHERE userno='$rCC[entered_by]'";
		$qSU = mysqli_query($con,$SU);
		if($rSU = mysqli_fetch_array($qSU))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
		 <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
		 <tr><td width=50%><b>By :</b>$rSU[name] </b><td width='50%'><b>At :</b> $rCC[created_at] </tr>";   
		    
		}
		}
		?>
		</table>
          
       </div></div>    
       
       <div style="page-break-before:always">&nbsp;</div> 
	</div>
<?php } ?>

	<?php 
if($RowActivity['discription']=='Intial Assessment<br>Request for Consultation<br>Doc no. '){    
		?>
	<!--Request For Consultation-->
	<div class='col-sm-12'>
	   <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>Request for Consultation<br>Doc no. '";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>Request for Consultation<br>Doc no. '){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
            <?php
$sql ="SELECT * FROM addaspatient WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		   
$usertype=$rs['typevisit'];
if($usertype == 'OPD'){
    echo " Request for Consultation <input type='hidden' value='Initial Assessment' name='pagetype'>";
} else{
    echo "Request for Admission <input type='hidden' value='Request for Admission' name='pagetype'>";
}
}
?>
          
         
 </strong></h4>            
              
                <table  class='table table-bordered ' style='width:100%;' border='1'>
            

    <table  class='table table-bordered ' style='width:100%;' border='1'>


<?php

$sql ="SELECT * FROM addaspatient WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND typevisit='IPD' OR prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND typevisit='Ipd_Emergency' ";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
{
?> 

<?php
      
		$sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		 $sql21 ="SELECT * FROM ward WHERE wardid='$rs[Ward]'";
$qsql21 = mysqli_query($con,$sql21);
if($rs11 = mysqli_fetch_array($qsql21))
{
    	 $sql22 ="SELECT * FROM bedindex WHERE bedid='$rs[Bed]'";
$qsql22 = mysqli_query($con,$sql22);
while($rs12 = mysqli_fetch_array($qsql22))
{
   echo " 
                                         <tr>
                                         <td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;Ward & Bed</td>
                                         <td width='50%'>$rs11[ward_type] - $rs11[ward_name] - <b>Bed no:</b> $rs12[bedname]</td></tr>
                            
      ";
}
		}
		}
		?>







<?php
}
}
?>


<tr><td width='50%'>
 &nbsp;  &nbsp; &nbsp; &nbsp;Admitted Under</td>
    <?php
    $sqlpatient1= "SELECT * FROM addaspatient WHERE prescriptionid='$_GET[prescriptionid]'";
			$qsqlpatient1 = mysqli_query($con,$sqlpatient1);
			while($rr1=mysqli_fetch_array($qsqlpatient1))
			{
			    $sqldoctor= "SELECT * FROM site_users WHERE userno='$rr1[Admitted_Under]'";
			$qsqldoctor = mysqli_query($con,$sqldoctor);
			while($rsdoctor = mysqli_fetch_array($qsqldoctor))
			{
			    
			    echo"<td width='50%'>
$rsdoctor[name]</td>
";
}
}
?></tr>
 
 
    <!-- Content Header (Page header) -->
    

<?php 
		$sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo "




         <table  class='table table-bordered ' style='width:100%;' border='1'>
<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; Type of Admission: </td>
<td width='50%'>$rs[Type_of_Admission]</td>
</tr>

<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  Reason for Admission :  </td>
<td width='50%'>$rs[Reason_for_Admission]</td>
</tr>
</table>
";
}
?>
<?php
	$sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rt = mysqli_fetch_array($qsql))
		{
if(on==$rt[MLC])
{
?>  
    <?php
    $sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo "
<h3 align='center'>MLC Checklist</h3>
     <table  class='table table-bordered ' style='width:100%;' border='1'>
<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; MLC No: </td>
<td width='50%'>$rs[MLC_No]</td>
</tr>
<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; MLC Slip : </td>
<td width='50%'>$rs[Upload_MLC_Slip]</td>
</tr>
</table>
";
}
?>
	  <?php
}
}
?>
<?php
	$sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rt = mysqli_fetch_array($qsql))
		{
if(on==$rt[Trauma])
{
?>  
    <?php
    $sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo "
<h3 align='center'>Trauma Care Checklist</h3>
<BR><BR>
<h5 align='center'>Immediately after primary & secondary surveys</h5> 
     <table  class='table table-bordered ' style='width:100%;' border='1'>
<tr>
<td width='50%'> 
Is Further Airway Intervention Needed? :  </td>
<td width='50%'>$rs[further] </td>
</tr>
<tr>
<td width='50%'>Is There A Tension Pneumo-Haemothorax ? :  </td>
<td width='50%'>$rs[Pneumo_Haemothorax] </td>
</tr>
<tr>
<td width='50%'>IS The Pulse and Fluids Started ? : </td>
<td width='50%'>$rs[Fluids_Started]  </td>
</tr>
<tr>
<td width='50%'>Large-bore IV placed and fluids started : </td>
<td width='50%'>$rs[iv_fluids_started] </td>
</tr>
<tr>
<td width='50%'>Full Survey For (and control of)External bleeding, Including: </td>
<td width='50%'>$rs[Full_Survey]&nbsp; ,$rs[Perineum]&nbsp; ,$rs[Back] </td>
</tr>
<tr>
<td width='50%'>Assessed For Pelvic Fracture by : </td>
<td width='50%'>$rs[Pelvic_Fracture] </td>
</tr>
<tr>
<td width='50%'>Assessed For Internal Bleeding By: </td>
<td width='50%'>$rs[Internal_Bleeding] </td>
</tr>
<tr>
<td width='50%'>Is Spinal Immobilization Needed? : </td>
<td width='50%'>$rs[Spinal_Immobilization] </td>
</tr>
<tr>
<td width='50%'>Neurovascular Status of all 4 limbs Checked? : </td>
<td width='50%'>$rs[Neurovascular_Status] </td>
</tr>
<tr>
<td width='50%'>IS the patient Hypothermic? :</td>
<td width='50%'>$rs[Hypothermic]  </td>
</tr>
<tr>
<td width='50%'>Does the Patient Need(if no contraindication) :</td>
<td width='50%'>$rs[contraindication],&nbsp;$rs[Nasogastric_Tube],&nbsp;$rs[Chest_Drain],&nbsp;$rs[None_Indicated],&nbsp;</td>
</tr>
<tr>
<td width='50%'>Has the Patient been Given :</td>
<td width='50%'>$rs[leaves_patient],&nbsp;$rs[Analgesics],&nbsp;$rs[Antibiotics],&nbsp;$rs[None_Indicated],&nbsp;</td>
</tr>
<tr>
<td width='50%'>Have All tests and imaging been Reviewed :</td>
<td width='50%'>$rs[tests_imaging]  </td>
</tr>
<tr>
<td width='50%'>Which serial Examinations Are Needed:</td>
<td width='50%'>$rs[Examinations]  </td>
</tr>
<tr>
<td width='50%'>Plan of care discussed with :</td>
<td width='50%'>$rs[care_discussed],&nbsp;$rs[Receiving_Unit],&nbsp; $rs[Primary_team],&nbsp; $rs[Other_Specialists],&nbsp;   </td>
</tr>
<tr>
<td width='50%'>Relevant Trauma Chart or Form Comleted? :</td>
<td width='50%'>$rs[Trauma_Chart]  </td>
</tr>
<tr>
<td width='50%'>Trauma Slip :</td>
<td width='50%'> <a href='http://easenup.healthcare/hco/uploads/$rs[Trauma_Slip]'>uploads/$rs[Trauma_Slip]</a>  </td>
</tr>
</table>
</fieldset>


 ";
	  echo "</td></tr>";	}
		?>
	
		 	  <?php
}
}
?>


<?php
	$sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rt = mysqli_fetch_array($qsql))
		{
if(on==$rt[Code_Blue])
{
?>  

<h3 align='center'>Code Blue Checklist</h3>
    <table  class='table table-bordered ' style='width:100%;' border='1'>
<?php
  	$sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
if($rs[Establishes_unresponsiveness] == 'on'){
    echo " <tr><td width='50%'>Establishes unresponsiveness (shake shoulders/call names) (1*Responder) (Licensed nurse leads code Until code blue team arrives): </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Establishes unresponsiveness (shake shoulders/call names) (1*Responder) (Licensed nurse leads code Until code blue team arrives): </td>
<td width='50%'>No</td></tr>";
}
if($rs[Drills_code] == 'on'){
    echo " <tr><td width='50%'>Drills code (shouts for help & stays with pt.): </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Drills code (shouts for help & stays with pt.): </td>
<td width='50%'>No</td></tr>";
}
if($rs[Lower_Bed] == 'on'){
    echo " <tr><td width='50%'>Lower Bed removes pillows : </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Lower Bed removes pillows :  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Universal_Precautions] == 'on'){
    echo " <tr><td width='50%'>Exercise *Universal Precautions </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Exercise *Universal Precautions :  </td>
<td width='50%'>No</td></tr>";
}
if($rs[initiate_compressions] == 'on'){
    echo " <tr><td width='50%'>Evaluation : initiate compressions (at rate of 30:2 Rescue Breaths) :</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Evaluation : initiate compressions (at rate of 30:2 Rescue Breaths) :  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Airway_Assess] == 'on'){
    echo " <tr><td width='50%'>Airway/Assess (if no response ventilates x2 Ambu bag):</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Airway/Assess (if no response ventilates x2 Ambu bag):  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Carotid_femoral] == 'on'){
    echo " <tr><td width='50%'>Carotid/femoral pulse 5-10 sec:</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Carotid/femoral pulse 5-10 sec:  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Breathing_Bag] == 'on'){
    echo " <tr><td width='50%'>Breathing – AMBU Bag / Mask placed in correct Position seal maintained, attached to 02@10-12 …. Provides 2 breaths per 30 compressions:</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Breathing – AMBU Bag / Mask placed in correct Position seal maintained, attached to 02@10-12 …. Provides 2 breaths per 30 compressions:  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Airway_placement] == 'on'){
    echo " <tr><td width='50%'>Airway placement (Stabilizes indication &method for use ):</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Airway placement (Stabilizes indication &method for use ):  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Crash_cart] == 'on'){
    echo " <tr><td width='50%'>Crash cart arrives :</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Crash cart arrives :  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Sick_board] == 'on'){
    echo " <tr><td width='50%'>Sick board placed :</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Sick board placed :  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Applies_multifunction] == 'on'){
    echo " <tr><td width='50%'>Applies multifunction electrode pads in correct Position (cleans skin / removes hair as needed) Connects multifunctional pads to therapy cable, Activates AED mode (orange area ) and follows AED :</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Applies multifunction electrode pads in correct Position (cleans skin / removes hair as needed) Connects multifunctional pads to therapy cable, Activates AED mode (orange area ) and follows AED :  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Monitor_PROMPTS] == 'on'){
    echo " <tr><td width='50%'>Monitor PROMPTS:</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Monitor PROMPTS:  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Proceed_defibrillation] == 'on'){
    echo " <tr><td width='50%'>Proceed with defibrillation if indicated by AED (If No shock advised and no sins of circulation begin person CPR):</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Proceed with defibrillation if indicated by AED (If No shock advised and no sins of circulation begin person CPR):  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Interprets_rhythm] == 'on'){
    echo " <tr><td width='50%'>Interprets rhythm, assists med administration & procedure:</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Interprets rhythm, assists med administration & procedure:  </td>
<td width='50%'>No</td></tr>";
}
if($rs[suction_equipment] == 'on'){
    echo " <tr><td width='50%'>Set Up suction equipment:</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Set Up suction equipment:  </td>
<td width='50%'>No</td></tr>";
}
if($rs[intubation_tray] == 'on'){
    echo " <tr><td width='50%'>Set up intubation tray:</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Set up intubation tray:  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Establishes_Access] == 'on'){
    echo " <tr><td width='50%'>Establishes IV Access and setup IV solution (s):</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Establishes IV Access and setup IV solution (s):  </td>
<td width='50%'>No</td></tr>";
}
if($rs[Contain_patient] == 'on'){
    echo " <tr><td width='50%'>Contain patient’s charts or delegates task:</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Contain patient’s charts or delegates task : </td>
<td width='50%'>No</td></tr>";
}
if($rs[med_tray] == 'on'){
    echo " <tr><td width='50%'>Setup med tray & assists with medication administration :</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Setup med tray & assists with medication administration : </td>
<td width='50%'>No</td></tr>";
}
if($rs[Verbalizes_Method] == 'on'){
    echo " <tr><td width='50%'>(Verbalizes Method to print information strip from lips Monitoring) :</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>(Verbalizes Method to print information strip from lips Monitoring) : </td>
<td width='50%'>No</td></tr>";
}
if($rs[Communicates_Family] == 'on'){
    echo " <tr><td width='50%'>Communicates with Family :</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Communicates with Family : </td>
<td width='50%'>No</td></tr>";
}
if($rs[Complete_CodeBlue] == 'on'){
    echo " <tr><td width='50%'>Complete Code Blue Record :</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Complete Code Blue Record : </td>
<td width='50%'>No</td></tr>";
}

if($rs[Secure_codestatement] == 'on'){
    echo " <tr><td width='50%'>Secure code statement :</td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Secure code statement : </td>
<td width='50%'>No</td></tr>";
}
}
?>
  </table>
  <?php
}
}
?>

<?php
	$sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rt = mysqli_fetch_array($qsql))
		{
if($rt[cov]==on)
{
?>  

<h3 align='center'>Covid 19 Checklist</h3>
    <table  class='table table-bordered ' style='width:100%;' border='1'>
<?php
  	$sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
if($rs[symptoms_fever] == 'on'){
    echo " <tr><td width='50%'>Do you have symptoms such as fever, cough, sneezing, sore throat, fatigue, sense of smell, changes in taste, and body aches?: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Do you have symptoms such as fever, cough, sneezing, sore throat, fatigue, sense of smell, changes in taste, and body aches?: </td>
<td width='50%'>No</td></tr>";
}
if($rs[difficulty_breathing] == 'on'){
    echo " <tr><td width='50%'>Do you have difficulty of breathing?: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Do you have difficulty of breathing?: </td>
<td width='50%'>No</td></tr>";
}
if($rs[country_days] == 'on'){
    echo " <tr><td width='50%'>Have you travelled outside the country in the last 30 days?: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Have you travelled outside the country in the last 30 days?: </td>
<td width='50%'>No</td></tr>";
}
if($rs[other_cities] == 'on'){
    echo " <tr><td width='50%'>Have you traveled to other cities in India in 15 days?: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Have you traveled to other cities in India in 15 days?: </td>
<td width='50%'>No</td></tr>";
}
if($rs[two_weeks] == 'on'){
    echo " <tr><td width='50%'>Were you a Covid-19 positive patient in the last two weeks? or suspect in a case of covid-19 ?: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Were you a Covid-19 positive patient in the last two weeks? or suspect in a case of covid-19 ?: </td>
<td width='50%'>No</td></tr>";
}
if($rs[health_facility] == 'on'){
    echo " <tr><td width='50%'>Have you visited a health care facility in the past two weeks?: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Have you visited a health care facility in the past two weeks?: </td>
<td width='50%'>No</td></tr>";
}
}
?>
</table>
<?php
}
}
?>

<?php
    $sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
				{
if(on==$rs[Safe_childbirth_checklist])
{
?>

<h5 align='center'>Safe Childbirth Checklist </h5>
    <table  class='table table-bordered ' style='width:100%;' border='1'>
    	<?php
    $sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
				{
				    echo "
				    <tr>
<td width='50%'>Does mother need referral  :</td>
<td width='50%'>$rs[mother_need_referral]  </td>
</tr>
<tr>
<td width='50%'>Partograph started? :</td>
<td width='50%'>$rs[Partograph_started]  </td>
</tr>
 <tr>
<td width='50%'>Does mother need to start: Antibiotics? :</td>
<td width='50%'>$rs[start_Antibiotics]  </td>
</tr>
 <tr>
<td width='50%'>Magnesium sulfate and antihypertensive treatment? :</td>
<td width='50%'>$rs[antihypertensive_treatment]  </td>
</tr>
 <tr>
<td width='50%'>Confirm supplies are available to clean hands and wear gloves for each vaginal exam :</td>
<td width='50%'>$rs[vaginal_exam]  </td>
</tr>
 <tr>
<td width='50%'>Encourage birth companion to be present at birth :</td>
<td width='50%'>$rs[present_at_birth]  </td>
</tr>
 <tr>
<td width='50%'>Confirm that mother or companion will call for help during labour if needed :</td>
<td width='50%'>$rs[labour_needed]  </td>
</tr>

				    ";
				}
				?>
    </table>
   
    <?php
}
}
?>



<?php 
		$sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		    echo "
		        <table  class='table table-bordered ' style='width:100%;' border='1'>

";
echo"<tr><td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Referral By: </td><td width='50%'>$rs[referred_by]</td>
</tr>";
if($rs[ID_Band_tied] == 'on'){
    echo " <tr><td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Patient Identification Band tied: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "";
}
if($rs[Rights_Responsibilities] == 'on'){
    echo " <tr><td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Patient Rights & Responsibilities explained: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "";
}
if($rs[surroundings_safety] == 'on'){
    echo " <tr><td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; Patient Made aware of surroundings and safety measures: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "";
}

}
?>

				</table>





<?php

  	$sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
	    $site_users ="SELECT * FROM site_users WHERE userno='$rs[entered_by]'";
		$qsite_users = mysqli_query($con,$site_users);
		if($rsite_users = mysqli_fetch_array($qsite_users))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
		     <table  class='table table-bordered ' style='width:100%;' border='1'>
		 <tr><td width=50%><b>By :</b>$rsite_users[name] </b><td width='50%'><b>At :</b> $rsite_users[updated_at] </tr>";   
		    
		}
		}
		?>
		</table>          
        <div style="page-break-before:always">&nbsp;</div>       
	</div>
     
     
   
											
										</div>   	</div>
										
	
	<!--MLC record									-->
		<?php }
if($RowActivity['discription']=='Intial Assessment<br>MLC Checklist<br>Doc.no-'){    
		?>
			<div class='col-sm-12'>
			    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>MLC Checklist<br>Doc.no-'";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>MLC Checklist<br>Doc.no-'){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
   MLC    
 </strong></h4>            
              
               <?php
    $sql ="SELECT * FROM mlc WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo "

 <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>	
 
 <tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; MLC No : </td>
<td width='50%'>$rs[MLC_No]</td>
</tr>
<tr>

<td width='100%'><img target='_blank' width='900' height='600' src='../../uploads/$rs[Upload_MLC_Slip]'></td>
</tr>

";
}
?>
</table>

<?php
  	$sql ="SELECT * FROM mlc WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
	    $site_users ="SELECT * FROM site_users WHERE userno='$rs[entered_by]'";
		$qsite_users = mysqli_query($con,$site_users);
		if($rsite_users = mysqli_fetch_array($qsite_users))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
		 <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
		 <tr><td width=50%><b>By :</b>$rsite_users[name] </b><td width='50%'><b>At :</b> $rsite_users[updated_at] </tr>";   
		    
		}
		}
		?>
		</table>
       
            <div style="page-break-before:always">&nbsp;</div>
			</div>							
										
					</div></div>
					
<!--Trauma 					-->
			<?php }
if($RowActivity['discription']=='Intial Assessment<br>Trauma Checklist<br>Doc.no-'){    
		?>			
	<div class='col-sm-12'>
	    
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>Trauma Checklist<br>Doc.no-'";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>Trauma Checklist<br>Doc.no-'){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Trauma Checklist
 </strong></h4>            
               <br>
             <?php
    $sql ="SELECT * FROM trauma_checklist WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo "


<h5 align='center'>Immediately after primary & secondary surveys</h5> 
 <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;'  border='1'>
<tr>
<td width='50%'> 
Is Further Airway Intervention Needed? :  </td>
<td width='50%'>$rs[further] </td>
</tr>
<tr>
<td width='50%'>Is There A Tension Pneumo-Haemothorax ? :  </td>
<td width='50%'>$rs[Pneumo_Haemothorax] </td>
</tr>
<tr>
<td width='50%'>IS The Pulse and Fluids Started ? : </td>
<td width='50%'>$rs[Fluids_Started]  </td>
</tr>
<tr>
<td width='50%'>Large-bore IV placed and fluids started : </td>
<td width='50%'>$rs[iv_fluids_started] </td>
</tr>
<tr>
<td width='50%'>Full Survey For (and control of)External bleeding, Including: </td>
<td width='50%'>$rs[Full_Survey]&nbsp; ,$rs[Perineum]&nbsp; ,$rs[Back] </td>
</tr>
<tr>
<td width='50%'>Assessed For Pelvic Fracture by : </td>
<td width='50%'>$rs[Pelvic_Fracture] </td>
</tr>
<tr>
<td width='50%'>Assessed For Internal Bleeding By: </td>
<td width='50%'>$rs[Internal_Bleeding] </td>
</tr>
<tr>
<td width='50%'>Is Spinal Immobilization Needed? : </td>
<td width='50%'>$rs[Spinal_Immobilization] </td>
</tr>
<tr>
<td width='50%'>Neurovascular Status of all 4 limbs Checked? : </td>
<td width='50%'>$rs[Neurovascular_Status] </td>
</tr>
<tr>
<td width='50%'>IS the patient Hypothermic? :</td>
<td width='50%'>$rs[Hypothermic]  </td>
</tr>
<tr>
<td width='50%'>Does the Patient Need(if no contraindication) :</td>
<td width='50%'>$rs[contraindication],&nbsp;$rs[Nasogastric_Tube],&nbsp;$rs[Chest_Drain],&nbsp;$rs[None_Indicated],&nbsp;</td>
</tr>
<tr>
<td width='50%'>Has the Patient been Given :</td>
<td width='50%'>$rs[leaves_patient],&nbsp;$rs[Analgesics],&nbsp;$rs[Antibiotics],&nbsp;$rs[None_Indicated],&nbsp;</td>
</tr>
<tr>
<td width='50%'>Have All tests and imaging been Reviewed :</td>
<td width='50%'>$rs[tests_imaging]  </td>
</tr>
<tr>
<td width='50%'>Which serial Examinations Are Needed:</td>
<td width='50%'>$rs[Examinations]  </td>
</tr>
<tr>
<td width='50%'>Plan of care discussed with :</td>
<td width='50%'>$rs[care_discussed],&nbsp;$rs[Receiving_Unit],&nbsp; $rs[Primary_team],&nbsp; $rs[Other_Specialists],&nbsp;   </td>
</tr>
<tr>
<td width='50%'>Relevant Trauma Chart or Form Comleted? :</td>
<td width='50%'>$rs[Trauma_Chart]  </td>
</tr>

</table>
</fieldset>


 ";
	  echo "</td></tr>";	}
		?>
	




				</table>


<?php
  	$sql ="SELECT * FROM trauma_checklist WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
	    $sql1 ="SELECT * FROM site_users WHERE userno='$rs[entered_by]'";
		$qsql1 = mysqli_query($con,$sql1);
		if($rs1 = mysqli_fetch_array($qsql1))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
		 <table width='100%' border='1' class='table table-bordered table-hover'>
		 <tr><td width=50%><b>By :</b>$rs1[name] </b><td width='50%'><b>At :</b> $rs[updated_at] </tr>";   
		    
		}
		}
		?>
		</table>

          

    <div style="page-break-before:always">&nbsp;</div>        
     
   	
											
										
	</div>				
					
					
					</div></div>
					
<!--Medical and surgical History					-->

	<?php }
if($RowActivity['discription']=='Intial Assessment<br>Medical and surgical History<br>Doc.no-'){    
		?>
<div class='col-sm-12'>
   
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>Medical and surgical History<br>Doc.no-'";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>Medical and surgical History<br>Doc.no-'){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Medical Surgical History
 </strong></h4>            
               <br>
             <table id="example2" class="table table-bordered table-hover" style='width:100%' border='1'>
                  <thead>
                  <tr>
                  
   
         <th><strong>Medical Assessment</strong></th>
          <th><strong>Status</strong></th> 
           <th><strong> <section class="content-header">Edit</section></strong></th>
                </tr>
                  </thead>
                 <tbody> 
                 
<?php
		$sql ="SELECT * FROM medi_condition_final WHERE patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
            echo " 
                                                                                                                                                                
     <tr>   <td>&nbsp;$rs[medicalcon]  &nbsp; <B>$rs[Specify]</B></td>     
            <td>&nbsp;$rs[Status]</td>
             <td><section class='content-header'> <a href='edit_medicalcon.php?patientid=$rs[patientid]&medicalcoid=$rs[medicalcoid]'>Edit</a></section></td>
				
          </tr>                   
          
          ";
}
?>   
 </tbody></table>
        <table id="example2" class="table table-bordered table-hover" style='width:100%' border='1'>
                  <thead>
                  <tr>
                  

      
         <th><strong>Allergies</strong></th>
          <th><strong>Category</strong></th> 
          <th><strong><section class='content-header'>Edit</section></strong></th>
                </tr>
                  </thead>
				<?php
		$sql ="SELECT * FROM allergy WHERE patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($ra = mysqli_fetch_array($qsql))
		{
            echo " <tbody>
  
     <tr>   <td>&nbsp;$ra[Allergen]</td>     
            <td>&nbsp;$ra[Category]</td>
            <td><section class='content-header'><a href='edit_alg.php?patientid=$ra[patientid]&allergy_id=$ra[allergy_id]'>Edit</section></a></td>
				
          </tr>                   
          
          ";
}
?>        </tr>
              
              </thead>
                  


                   </tbody>
  <tfoot>
          </tfoot>
        </table> 
         <table id="example2" class="table table-bordered table-hover" style='width:100%' border='1'>
        <?php
		$sql ="SELECT * FROM Medical_surgical WHERE prescriptionid='$_GET[prescriptionid]'";
		$qsql = mysqli_query($con,$sql);
	if($ra = mysqli_fetch_array($qsql))
		{
            echo " <tbody>
  
     <tr> <td>Information Obtained from</td>     
     <td>&nbsp;$ra[Information_Obtained_from]</td>     
            
				
          </tr>                   
          
          ";
}
?>        </tr>
              
              </thead>
                  


                   </tbody>
  <tfoot>
          </tfoot>
        </table> 
        <?php
    $sql ="SELECT * FROM Medical_surgical WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
				{
if(on==$rs[Addiction])
{
?>

<h3 align='center'>Addiction </h3>
 <table id="example2" class="table table-bordered table-hover" style='width:100%' border='1'>
<?php
  	$sql ="SELECT * FROM Medical_surgical WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Tobacco'];
if($usertype == 'on'){
    echo " <tr><td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Tobacco: </td>
<td width='50%'><i class='fa fa-check' aria-hidden='true'></i></td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_surgical WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Alcohol'];
if($usertype == 'on'){
    echo " <tr><td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Alcohol: </td>
<td width='50%'><i class='fa fa-check' aria-hidden='true'></i></td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_surgical WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Smoking'];
if($usertype == 'on'){
    echo " <tr><td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Smoking: </td>
<td width='50%'><i class='fa fa-check' aria-hidden='true'></i></td></tr>";
} else{
    echo "";
}
}
?>


</table>
	

	
		 	  <?php
}
}
?>



	
	</table>


 <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%' border='1'>
<?php
  	$sql ="SELECT * FROM Medical_surgical WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
	    $sql1 ="SELECT * FROM site_users WHERE userno='$rs[entered_by]'";
		$qsql1 = mysqli_query($con,$sql1);
		if($rs1 = mysqli_fetch_array($qsql1))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
		
		 <tr><td width=50%><b>By :</b>$rs1[name] </b><td width='50%'><b>At :</b> $rs[updated_at] </tr>";   
		    
		}
		}
		?>
		</table>

            
     
   
<div style="page-break-before:always">&nbsp;</div>											
										
</div>					
					
					
	</div></div>		
				
					
<!--Vulnerability Assessment					-->

	<?php }
if($RowActivity['discription']=='Intial Assessment<br>Vulnerability Assessment<br>Doc.no-'){    
		?>
<div class='col-sm-12'>
  
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
         <?php
        
$narayan=LoginManager::currentUser();
$harilal=LoginManager::getUserTypeByuname("$narayan");
$sql ="SELECT * FROM site_users WHERE userno='$harilal'";
		$qsql = mysqli_query($con,$sql);
		$rs = mysqli_fetch_array($qsql);
	
$hco ="SELECT * FROM hco WHERE adminid='$rs[entered_by]'";
$Qhco = mysqli_query($con,$hco);
$Rowhco = mysqli_fetch_array($Qhco);
$usertype=$Rowhco['adminid'];

	 $sql ="SELECT * FROM admin WHERE id='$Rowhco[adminid]'";
		$qsql = mysqli_query($con,$sql);
		$ra = mysqli_fetch_array($qsql);
         ?>              
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>Vulnerability Assessment<br>Doc.no-'";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>Vulnerability Assessment<br>Doc.no-'){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Vulnerability Assessment
 </strong></h4>            
               <br>
             
   <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
		<?php 
		$sql ="SELECT * FROM Vulnerability WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo "
<tr>
<td width='50%'>Level of Consciousness  :</td>
";
$a=$rs[Eye_Opening_Response];
$b=$rs[Best_Verbal_Response];
$c=$a+$b;

$d=$rs[Best_Motor_Response];
$e=$c+$d;
if ($rs[Level_Consciousness]=='Un-conscious') {
    
       echo"<td width='50%'><b>$rs[Level_Consciousness]</b>
   <br><b>Score :</b> <span>$e/15
   </span></td>";
    
} elseif ($rs[Level_Consciousness]=='Semi Conscious') {
   echo"<td width='50%'><b>$rs[Level_Consciousness]</b>
   <br><b>Score :</b> <span>$e/15
   </span></td>";
} else {
  echo"<td width='50%'>$rs[Level_Consciousness]  </td>";
}
}
?>


<?php 


		$sql1 ="SELECT * FROM addaspatient WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql1 = mysqli_query($con,$sql1);
		if($rs1 = mysqli_fetch_array($qsql1))
		{
		$sql ="SELECT * FROM Vulnerability WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo "
		 



<tr>
<td width='50%'>Dependency  :</td>
<td width='50%'>$rs[Dependency]  </td>
</tr>
<tr>
<td width='50%'>Mode of Movement  :</td>
<td width='50%'>$rs[Modn]  </td>
</tr>
<tr>
<td width='50%'>Vulnerability Assessment/ Triage :</td>
<td width='50%'>$rs1[triage]  </td>
</tr>
<tr>
<td width='50%'>Pain Assessment :</td>
<td width='50%'>$rs[Pain_Assessment]/10   </td>
</tr>
<tr>
<td width='50%'>Pain Location :</td>
<td width='50%'>$rs[Pain_Location]";

if($rs[Pain_Location1]!=='')
{
   echo", $rs[Pain_Location1]"; 
}
if($rs[Pain_Location2]!=='')
{
   echo", $rs[Pain_Location2]"; 
}

if($rs[Pain_Location3]!=='')
{
   echo", $rs[Pain_Location3]"; 
}

if($rs[Pain_Location4]!=='')
{
   echo", $rs[Pain_Location4]"; 
}

if($rs[Pain_Location5]!=='')
{
   echo", $rs[Pain_Location5]"; 
}

echo"  </td>
</tr>
</table>
";
}
}
?>
<?php
	$sql ="SELECT * FROM Vulnerability WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rt = mysqli_fetch_array($qsql))
		{
if(on==$rt[fall_risk])
{
?> 
<h3 align='center'>Fall Risk</h3>

<table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
<?php
  	$sql ="SELECT * FROM Vulnerability WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
if($rs[low_fall_risk] == 'on'){
    echo " <tr><td width='50%'>Low fall risk: </td>
<td width='50%'>Yes</td></tr>";
if($rs[implement_low] == 'on'){
    echo " <tr><td width='50%'>implement low fall risk interventions per protocol: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>implement low fall risk interventions per protocol: </td>
<td width='50%'>No</td></tr>";
}
if($rs[Complete_paralysis] == 'on'){
    echo " <tr><td width='50%'>Complete paralysis or completely immobilized: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Complete paralysis or completely immobilized: </td>
<td width='50%'>No</td></tr>";
}
} 
if($rs[high_fall_risk] == 'on'){
    echo " <tr><td width='50%'>High fall risk: </td>
<td width='50%'>Yes</td></tr>";

if($rs[History_more] == 'on'){
    echo " <tr><td width='50%'>
History of more than one fall within 6 months before admission: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>History of more than one fall within 6 months before admission: </td>
<td width='50%'>No</td></tr>";
}
if($rs[Patient_experienced] == 'on'){
    echo " <tr><td width='50%'>
Patient has experienced a fall during the hospitalization: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Patient has experienced a fall during the hospitalization: </td>
<td width='50%'>No</td></tr>";
}
if($rs[deemed_high] == 'on'){
    echo " <tr><td width='50%'>
Patient is deemed high fall-risk per protocol such as seizure precaution: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Patient is deemed high fall-risk per protocol such as seizure precaution: </td>
<td width='50%'>No</td></tr>";
}
} 


}
?>
<?php
}
}
?>


</table>



<?php
  	$sql ="SELECT * FROM Vulnerability WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
	    $sql1 ="SELECT * FROM site_users WHERE userno='$rs[entered_by]'";
		$qsql1 = mysqli_query($con,$sql1);
		if($rs1 = mysqli_fetch_array($qsql1))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
		 <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
		 <tr><td width=50%><b>By :</b>$rs1[name] </b><td width='50%'><b>At :</b> $rs[updated_at] </tr>";   
		    
		}
		}
		?>
		</table>

            
     
   	
											
										
    <div style="page-break-before:always">&nbsp;</div>
    
</div>					
					
					
				   	</div>
					
					</div>
				
	<!--Vitals-->
<?php }
if($RowActivity['discription']=='Intial Assessment<br>Vitals<br>Doc.no-'){    
		?>	
<div class='col-sm-12'>
          <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>Vitals<br>Doc.no-'";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>Vitals<br>Doc.no-'){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Vitals
 </strong></h4>            
               <br>


<table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>

<?php
  	$sql ="SELECT * FROM Medical_vitals WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo"  
		    <tr><td width='50%'>BMI</td><td  width='50%'>$rs[Bmi]</td></tr>
<tr><td width='50%'>SPo2</td><td  width='50%'>$rs[SPo2]</td></tr>
<tr><td  width='50%'>RBS</td><td  width='50%'>$rs[RBS]</td></tr>
<tr><td  width='50%'>Temperature</td><td  width='50%'>$rs[Temp]</td></tr>
<tr><td  width='50%'>Pulse</td><td  width='50%'>$rs[Pulse]</td></tr>
<tr><td  width='50%'>Blood Pressure:</td><td  width='50%'>$rs[BP2]/$rs[BP]</td></tr>
<br>
    
	";
		}
		?>

</table>
	 <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
<?php
  	$sql ="SELECT * FROM CovidChecklist WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
	    $sql1 ="SELECT * FROM site_users WHERE userno='$rs[entered_by]'";
		$qsql1 = mysqli_query($con,$sql1);
		if($rs1 = mysqli_fetch_array($qsql1))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
	
		 <tr><td width=50%><b>By :</b>$rs1[name] </b><td width='50%'><b>At :</b> $rs[created_at] </tr>";   
		    
		}
		}
		?>
		</table>

            
     
   	</div></div>


</div><div style="page-break-before:always">&nbsp;</div>					
					
<!--Medical Assessment					-->
<?php }
if($RowActivity['discription']=='Intial Assessment<br>Medical Assessment<br>Doc.no-'){    
		?>
<div class='col-sm-12'>
        <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>Medical Assessment<br>Doc.no-'";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>Medical Assessment<br>Doc.no-'){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Medical Assessment
 </strong></h4>            
               <br>


<table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
    
    
    
    
    <?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		   
$usertype=$rs['Fever'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Fever: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Fever_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['smell'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Loss of Smell: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[smell_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Diarrhoea'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Diarrhoea: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Diarrhoea_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Deformity'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Facial Deformity: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Deformity_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Cough'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Cough: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Cough_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Taste'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Loss of Taste: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Taste_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Weakness'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Weakness: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Weakness_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Breathlessness'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Breathlessness: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Breathlessness_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Appetite'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Shivering: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Appetite_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Limbs'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Power Loss in Limbs: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Limbs_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Throat'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Sore Throat : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Throat_note]</td></tr>";
} else{
    echo "";
}
}
?>


<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Vomitting'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Vomitting : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Vomitting_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Slurred_Voice'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Slurred Voice: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Slurred_Voice_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Nausea'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Nausea: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Nausea_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Loss_Appetite'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Loss of Appetite: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Loss_Appetite_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Delusion'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Delusion: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Delusion_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Fits_Anger'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Fits of Anger: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Fits_Anger_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Depression'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Depression: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Depression_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Memory_Loss'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Memory Loss: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Memory_Loss_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Bleeding_Disorder'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Bleeding Disorder: </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Bleeding_Disorder_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Migraine'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Migraine : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Migraine_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Frequent_Urination'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Frequent Urination : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Frequent_Urination_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Swollen_Join'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Swollen Join : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Swollen_Join_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Weight_Gain'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Weight Gain : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Weight_Gain_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['weight_loss'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; weight loss : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[weight_loss_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Body_pain'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Body pain : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Body_pain_note]</td></tr>";
} else{
    echo "";
}
}
?>


<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Physical_Injury'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Physical Injury : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Physical_Injury_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		    $usertype=$rs['Other_Symptoms'];
if($usertype == ''){
    echo " ";
}
else
{
    echo"<tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Other Symptoms : </td>
<td width='33%'>$rs[Other_Symptoms]</td></tr>";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['RED_EYE'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; RED EYE : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[RED_EYE_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Swollen_Eye'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Swollen Eye : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Swollen_Eye_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Conjunctiva'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Conjunctiva : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Conjunctiva_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Itchiness'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Itchiness : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Itchiness_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Dislocated'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Dislocated : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Dislocated_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Blur_Vision'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Blur Vision : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Blur_Vision_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Partial_Blindness'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Partial Blindness : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Partial_Blindness_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Blindness'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Blindness : </td>
<td width='33%'>Yes</td><td width='33%'>$rs[Blindness_note]</td></tr>";
} else{
    echo "";
}
}
?>
</table>
   
	 <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
	    $sql1 ="SELECT * FROM site_users WHERE userno='$rs[entered_by]'";
		$qsql1 = mysqli_query($con,$sql1);
		if($rs1 = mysqli_fetch_array($qsql1))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
	
		 <tr><td width=50%><b>By :</b>$rs1[name] </b><td width='50%'><b>At :</b> $rs[updated_at] </tr>";   
		    
		}
		}
		?>
		</table>


            
     
   	</div></div>

<div style="page-break-before:always">&nbsp;</div>
</div><div style="page-break-before:always">&nbsp;</div>

<!--Nutritional Screening	-->
<?php }
if($RowActivity['discription']=='Intial Assessment<br>Nutritional Screening<br>Doc.no-'){    
		?>
<div class='col-sm-12'>
    
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>Nutritional Screening<br>Doc.no-'";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>Nutritional Screening<br>Doc.no-'){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
        Nutritional Screening
 </strong></h4>            
               <br>


<table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
<?php
  	$sql ="SELECT * FROM Nutritional_Screening WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
if($rs[weight_loss] == 'on'){
    echo " <tr><td width='50%'>Does the patient have any weight loss/ Weight gain?: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Does the patient have any weight loss/ Weight gain?: </td>
<td width='50%'>No</td></tr>";
}
if($rs[BMI] == 'on'){
    echo " <tr><td width='50%'>Does the patient appear emaciated or BMI is Below <18.5 ?: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Does the patient appear emaciated or BMI is Below <18.5 ? : </td>
<td width='50%'>No</td></tr>";
}
if($rs[patient_look] == 'on'){
    echo " <tr><td width='50%'>Does the patient look Obese or BMI is above >30: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Does the patient look Obese or BMI is above >30: </td>
<td width='50%'>No</td></tr>";
}
if($rs[last_2_weeks] == 'on'){
    echo " <tr><td width='50%'>Does the patient have any GL Symptoms like Constipation, Nausea, Diarrhea, Anorexia, Vomiting, chewing/swallowing difficulty affecting oral intake in last 2 weeks: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Does the patient have any GL Symptoms like Constipation, Nausea, Diarrhea, Anorexia, Vomiting, chewing/swallowing difficulty affecting oral intake in last 2 weeks: </td>
<td width='50%'>No</td></tr>";
}
if($rs[enteral_tube] == 'on'){
    echo " <tr><td width='50%'>Does the patient have any enteral tube feeding : </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Does the patient have any enteral tube feeding : </td>
<td width='50%'>No</td></tr>";	
}
if($rs[parenteral_tube] == 'on'){
    echo " <tr><td width='50%'>Does the patient have any parenteral tube feeding: </td>
<td width='50%'>Yes</td></tr>";
} else{
    echo "<tr><td width='50%'>Does the patient have any parenteral tube feeding: </td>
<td width='50%'>No</td></tr>";
}

echo"<tr><td width='50%'>Food Pattern Followed :</td><td width='50%'>$rs[Pattern_Followed]</td></tr>
<tr><td width='50%'>Appetite</td><td width='50%'>$rs[Appetite]</td></tr>";
}
?>

</table>
<table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>

<?php
  	$sql ="SELECT * FROM Nutritional_Screening WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
	    $sql1 ="SELECT * FROM site_users WHERE userno='$rs[entered_by]'";
		$qsql1 = mysqli_query($con,$sql1);
		if($rs1 = mysqli_fetch_array($qsql1))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
		 
		 <tr><td width=50%><b>By :</b>$rs1[name] </b><td width='50%'><b>At :</b> $rs[updated_at] </tr>";   
		    
		}
		}
		?>
		</table>

            
     
   	</div></div>
											
										

<div style="page-break-before:always">&nbsp;</div>
</div>	<div style="page-break-before:always">&nbsp;</div>


					
					
<!--General Consent	-->
<?php }
if($RowActivity['discription']=='Intial Assessment<br>GENERAL CONSENT<br>Doc.no-'){    
		?>
<div class='col-sm-12'>
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>GENERAL CONSENT<br>Doc.no-'";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>GENERAL CONSENT<br>Doc.no-'){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         General Consent
 </strong></h4>            
               <br>
              <table width='100%' border='1' class='table table-bordered table-hover'> 
              <?php
    $sql ="SELECT * FROM GeneralConsent WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo "<tr><td>";

$sql ="SELECT * FROM GeneralConsent WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
while($RowImg=$qsql->fetch_assoc()){
echo "<img width='25%' height='20%' src='https://login.easenup.in/uploads/$RowImg[Upload_Consent]'  style='padding:12px;'>";

}
echo "</td></tr>";}
?>

</table>

<?php
  	$sql ="SELECT towords,updated_at FROM GeneralConsent WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' group by towords";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
	    $sql1 ="SELECT * FROM site_users WHERE userno='$rs[entered_by]'";
		$qsql1 = mysqli_query($con,$sql1);
		if($rs1 = mysqli_fetch_array($qsql1))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
		 <table width='100%' border='1' class='table table-bordered table-hover'>
		 <tr><td width=50%><b>By :</b>$rs1[name] </b><td width='50%'><b>At :</b> $rs[updated_at] </tr>";   
		    
		}
		}
		?>
		</table>
          

            
     
   	</div></div>
											
										
										
	<div style="page-break-before:always">&nbsp;</div>									</div>	<div style="page-break-before:always">&nbsp;</div>
					
	<!--Diagnosis					-->
	<?php }
if($RowActivity['discription']=='Intial Assessment<br>Vitals<br>Doc.no-'){    
		?>
<div class='col-sm-12'>
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";


$sqlpatient = "SELECT * FROM save_activity WHERE  prescriptionid='$_GET[prescriptionid]' AND discription='Intial Assessment<br>Vitals<br>Doc.no-'";
	$qsqlpatient = mysqli_query($con,$sqlpatient);
	if($rsp = mysqli_fetch_array($qsqlpatient))
	{
	    if($rsp[discription]== 'Intial Assessment<br>Vitals<br>Doc.no-'){
	        echo"<b>Doc.no </b>: $rsp[srno]";

} else{
    echo "";
}
       
	}


echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Diagnosis
 </strong></h4>            
               <br>


<!--/////////////////////////////////////////-->

<table id="example2" class="table table-bordered table-hover" style='width:100%;' border='1'>  
      <tbody>
           <?php
		  	$sqlpatient= "SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
			$qsqlpatient = mysqli_query($con,$sqlpatient);
			while($rr=mysqli_fetch_array($qsqlpatient))
			{
				$sqlpatient1= "SELECT * FROM addaspatient WHERE prescriptionid='$rr[prescriptionid]'";
			$qsqlpatient1 = mysqli_query($con,$sqlpatient1);
			while($rr1=mysqli_fetch_array($qsqlpatient1))
			{
			    	$sqlpatient2= "SELECT * FROM Vulnerability WHERE prescriptionid='$rr1[prescriptionid]'";
			$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
			while($rr2=mysqli_fetch_array($qsqlpatient2))
			{
         
       	echo "
		
	           <tr> <td height='62'> Consultant:   </td>
	           <td>";
	           	$sqldoctor= "SELECT * FROM site_users WHERE userno='$rr1[Admitted_Under]'";
			$qsqldoctor = mysqli_query($con,$sqldoctor);
			while($rsdoctor = mysqli_fetch_array($qsqldoctor))
			{
			    echo"
$rsdoctor[name]
";
}
echo"</td></tr>
             <tr> <td height='62'> Reason for Admission:   </td>
	           <td>$rr[Reason_for_Admission]</td></tr>
     
            <tr><td height='62'> Vulnerability/Triage Assessment:    </td>
                  <td>$rr1[triage]</td>
				  </tr>
				   ";
          	}}
			}
		  ?>
		  <tr><td width='50%'>	Covid 19 Checklist: </td>
		  
		  
		  	<?php 


		$DisplayForm=True;
$sql7 ="SELECT * FROM 	CovidChecklist WHERE  prescriptionid='$_GET[prescriptionid]'";
$qsql7 = mysqli_query($con,$sql7);
if($rs7 = mysqli_fetch_array($qsql7))
{
    $DisplayForm=False;
echo "";
}
if(!$DisplayForm)
{
echo "
<td width='50%'><DIV class='button' data-modal='modalOne'> <span style='color:blue;align:center;font-size: 14px'>Filled</span></DIV></td>";
} else{
    echo "<td width='50%'>Not Applicable</td>";
}
?>
			</tr>
			 <tr><td width='50%'>MLC: </td>
		  
		  
	<?php 


		$DisplayForm=True;
$sql7 ="SELECT * FROM 	mlc WHERE  prescriptionid='$_GET[prescriptionid]'";
$qsql7 = mysqli_query($con,$sql7);
if($rs7 = mysqli_fetch_array($qsql7))
{
    $DisplayForm=False;
echo "";
}
if(!$DisplayForm)
{
echo "
<td width='50%'><DIV class='button' data-modal='modalmlc'> <span style='color:blue;align:center;font-size: 14px'>Filled</span></DIV></td>";
} else{
    echo "<td width='50%'>Not Applicable</td>";
}
?>
			</tr>
			
			
			
		  <tr><td width='50%'>Trauma: </td>
		  
		  
	<?php 


		$DisplayForm=True;
$sql7 ="SELECT * FROM 	trauma_checklist WHERE  prescriptionid='$_GET[prescriptionid]'";
$qsql7 = mysqli_query($con,$sql7);
if($rs7 = mysqli_fetch_array($qsql7))
{
    $DisplayForm=False;
echo "";
}
if(!$DisplayForm)
{
echo "
<td width='50%'><DIV class='button' data-modal='modaltrauma'> <span style='color:blue;align:center;font-size: 14px'>Filled</span></DIV></td>";
} else{
    echo "<td width='50%'>Not Applicable</td>";
}
?>
			</tr>

		
						
		  </tbody>
    </table>
		<br>
          
          <table id="example2" class="table table-bordered table-hover" style='width:100%;' border='1'>
                 
                 
<tr><th>Medical Assessment </th><th>Status</th></tr>

			 <?php
		$sql ="SELECT * FROM medi_condition_final WHERE patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
            echo " <tbody>
                                                                                                                                                                
     <tr>   <td>&nbsp;$rs[medicalcon]  &nbsp; <b>$rs[Specify]</b></td>     
            <td>&nbsp;$rs[Status]</td>
		  </tr>                   
          
          ";
}
?>        </table>

 

        <?php
    $sql3 ="SELECT * FROM Medical_surgical WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql3 = mysqli_query($con,$sql3);
		if($rs2 = mysqli_fetch_array($qsql3))
				{
if(on==$rs2[Addiction])
{
?>

<h3 align='center'>Addiction </h3>
<table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
	<tr>	<?php
$sql ="SELECT * FROM Medical_surgical WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		   
$usertype=$rs['Tobacco'];
if($usertype == 'on'){
    echo "<td width='50%'>Tobacco: </td>
<td width='50%'> <i class='fa fa-check' aria-hidden='true'></i></td>";
} else{
    echo "<td width='50%'>Tobacco: </td><td width='50%'> <i class='fa fa-times' aria-hidden='true'></i></td>";
}
}
?> 
</tr>
<tr>
		<?php
$sql ="SELECT * FROM Medical_surgical WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		   
$usertype=$rs['Alcohol'];
if($usertype == 'on'){
    echo "<td width='50%'>Alcohol: </td>
<td width='50%'> <i class='fa fa-check' aria-hidden='true'></i></td>";
} else{
    echo "<td width='50%'>Alcohol: </td><td width='50%'> <i class='fa fa-times' aria-hidden='true'></i></td>";
}
}
?>
</tr>
<tr>
		<?php
$sql ="SELECT * FROM Medical_surgical WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		   
$usertype=$rs['Smoking'];
if($usertype == 'on'){
    echo "<td width='50%'>Smoking: </td>
<td width='50%'> <i class='fa fa-check' aria-hidden='true'></i></td>";
} else{
    echo "<td width='50%'>Smoking: </td><td width='50%'> <i class='fa fa-times' aria-hidden='true'></i></td>";
}
}
?>
</tr>

	
		 	  <?php
}
}
?>


  <table id="example2" class="table table-bordered table-hover" style='width:100%;' border='1'>
                 
                   	
                  <?php
		  	$sqlpatient2= "SELECT * FROM Vulnerability WHERE prescriptionid='$_GET[prescriptionid]'";
			$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
			while($rtv=mysqli_fetch_array($qsqlpatient2))
			{
			echo" 	    
         
           <tr><td height='62'>Level of Consciousness :  </td>
          <td>$rtv[Level_Consciousness]</td>
        </tr>
          <tr><td height='62'>Dependency:  </td>
          <td>$rtv[Dependency]</td>
        </tr>
         <tr><td height='62'>Mode of movement:  </td>
          <td>$rtv[Modn]</td>
        </tr>
          <tr><td height='62'>Pain Assessment:  </td>
          <td>$rtv[Pain_Assessment]</td>
        </tr>
           <tr><td height='62'>Pain Location:  </td>
          <td>$rtv[Pain_Location]</td>
        </tr>
        ";
			}
			?>
			<tr>
			<?php
$sql ="SELECT * FROM Vulnerability WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		   
$usertype=$rs['fall_risk'];
if($usertype == 'on'){
    echo "<td width='50%'>Fall Risk: </td>
<td width='50%'> <i class='fa fa-check' aria-hidden='true'></i></td>";
} else{
    echo "<td width='50%'>Fall Risk: </td><td width='50%'> <i class='fa fa-times' aria-hidden='true'></i></td>";
}
}
?>
</tr>

		
		  <tr><td width='50%'>Nutritional Screening : </td>
		  
		  
	<?php 


		$DisplayForm=True;
$sql7 ="SELECT * FROM 	Nutritional_Screening WHERE  prescriptionid='$_GET[prescriptionid]'";
$qsql7 = mysqli_query($con,$sql7);
if($rs7 = mysqli_fetch_array($qsql7))
{
    $DisplayForm=False;
echo "";
}
if(!$DisplayForm)
{
echo "
<td width='50%'><a href='link' style='color:blue'>Available</a></td>";
} else{
    echo "<td width='50%'>Unavailable</td>";
}
?>
			</tr>
        </table>
      
        </br></br>
        
         
        <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
   
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		   
$usertype=$rs['Fever'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Fever: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Fever_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['smell'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Loss of Smell: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[smell_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Diarrhoea'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Diarrhoea: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Diarrhoea_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Deformity'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Facial Deformity: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Deformity_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Cough'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Cough: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Cough_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Taste'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Loss of Taste: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Taste_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Weakness'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Weakness: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Weakness_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Breathlessness'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Breathlessness: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Breathlessness_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Appetite'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Shivering: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Appetite_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Limbs'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Power Loss in Limbs: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Limbs_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Throat'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Sore Throat : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Throat_note]</td></tr>";
} else{
    echo "";
}
}
?>


<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Vomitting'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Vomitting : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Vomitting_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Slurred_Voice'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Slurred Voice: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Slurred_Voice_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Nausea'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Nausea: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Nausea_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Loss_Appetite'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Loss of Appetite: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Loss_Appetite_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Delusion'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Delusion: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Delusion_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Fits_Anger'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Fits of Anger: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Fits_Anger_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Depression'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Depression: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Depression_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Memory_Loss'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Memory Loss: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Memory_Loss_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Bleeding_Disorder'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Bleeding Disorder: </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Bleeding_Disorder_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Migraine'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Migraine : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Migraine_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Frequent_Urination'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Frequent Urination : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Frequent_Urination_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Swollen_Join'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Swollen Join : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Swollen_Join_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Weight_Gain'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Weight Gain : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Weight_Gain_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['weight_loss'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; weight loss : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[weight_loss_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Body_pain'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Body pain : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Body_pain_note]</td></tr>";
} else{
    echo "";
}
}
?>


<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Physical_Injury'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Physical Injury : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Physical_Injury_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Other Symptoms : </td>
<td width='33%'>$rs[Other_Symptoms]</td></tr>";
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['RED_EYE'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; RED EYE : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[RED_EYE_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Swollen_Eye'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Swollen Eye : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Swollen_Eye_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Conjuctiva'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Conjuctiva : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Conjuctiva_note]</td></tr>";
} else{
    echo "";
}
}
?>
<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Itchiness'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Itchiness : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Itchiness_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Dislocated'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Dislocated : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Dislocated_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Blur_Vision'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; 	Blur Vision : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Blur_Vision_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Partial_Blindness'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Partial Blindness : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Partial_Blindness_note]</td></tr>";
} else{
    echo "";
}
}
?>

<?php
  	$sql ="SELECT * FROM Medical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
$usertype=$rs['Blindness'];
if($usertype == 'on'){
    echo " <tr><td width='33%'>&nbsp;  &nbsp; &nbsp; &nbsp; Blindness : </td>
<td width='33%'><i class='fa fa-check' aria-hidden='true'></i></td><td width='33%'>$rs[Blindness_note]</td></tr>";
} else{
    echo "";
}
}
?>

</table>

      <?php

$sql ="SELECT * FROM addaspatient WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
if((Eye_Care!==$rs[casetype]) || ('Eye_Care'==$rs[casetype]))
{
?> 
<?php
  	$sql ="SELECT * FROM opdslip WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo"  <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
		     <tr><td width='50%'>Significant findings : </td>
<td width='50%'>$rs[significate]</td></tr>
		      <tr><td>Nutritional diagnosis</td><td>$rs[Nutritional_Diagnosis]</td></tr>";
    	$sqlpatient1 = "SELECT * FROM list_tretment WHERE trid=$rs[tratment]";
	$qsqlpatient1 = mysqli_query($con,$sqlpatient1);
	while($rsn = mysqli_fetch_array($qsqlpatient1))
	{
	    echo " <tr>  <td>Proposed Surgery:</td>
                    <td>$rsn[tratment]</td></tr>";
				}

		}
		?>
		<?php
}
}
?>
		</table>
 <?php

$sql ="SELECT * FROM addaspatient WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
if(Eye_Care==$rs[casetype])
{
?>



<table id="example2" class="table table-bordered table-hover" style='width:100%;' border='1'>
    <tr><th>Provisional diagnosis</th>
<th>Eye</th>
<th>Note</th>


</tr>
 <tr> 
    <?php
		$sql ="SELECT * FROM opdslip WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
            echo " 
  
      <td>&nbsp;$rs[Admission_diagnosis] <b>$rs[other_Admission_diagnosis]</td>  
         <td>&nbsp;$rs[eyetype] </td>
           <td>&nbsp;$rs[note] </td>


          ";
}
}
}
?>  
</tr>
</table>

<!--////////////////////////////////////////-->

            
     
   	</div></div>
											
										
				<div style="page-break-before:always">&nbsp;</div>						
										</div>	<div style="page-break-before:always">&nbsp;</div>
										
	<!--INVESTIGATION									-->
	<?php }  ?>
	

<!--///////////////////////	-->
<?php
if($RowActivity['discription']=='Intial Assessment<br>Admission Consent<br>Doc.no-'){	
     ?>
<div id="col-sm-12">
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";



	        echo"<b>Doc.no </b>: $_GET[srno]";




echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Admission Consent
 </strong></h4>            
               <br>


        
     <?php
    $sql ="SELECT * FROM AdmissionConsent WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo "

 <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
 <tr><td></td><td><a href=''>Edit</a></td></tr>
<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; Towords : </td><td>$rs[towords]</td></tr>
<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; Admission Consent Copy : </td>
<td width='50%'>";
echo "<div class='row'><div class='col-sm-12'>
 
</div></div>";
    echo"<div class='row'>";
    $AdmissionConsent=$con->query("SELECT * FROM AdmissionConsent WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'");
    while($GC=$AdmissionConsent->fetch_assoc()){
   echo "<div class='col-sm-3'>
   <a target='_blank' href='../../uploads/$GC[Upload_Consent]'><image src='../../uploads/$GC[Upload_Consent]' alt='img' class='img-thumbnail' style='width:150px; height:150px;'></a>
   
 
   
 
   
   
   </div>";

}
echo"</td><td></td>
</tr>
</table>
";
}
?>       
 

<?php
  	$sql ="SELECT * FROM mlc WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
	    $site_users ="SELECT * FROM site_users WHERE userno='$rs[entered_by]'";
		$qsite_users = mysqli_query($con,$site_users);
		if($rsite_users = mysqli_fetch_array($qsite_users))
		{
		    
		 echo"<h5><b> Created & Updated </b><h5>
		 <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>
		 <tr><td width=50%><b>By :</b>$rsite_users[name] </b><td width='50%'><b>At :</b> $rsite_users[updated_at] </tr>";   
		    
		}
		}
		?>
		</table>

            
     
   	</div></div>
											
										</div>	<div style="page-break-before:always">&nbsp;</div>
<?php } ?>	


<?php
if($RowActivity['discription']=='Nursing Assessment<br>Vitals<br>Doc.no-'){	
     ?>
<div id="col-sm-12">
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";



	        echo"<b>Doc.no </b>: $_GET[srno]";




echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Vitals Final (IPD)
 </strong></h4>            
               <br>


        
    <table width='100%' border='1' class='table table-bordered table-hover' style='width:100%;' border='1'>

<?php
  	$sql ="SELECT * FROM vitals_final WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
		    echo" 
		    <tr><td width='50%'>BMI</td><td  width='50%'>$rs[Bmi]</td></tr>
<tr><td width='50%'>SPo2</td><td  width='50%'>$rs[SPo2]</td></tr>
<tr><td  width='50%'>RBS</td><td  width='50%'>$rs[RBS]</td></tr>
<tr><td  width='50%'>Temperature</td><td  width='50%'>$rs[Temp]</td></tr>
<tr><td  width='50%'>Pulse</td><td  width='50%'>$rs[Pulse]</td></tr>
<tr><td  width='50%'>Blood Pressure:</td><td  width='50%'>$rs[BP2]/$rs[BP]</td></tr>

    
	";
		}
		?>

</table>
 
            
     
   	</div></div>
											
										</div><div style="page-break-before:always">&nbsp;</div>	
<?php } ?>


<?php
if($RowActivity['discription']=='Nursing Assessment<br>Input & Output Timeline<br>Doc.no-'){	
     ?>
<div id="col-sm-12">
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";



	        echo"<b>Doc.no </b>: $_GET[srno]";




echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Input & Output Timeline
 </strong></h4>            
               <br>


        
  	<table id="example2" class="table table-bordered table-hover" style='width:100%;' border='1'> 
   
   	<?php
$sql ="SELECT * FROM output_patient WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]'";
$qsql = mysqli_query($con,$sql);
while($rs1 = mysqli_fetch_array($qsql))
{
     echo " <tbody>
            <tr> <td>Date and time :</td>  <td>&nbsp;$rs1[output_datetime]</td> </tr>
              		<tr><td>Intake : </td> <td>$rs1[Intake]</td></tr>
              		<tr><td>Amount : </td> <td>$rs1[Amount]</td></tr>
              		<tr><td>Output : </td><td>$rs1[Output]</td></tr>
              		<tr><td>Amount : </td><td>$rs1[output_Amount]</td>          </tr>                   
          
          ";
}

?> 
   	</table>
 
            
     
   	</div></div>
											
										</div>	<div style="page-break-before:always">&nbsp;</div>
<?php } ?>


<?php
if($RowActivity['discription']=='Pre-Assessment Sheet<br>Routine Information<br>Doc.no-'){	
     ?>
<div id="col-sm-12">
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";



	        echo"<b>Doc.no </b>: $_GET[srno]";




echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Handover
 </strong></h4>            
               <br>


        
  <table width='100%' border='1' class='table table-bordered table-hover'>
<?php 

		$sql ="SELECT * FROM Routine_Information WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		    echo "
 <tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; Operative Type: </td>
<td width='50%'>$rs[Information_Obtained_from]</td>
</tr>

<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  Date of Operative procedure :  </td>
<td width='50%'>$rs[Date_of_Operative_procedure]</td>
</tr>

<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  Time of Operative procedure :  </td>
<td width='50%'>$rs[Time_of_Operative_procedure]</td>
</tr>

<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  Name of Surgeon :  </td>
<td width='50%'>$rs[name_Surgeon]</td>
</tr>


<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  Name of Anesthetist :  </td>
<td width='50%'>$rs[Name_of_Anesthetist]</td>
</tr>

<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  Pre-Operative Diagnosis :  </td>
<td width='50%'>$rs[Pre_Operative_Diagnosis]</td>
</tr>






<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  Time Duration of Surgery  :  </td>
<td width='50%'>$rs[Duration_Surgery]</td>
</tr>



<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  WRITTEN CONSENT  :  </td>
<td width='50%'>$rs[WRITTEN_CONSENT]</td>
</tr>

";
}

?>

				</table>
 
            
     
   	</div></div>
			</div><div style="page-break-before:always">&nbsp;</div>								
									
<?php } ?>




<?php
if($RowActivity['discription']=='Pre-Assessment Sheet<br>Routine Information<br>Doc.no-'){	
     ?>
<div id="col-sm-12">
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";



	        echo"<b>Doc.no </b>: $_GET[srno]";




echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
         Surgery Team
 </strong></h4>            
               <br>


        
  <table id="example2" class="table table-bordered table-hover">
                  <thead>
                  <tr>
                   
      
         <th><strong>Surgery Team</strong></th>
     
                </tr>
                  </thead>
                 
<?php

		$sql ="SELECT * FROM surury_team WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		    $sql1 ="SELECT * FROM site_users WHERE userno='$rs[team]'";
		$qsql1 = mysqli_query($con,$sql1);
		while($rs1 = mysqli_fetch_array($qsql1))
		    {
            echo " <tbody>
<tr>   <td>&nbsp;$rs1[name]</td> 

    </tr>                   
          
          ";
		    }
}
?>          </tr>
                  </thead>
                  


                   </tbody>
  <tfoot>
          </tfoot>
        </table>    
            
     
   	</div>
											
		</div></div>	<div style="page-break-before:always">&nbsp;</div>						
<?php } ?>


<?php
if($RowActivity['discription']=='Pre-Assessment Sheet<br>Systemic Examination<br>Doc.no-'){	
     ?>
<div id="col-sm-12">
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";



	        echo"<b>Doc.no </b>: $_GET[srno]";




echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
        Systemic Examination
 </strong></h4>            
               <br>


        
   <table width='100%' border='1' class='table table-bordered table-hover'>
<?php 
		$sql ="SELECT * FROM Systemic_Examination WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		    echo "
 
<table width='100%' border='1' class='table table-bordered table-hover' border='1' width='100%'>
        
        <th></th>
            <th>Action</th>
        <th>Note</th>
        <tr>
            <td width='20%'>HISTORY OF  Any Systemic Disease</td>
             <td width='20%'>$rs[Systemic_Disease]</td>
             <td width='60%'>$rs[Systemic_Disease_note]</td>
        </tr>
         <tr>
            <td width='20%'>HISTORY OF  Anesthesia Events</td>
             <td width='20%'>$rs[Anesthesia_Events]</td>
             <td width='60%'>$rs[Anesthesia_Events_note]</td>
        </tr>
   <tr>
            <td width='20%'>HISTORY OF  Operations/SURGERY
</td>
             <td width='20%'>$rs[ho_Operations]</td>
             <td width='60%'>$rs[ho_Operations_note]</td>
        </tr>  
  <tr>
      <tr>
            <td width='20%'>HISTORY OF  Adverse Drugs Reaction
</td>
             <td width='20%'>$rs[Adverse_Drugs_Reaction]</td>
             <td width='60%'>$rs[Adverse_Drugs_Reaction_note]</td>
        </tr>  
  <tr>
            <td width='20%'>HISTORY OF  DRUG THERAPY

</td>
             <td width='20%'>$rs[DRUG_THERAPY]</td>
             <td width='60%'>$rs[DRUG_THERAPY_note]</td>
        </tr>  

        </table>
        
        
        <table width='100%' border='1' class='table table-bordered table-hover'> 
  <div class='center'>
      <h5 align='center'>SYSTEMIC EXAMINATION </h5>
        <h6>CARDIAO VASCULAR SYSTEM: RESPIRATORY SYSTEM: </h6>
      <tr><td><span style='font-size: 20px'>HISTORY OF CHEST PAIN 
</span></h3></td><td>";
if($rs[HISTORY_CHEST_PAIN] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"</td>";
echo"
<td><span style='font-size: 20px'>HISTORY OF PALPITATION </span></h3></td><td>";
if($rs[HISTORY_PALPITATION] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
  echo"
</td> </tr>";
echo"<tr>
<td><span style='font-size: 20px'>HISTORY OF HYPERTENTION 
</span></h3></td><td>";
if($rs[HISTORY_HYPERTENTION] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"
<td><span style='font-size: 20px'>S1 &S2 </span></h3></td><td>$rs[S1_S2]
</td>
</tr>
<tr>
<td><span style='font-size: 20px'>MURMUR </span></h3></td><td>$rs[MURMUR]
</td>
<td><span style='font-size: 20px'>ECG REPORT</span></h3></td><td>$rs[ECG_REPORT]
</td>
</tr>
<tr>
<td><span style='font-size: 20px'>B/L  AIR ENTER IN LUNGS </span></h3></td><td>";
if($rs[ENTER_LUNGS] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
<td><span style='font-size: 20px'>CREPITATIONS / WHEEZ 
</span></h3></td><td>";
if($rs[CREPITATIONS_WHEEZ] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr> 
<tr>
<td><span style='font-size: 20px'>HISTORY OF COUGH / BRONCHISOSM  </span></h3></td><td>";
if($rs[HISTORY_COUGH] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
<td><span style='font-size: 20px'>HISTORY OF BRONCHIAL ANTHMA 
</span></h3></td><td>";
if($rs[HISTORY_BRONCHIAL] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr> 
<tr>
<td><span style='font-size: 20px'>HISTORY OF REPAIRATORY DISEASES </span></h3></td><td>";


if($rs[HISTORY_REPAIRATORY] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}echo"
</td>
<td><span style='font-size: 20px'>PULMONARY FUNCTION TEST 
</span></td><td>$rs[PULMONARY_TEST]
</td>
</tr>       
          </div>      
          
          
</table>

<table width='100%' border='1' class='table table-bordered table-hover'> 
      <p><tr><td><span style='font-size: 15px'>CENTRAL NERVOUS SYSTEM            </span> </td></tr></p>
      </table>
        <table width='100%' border='1' class='table table-bordered table-hover'> 
      <tr><td><span style='font-size: 20px'>HISTORY OF CONVULSION / FITS 
</span></h3></td><td>";

if($rs[HISTORY_CONVULSION] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
<td><span style='font-size: 20px'>HISTORY OF TREMOR </span></h3></td><td>";
if($rs[HISTORY_TREMOR] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr>  

<tr><td><span style='font-size: 20px'>HISTORY OF  GI BLEEDING 
</span></h3></td><td>";

if($rs[HISTORY_GI_BLEEDING] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}echo"
</td>
<td><span style='font-size: 20px'>HISTORY OF ANY NEUROLOGICAL DISEASE </span></h3></td><td>";


if($rs[NEUROLOGICAL_DISEASE] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}echo"
</td>
</tr>  
</table>
<table width='100%' border='1' class='table table-bordered table-hover'> 
      <p><tr><td><span style='font-size: 15px'>GASTRO INTESTINAL SYSTEM           </span> </td></tr></p>
      </table>
        <table width='100%' border='1' class='table table-bordered table-hover'> 
<tr><td><span style='font-size: 20px'>H/O/ACIDITY / HEART BURN
</span></h3></td><td>";
if($rs[HEART_BURN] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}

echo"
</td>
<td><span style='font-size: 20px'>HISTORY OF ANY OTHER DISEASE 
</span></h3></td><td>";
if($rs[OTHER_DISEASE] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr> 
    <tr>
<td><span style='font-size: 20px'>LIVER FUNCTION TEST  </span></h3></td><td>$rs[LIVER_FUNCTION_TEST]
</td>

</tr>   
</table>
<table width='100%' border='1' class='table table-bordered table-hover'> 
      <p><tr><td><span style='font-size: 15px'>   ENDOCRINE SYSTEM </span> </td></tr></p>
      </table>
  <table width='100%' border='1' class='table table-bordered table-hover'> 
      <tr><td><span style='font-size: 20px'>HISTORY OF  DM 
</span></h3></td><td>";
if($rs[HISTORY_DM] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
<td><span style='font-size: 20px'>HISTORY OF HYPER / HYPO THYROIDISM 
</span></h3></td><td>";
if($rs[HISTORY_HYPER] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr>
<tr><td><span style='font-size: 20px'>HISTORY OF ANY OTHER HARMONAL ABNORMALITY 
</span></h3></td><td>";


if($rs[HARMONAL_ABNORMALITY] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}echo"
</td>
</tr>
</table>
<table width='100%' border='1' class='table table-bordered table-hover'> 
      <p><tr><td><span style='font-size: 15px'>   GENITO URINARY SYSTEM </span> </td></tr></p>
      </table>
  <table width='100%' border='1' class='table table-bordered table-hover'> 
  <tr><td><span style='font-size: 20px'>HISTORY OF HAEMATURIA</span></h3></td><td>";
  if($rs[HISTORY_HAEMATURIA] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}
  echo"
</td>
<td><span style='font-size: 20px'>HISTORY OF UTI  </span></h3></td><td>";
 if($rs[HISTORY_UTI] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}

echo"
</td>
</tr>  
<tr>
<td><span style='font-size: 20px'>HISTORY OF STD 
</span></h3></td><td>";
 if($rs[HISTORY_STD] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}

echo"
</td>
<td><span style='font-size: 20px'>HISTORY OF RENAL PROBLEM 
</span></h3></td><td>";

if($rs[RENAL_PROBLEM] == 'on'){
    echo "<i style='font-size: 20px' class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i  style='font-size: 20px' class='fa fa-times' aria-hidden='true'></i>";
}echo"
</td>
</tr>


";
}
?>

				</table>             
     
   	</div>
											
		</div></div>	<div style="page-break-before:always">&nbsp;</div>						
<?php } ?>


<?php
if($RowActivity['discription']=='Pre-Assessment Sheet<br>Routine Examination<br>Doc.no-'){	
     ?>
<div id="col-sm-12">
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";



	        echo"<b>Doc.no </b>: $_GET[srno]";




echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
        Routine Examination
 </strong></h4>            
               <br>


        
  <table width='100%' border='1' class='table table-bordered table-hover'>
        
        <?php 
		$sql ="SELECT * FROM Pre_Operative_Assessment_Sheet WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		    echo"
	<tr>
    <td width='25%'>Cough</td><td width='25%'>";
    if($rs[Cough] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
    echo"
    </td>
    
     <td width='25%'>Wheezing</td>
    <td width='25%'> ";
    if($rs[Wheezing] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
    echo"
    </td>
    </tr>
       <tr>
        <td width='25%'> Liver Problem/Jaundice</td> <td width='25%'>";   
        if($rs[Liverproblem] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
        echo" 
     <td width='25%'> Tuberculosis</td>  <td width='25%'>";
           if($rs[Previous_Operation] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"</td>
     </tr>
     <tr>
     ";
echo"
     <td width='25%'> Headache/Migraine</span></td><td width='25%'>";
               if($rs[Migraine] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"     <td width='25%'> Bleeding Disorder</span></td> <td width='25%'> ";
 if($rs[Bleeding_Disorder] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
     echo "  </tr> 
         <tr>
    ";

          
echo"
       </tr> 
          <tr>
     <td width='25%'> SOB</span></td><td width='25%'>";
               if($rs[SOB] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"</td>
     <td width='25%'> Palpitation</span></td><td width='25%'>";
               if($rs[Palpitation] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
       </tr> 
         <tr>
     <td width='25%'> CAD/PTCA/CABG/Chest Pain</span></td><td width='25%'>";
               if($rs[Chest_Pain] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
     <td width='25%'> Renal Disease</span></td><td width='25%'>";
               if($rs[Renal_Disease] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
       </tr> 
           <tr>
     <td width='25%'> Allergies: Drug/Food</span></td><td width='25%'>";
               if($rs[Allergies] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
     <td width='25%'> Previous Admission</span></td><td width='25%'>";
               if($rs[Previous_Admission] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
       </tr> 
        <tr>
     ";
echo"
     <td width='25%'>Seizures/Fainting/Syncope</span></td><td width='25%'>";
               if($rs[Seizures] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
       </tr> 
          <tr>
     <td width='25%'>Recent URI/Fever</td><td width='25%'>";
               if($rs[Fever] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
     <td width='25%'> Previous Anesthesia& Problem</span></td><td width='25%'>";
               if($rs[Anesthesia_Problem] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
       </tr> 
        <tr>
     <td width='25%'> Frequent Urination</td><td width='25%'>";
               if($rs[Urination] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
     <td width='25%'> Back/Neck Pain</span></td><td width='25%'>";
               if($rs[Back_Neck_Pain] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
       </tr> 
        <tr>
     <td width='25%'>Arthritis/Painful/Swollen Join</td><td width='25%'>";
               if($rs[Arthritis] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
     <td width='25%'>  Blackouts/Loss of Consciousness</span></td><td width='25%'>";
               if($rs[Blackouts] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
       </tr> 
 <tr>
     <td width='25%'> Abnormality of Nerve of Muscie</td><td width='25%'>";
               if($rs[Muscie] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}

echo"
       </tr>   
       <tr>
     <td width='25%'>Indigestion/Acid reflux/Heartburn/Hiatus hernia	</td><td width='25%'>";
               if($rs[hernia] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
     <td width='25%'>	Weight Loss/Gain	</td><td width='25%'>";
               if($rs[Weight_Loss_Gain] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
       </tr>  
       
         <tr>
     <td width='25%'>Contact Lens/Pacemaker/Hearing Aid	</td><td width='25%'>";
               if($rs[Pacemaker] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
     <td width='25%'> Artificial Joint/Plates	</td><td width='25%'>";
               if($rs[Artificial] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
       </tr>  
    </table>
    <table width='100%' border='1' class='table table-bordered table-hover' border='1' width='100%'>
        
        <th></th>
            <th>Unknown</th>

     
   <tr>
            <td width='20%'>Loose Tooth/Dentures
Upper
</td>
             <td width='20%'>$rs[Dentures_status]
     </td>
             
        </tr>  
  <tr>
            <td width='20%'>Loose Tooth/Dentures
lower

</td>
             <td width='20%'>$rs[Dentures_status_lower]
      </td>
             
        </tr>  
<tr>
            <td width='20%'>Mouth Opening

</td>
             <td width='20%'>$rs[Mouth_Opening_note]
      </td>
             
        </tr> 
          <tr>
            <td width='20%'>Neck 

</td>
             <td width='20%'>$rs[Neck]
     </td>
            
        </tr>  
        <tr>
            <td width='20%'>Neck Mobility

</td>
             <td width='20%'>$rs[Neck_Mobility]
  </td>
            
        </tr>  
 <tr>
            <td width='20%'>Venous Access

</td>
             <td width='20%'>$rs[Venous_Access]
      </td>
            
        </tr>  
<tr>
            <td width='20%'>Nervous System

</td>
             <td width='20%'>$rs[Nervous_System]
      </td>
             
        </tr>  
<tr>
            <td width='20%'>Abdomen

</td>
             <td width='20%'>$rs[Abdomen_System]
     </td>
           
        </tr> 
<tr>
            <td width='20%'>Intubation Difficulty

</td>
             <td width='20%'>$rs[Intubation_Difficulty]
      </td>
            
        </tr>  
<tr>
            <td width='20%'>Special Anesthesia Problems

</td>
             <td width='20%'>$rs[Special_Anesthesia_Problems]
      </td>
           
        </tr> 
        </table>
      <table width='100%' border='1' class='table table-bordered table-hover' border='1' width='100%'>
       
</table>

<table width='100%' border='1' class='table table-bordered table-hover'> 
        <tr><td><span>PALLOR </span></h3></td><td>";
             if($rs[PALLOR] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr>
<tr>
<td><span>ICTERUS</span></h3></td><td>";
             if($rs[ICTERUS] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr>
    <tr><td><span>CYANOSIS </span></h3></td><td>";
             if($rs[CYANOSIS] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr>
 <tr><td><span>LYMPHNODES </span></h3></td><td>";
             if($rs[LYMPHNODES] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr>
<tr>
<td><span>JVP  RAISED   </span></h3></td><td>";
             if($rs[JVP_RAISED] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr>
<tr>
<td><span>T.M.JOINT</span></h3></td><td>";
             if($rs[TM_JOINT] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr>
<tr>
<td><span>DENTAL ABOUT REACTION </span></h3></td><td>";
             if($rs[DENTAL_REACTION] == 'on'){
    echo "<i class='fa fa-check' aria-hidden='true'></i>";
} else{
    echo "<i class='fa fa-times' aria-hidden='true'></i>";
}
echo"
</td>
</tr>
";
}
?>
</table>    
         
     
   	</div>
											
		</div></div><div style="page-break-before:always">&nbsp;</div>							
<?php } ?>



<?php
if($RowActivity['discription']=='Pre-Assessment Sheet<br>Pre Anesthesia evaluation<br>Doc.no-'){	
     ?>
<div id="col-sm-12">
      <div class="container">
        <div class="row">
            <div class="col-sm-12">
                
                
                <table class="table" style="width:100%;">
                    <tr>
                        
                      <td>
        
        <img style="float:left;width:auto;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/>
        
        
        </td>   
                        
                        
                    <td>
                       
                       
        <span style="font-size:18px; float:right;">
             <h4><b><?php echo $ra['hsname'] ?></b></h4>
        <?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br>
        <?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p>
        
        </span></td>
    
    
   </tr>
        
        
        
        </table>
        
        
        </div>
        
        </div>
        </div>
    <hr>
						
             	 <?php

      

	    	$sqlpatient2 = "SELECT * FROM site_users WHERE userno='$rpatient[Admitted_Under]'";
	$qsqlpatient2 = mysqli_query($con,$sqlpatient2);
	if($rsn2 = mysqli_fetch_array($qsqlpatient2))
	{
	    echo"
<div class='checkbox'><span style='float: left;'><b>Admission On  :</b> $rpatient[created_at]<br>
<b>Consultant :</b>$rsn2[name]($rpatient[casetype])

</span>

<span style='float: right;'><B>File No.</B> :$rpatient[prescriptionid] <br>";



	        echo"<b>Doc.no </b>: $_GET[srno]";




echo "</span></div><br>



<br><br>
<div class='checkbox'><span style='float: left;'><b>UHID :</b> $rspi1[patientid]</span><span style='float: right;'><b>Name</b> :$rspi1[patientname]</span></div>
     <br>
     <div class='checkbox'><span style='float: left;'><b>Age:</b> $rspi1[dob]</span><span style='float: right;'><b>SEX :</b>$rspi1[gendor]</span></div>
              <div class='card-body'>
             
      
      ";
	}


	?> 
      <br>   
             
 <div class="panel panel-primary">
               
    <div class="panel-body">
      <h4 class="text-on-pannel text-primary"><strong class="text-uppercase">
        Pre Anesthesia evaluation
 </strong></h4>            
               <br>

 <table width='100%' border='1' class='table table-bordered table-hover'>
<?php 
		$sql ="SELECT * FROM Physical_Assessment WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		while($rs = mysqli_fetch_array($qsql))
		{
		    echo "
 <tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp; XYLOCAINE SENSITIVITY: </td>
<td width='50%'>$rs[XYLOCAINE_SENSITIVITY]</td>
</tr>

<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  Food Intake  :  </td>
<td width='50%'>$rs[Food_Intake]</td>
</tr>

<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  PHYSICAL STATUS  :  </td>
<td width='50%'>$rs[PHYSICAL_STATUS]</td>
</tr>

<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  MALLAMPATI SCORE :  </td>
<td width='50%'>$rs[Mallampati_Score]</td>
</tr>


<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  Thyromental Distance :  </td>
<td width='50%'>$rs[Thyromental_Distance]</td>
</tr>

<tr>
<td width='50%'>&nbsp;  &nbsp; &nbsp; &nbsp;  Metabolic Score :  </td>
<td width='50%'>$rs[Metabolic_Score]</td>
</tr>



";
}
?>

				</table>  
 
        
      
     
   	</div>
											
		</div></div>	<div style="page-break-before:always">&nbsp;</div>						
<?php } ?>





<?php } ?>  	

</div></div></div></div></div></div></div>
			</div></div></div></div></div></div></div></div></div></div></div></div>	</div></div></div></div></div>	
				
						    <!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->

			<?php include('../includes/footer.php'); ?>

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->
		<script src="../assets/js/jquery-2.1.4.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
<script src="../assets/js/jquery-1.11.3.min.js"></script>
<![endif]-->
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='../assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="../assets/js/bootstrap.min.js"></script>

		<!-- page specific plugin scripts -->

		<!--[if lte IE 8]>
		  <script src="../assets/js/excanvas.min.js"></script>
		<![endif]-->
		<script src="../assets/js/jquery-ui.custom.min.js"></script>
		<script src="../assets/js/jquery.ui.touch-punch.min.js"></script>
		<script src="../assets/js/jquery.gritter.min.js"></script>
		<script src="../assets/js/bootbox.js"></script>
		<script src="../assets/js/jquery.easypiechart.min.js"></script>
		<script src="../assets/js/bootstrap-datepicker.min.js"></script>
		<script src="../assets/js/jquery.hotkeys.index.min.js"></script>
		<script src="../assets/js/bootstrap-wysiwyg.min.js"></script>
		<script src="../assets/js/select2.min.js"></script>
		<script src="../assets/js/spinbox.min.js"></script>
		<script src="../assets/js/bootstrap-editable.min.js"></script>
		<script src="../assets/js/ace-editable.min.js"></script>
		<script src="../assets/js/jquery.maskedinput.min.js"></script>

		<!-- ace scripts -->
		<script src="../assets/js/ace-elements.min.js"></script>
		<script src="../assets/js/ace.min.js"></script>

		<!-- inline scripts related to this page -->
	  <script> 
        function printDiv(GFG) {
            var divToPrint=document.getElementById('GFG');
            var newWin=window.open('','Print-Window');
            newWin.document.open();
            newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
            newWin.document.close();
            setTimeout(function(){newWin.close();},10);
            
            // var divContents = document.getElementById("GFG").innerHTML; 
            // var a = window.open('', '', 'height=500, width=500'); 
            // a.document.write('<html><body >'); 
            // //a.document.write('<body ><div class="container"><div class="row"><div class="col-sm-12"><table class="table" style="width:100%;"><tr><td><?php echo $ra['hsname'] ?></div><div><span style="font-size:18px"><?php echo $Rowhco['Street'] ?> &nbsp;|&nbsp;<?php echo $Rowhco['Locality'] ?></br><?php echo $ra['EmailID'] ?>&nbsp;|&nbsp; <?php echo $ra['numbers'] ?></p></span></td><td><img style="float:right;width: 15%;" src="../../uploads/<?php echo $Rowhco['Logo'] ?>" class="img-responsive img-fluid"/></td></tr></table></div></div></div><hr>'); 
            // a.document.write(divContents); 
            // a.document.write('</body></html>'); 
            // a.document.close(); 
            // a.print(); 
            
           } 
    </script> 
     <style>
    .text-on-pannel {
  background: #fff none repeat scroll 0 0;
  height: auto;
  margin-left: 20px;
  padding: 3px 5px;
  position: absolute;
  margin-top: -47px;
  border: 1px solid #337ab7;
  border-radius: 8px;
  
}

.panel {
  /* for text on pannel */
  margin-top: 27px !important;
}

.panel-body {
  padding-top: 30px !important;
  
}

.panel-primary {
    
    border-color: #116bb9;
}

.donate-now {
     list-style-type:none;
     margin:25px 0 0 0;
     padding:0;
}

.donate-now li {
     float:left;
     margin:0 5px 0 0;
}

.donate-now label {
     padding:5px;
     border:1px solid #CCC; 
     cursor:pointer;
}

.donate-now label:hover {
     background:#DDD;
}
</style>
	</body>
</html>

Anon7 - 2022
AnonSec Team