<!DOCTYPE html>
<html lang="en">
<head>
  <title>OPTIMISM LABORATORY CENTRE</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">
  <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">OPTIMISM LABORATORY RECORD MANAGEMENT SYSTEM</span>
      <ul class="navbar-nav">
     
      <li class="nav-item">
        <a class="nav-link" href="index.php">Logout</a>
      </li>
    </ul>
  </div>
</nav>

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

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

<!--/////////////-->
<table class="table table-bordered" >
   
    <tbody>
      <tr>
       <td align="left"><input type="text" disabled="true" style="width:300px; " 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");?>">
        
    </div>
    </div>
     </div>


      </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>
           <div class="form-floating mb-3 mt-3"> 
            <button type="submit" class="btn btn-primary" style="width:100%; height:30px;" onclick=" var pID=234;$.post('pRegform.php',{pID:pID},function(data){$('#disp').html(data).show();});"><small>New patients</small></button>
          </div>
           <div class="form-floating mb-3 mt-3"> 
            <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var pID=234;$.post('pharItemRf.php',{pID:pID},function(data){$('#disp').html(data).show();});"><small>New item</small></button>

          </div>
           <div class="form-floating mb-3 mt-3"> 
             
              <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var sdate=$('#sdate').val(); var patientID=$('#pID').val();if (patientID!=''&& sdate!='') {$.post('pProfileDiagnosis.php',{sdate:sdate,patientID:patientID},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='System date required!..';}"><small>Patient visits</small></button>

          </div>
            <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var sdate=$('#sdate').val(); var patientID=$('#pID').val();if (patientID!=''&& sdate!='') {$.post(' pharmBillDrug.php',{sdate:sdate,patientID:patientID},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}"><small>Medical billing</small></button>

          </div>
            <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var sdate=$('#sdate').val(); var patientID=$('#pID').val();if (patientID!=''&& sdate!='') {$.post('pharmDispensableQ.php',{sdate:sdate,patientID:patientID},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}"><small>Dispense medicine</small></button>

          </div>
          
              <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var sdate=$('#sdate').val(); if (sdate!='') {$.post('pharmPurchaseR.php',{sdate:sdate},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='System date required!..';}"><small>Purchase report</small></button>

          </div> 
          <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var sdate=$('#sdate').val(); if (sdate!='') {$.post('pharmDispenseRpt.php',{sdate:sdate},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='System date required!..';}"><small>Dispenses report</small></button>

          </div>
             <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var sdate=$('#sdate').val(); var patientID=$('#pID').val();if (patientID!=''&& sdate!='') {$.post('phramTreatmtF.php',{sdate:sdate,patientID:patientID},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}"><small>Treatment</small></button>

          </div>
          
           <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var sdate=$('#sdate').val(); var patientID=$('#pID').val();if (patientID!=''&& sdate!='') {$.post('pdiagnosis.php',{sdate:sdate,patientID:patientID},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}"><small>Diagnosis</small></button>

          </div>

         <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var patientID=$('#pID').val();if (patientID!='') {$.post('consultaionBill.php',{patientID:patientID},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}">Consultation</button>

          </div>
         <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var patientID=$('#pID').val();if (patientID!='') {$.post('addMtest.php',{patientID:patientID},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}">Send medical</button>

          </div>
             <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var sdate=$('#sdate').val(); var patientID=$('#pID').val();if (patientID!='') {$.post('codeDiseaseRF.php',{patientID:patientID,sdate:sdate},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}">Code disease </button>

          </div>
            <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var sdate=$('#sdate').val(); var patientID=$('#pID').val();if (patientID!='') {$.post('complainRgF.php',{patientID:patientID,sdate:sdate},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}">Patient complain</button>

          </div>

         <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var tDate=$('#sdate').val(); var patientID=$('#pID').val();if (patientID!='') {$.post('patientMtestBill.php',{patientID:patientID,tDate:tDate},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}">Bill medicalDisc</button>

          </div>
            <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var tDate=$('#sdate').val(); var patientID=$('#pID').val();if(patientID!=''){$.post('patientCheckUpReports.php',{patientID:patientID,tDate:tDate},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}">Patient check up results</button>

          </div>
           <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var pID=234;$.post('labtoolkitReg.php',{pID:pID},function(data){$('#disp').html(data).show();});">Lab toolkit</button>

          </div>
           <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var pID=234;$.post('consultRegF.php',{pID:pID},function(data){$('#disp').html(data).show();});">New consultant</button>

          </div>


         <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var pID=234;$.post('medTestRegform.php',{pID:pID},function(data){$('#disp').html(data).show();});">Medical test</button>

          </div>
          <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var pID=234;$.post('patientRecords.php',{pID:pID},function(data){$('#disp').html(data).show();});"> Patient records</button>

          </div>
          <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var pID=234;$.post('medicalCheckUpRecords.php',{pID:pID},function(data){$('#disp').html(data).show();});">Test records</button>

          </div>
          <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var tDate=$('#sdate').val(); var patientID=$('#pID').val();if(patientID!=''&& tDate!=''){$.post('medicalCheckUpBillReports.php',{patientID:patientID,tDate:tDate},function(data){$('#disp').html(data).show();});} else{alert('Valid patientID and date required!..')}"> Bill record</button>

          </div>
          <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var pID=234;$.post('toolKitEntryRecords.php',{pID:pID},function(data){$('#disp').html(data).show();});">Toolkit records </button>

          </div>

          
            <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick=" var tDate=$('#sdate').val(); var patientID=$('#pID').val();if(patientID!=''&& tDate!=''){$.post('saveCheckUpResults.php',{patientID:patientID,tDate:tDate},function(data){$('#disp').html(data).show();});} else{document.getElementById('disp').innerHTML='Enter valid patient ID!..';}">Enter check up results</button>

          </div>


         <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var pID=234;$.post('empRegForm.php',{pID:pID},function(data){$('#disp').html(data).show();});">Register employee</button>

          </div>

         <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var pID=234;$.post('usersList.php',{pID:pID},function(data){$('#disp').html(data).show();});">Employee records</button>

          </div>
             <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var pID=234;$.post('expensesRegForm.php',{pID:pID},function(data){$('#disp').html(data).show();});">Expenditure</button>

          </div>
           <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var pID=234;$.post('addLabToolkitUsed.php',{pID:pID},function(data){$('#disp').html(data).show();});">Add toolkit used</button>

          </div>
           <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var pID=234;$.post('toolkitUsedRecords.php',{pID:pID},function(data){$('#disp').html(data).show();});"><small>Used toolkits records</small></button>

          </div>
             <div class="form-floating mb-3 mt-3"> 
                 <button type="submit" class="btn btn-primary" style="width:100%; height:45px;" onclick="var pID=234;$.post('patientCheckUpReports.php',{pID:pID},function(data){$('#disp').html(data).show();});"><small>Check up reports</small></button>

          </div>

       

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

 

           </div> 
        </td> 
      </tr>
      
    </tbody>
  </table>
 
<!--///////////////--->
</body>
<div class="footer" style="width:100%;  position:absolute;">
  
<nav class="navbar navbar-expand-sm bg-secondary">
  <div class="container-fluid justify-content-center">
     
    <span class="navbar-text text-white"><small>Sponsered by Optimism International Company Limited. Developed by Hassan Jeremiah-(+255 758912113/689749960)<small></span>

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