<!DOCTYPE html>
<html lang="en">
<head>
 <title>Electronic health records management</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
 
  <link href="css/bootstrap.min.css" rel="stylesheet">
  <script src="js/bootstrap.bundle.min.js"></script>
  <script src="jsj/JQuery.js"></script>
</head>
<body>
<!--<nav class="navbar navbar-expand-xxl bg-dark navbar-dark fixed-top">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">
       <img src="assets/optimismlogo.png" alt="OPTIMISM LOGO" style="width:100px; height:80px;" class="rounded-pill">
    </a>
    <span class="navbar-text text-white">ELECTRONIC HEALTH RECORD MANAGEMENT SYSTEM</span>
      <ul class="navbar-nav">
     
      <li class="nav-item">
        <a class="nav-link" href="index.php">Logout</a>
      </li>
    </ul>
  </div>
  <section style="float:top;width:100%;background-color:black;height:10%;position:fixed;top:0;left:0;
    z-index:0;">
</nav>-->


        
    <table width="100%" style="float:top;width:100%;background-color:black;height:10%;position:fixed;top:0;left:0;
    z-index:0;"> 
    <tr><td> 
    <a class="navbar-brand" href="#">
       <img src="assets/optimismlogo.png" alt="OPTIMISM LOGO" style="width:100px; height:80px;" class="rounded-pill">
    </a>
    </td>
    <td align="center">
      <span class="navbar-text text-white">ELECTRONIC HEALTH RECORDS MANAGEMENT SYSTEM</span>
      </td>
      <td>
        <a class="nav-link" href="index.php"><span class="text-white">Logout</span></a>
      </td>
    </tr>
  </table> 
  

 <?php
 require_once"labClass.php";
  $con=new labClass();

  $row=$con->getRowCount();                                                                //FUNCTION FOR VISITORS OF HOTEL HERE
  $nr=$row->rowCount()+1;
   $nm=$_GET['id'];
///
?>

<!--/////////////-->
<section style="height:100px; width:100%;"></section>
<table class="table table-bordered" >
   
    <tbody>
      <tr>
       <td align="left"><input type="text" disabled="true" style="width:140px;" class="form-control bg-white borderless" id="user" name="user" value="<?php echo $nm;?>">
       </td>

        <td align="right"> 
   
       <small><h6 id="ds"></h6></small>
      <input type="date" style="width:200px;" class="form-control" id="sdate" name="sdate" value="<?php echo Date("Y-m-d");?>">
        
     


      </td></tr>
      <tr>
        <td style="width:10%; height:auto;">
          <h6><small>Patient ID:</small></h6>
          <input type="text" class="form-control" id="pID" value="<?php echo $nr;?>"  name="pID" required>
      
           
           
            
           
        <div class="form-floating mb-3 mt-3"> 
      <button type="submit" class="btn btn-primary" style="width:100%; height:43px;" onclick=" var tDate=$('#sdate').val(); var patientID=$('#pID').val(); $.post('navDR.php',{patientID:patientID,tDate:tDate},function(data){$('#disp').html(data).show();});">HOME</button>
    </div>

       

        </div>
        </td>
        <td height="100%">
          <div id="outp" class="container-sm"></div>
          <div class="container mt-3" id="disp">
            <?php
               require_once "navDR.php";
            ?>

 

           </div> 
        </td> 
      </tr>
      
    </tbody>
  </table>
 
<!--///////////////--->
</body>

<section style="float:bottom;width:100%;background-color:black;height:3%;position:fixed;bottom:0;left:0;
    z-index:0;">
        
     <center> <small><font color="white">  Sponsered by BUDA. Developed by Hassan Jeremiah-(+255 758912113/689749960)</font><small> </center> 
    </section>
<!--<div class="footer" style="width:100%;  position:absolute;">
  
<nav class="navbar navbar-expand-sm bg-secondary fixed-bottom">
  <div class="container-fluid justify-content-center">
     
    <span class="navbar-text text-white"><small>Sponsered by BUDA. Developed by Hassan Jeremiah-(+255 758912113/689749960)<small></span>

     
  </div>
</nav>
</div>--> 
</html>

 <script type="text/javascript">
                  var i=0; 
    
                var counter=0;
  
              var t=28;
                var mgs="";
                var action;
                 var i1=0; 
    
                var counter1=0;
  
              var t1=28;
                var mgs1="";
                var action1;

  $(document).ready(function(){
                       
                                         deduct();
                                          
                              }
                             );

  function deduct(){ 
      counter++; 
          if(counter ==6 ){
            i++;
              
                        }
                   if(counter1==60){
                     counter=0;
                     i=0;     
                    }   
            
          action=setTimeout("deduct();",1000);
         }
            
 
</script>