  
 
 <div class="container mt-3" style="margin-top:2px;">
  <?php
  require_once"labClass.php";

  $con=new labClass();
  $patientID= $_POST['patientID'];
  $pn= $con->getThisPatientD($patientID);
if($pn->rowCount()>0){
   $n=$pn->fetch();
      ?> 
   <small>PATIENT NAME:<h6 class="text-primary"><?php echo $n['fname']." ". $n['mname']." ".$n['lname'];?></h6></small>
  <h6>Select consultant:</h6> 
    <div class="row">
    <div class="col">
    <small>Billing option:</small>  
    <select style="width:100%; height:35px; border-radius:12px;" class="form-select" id="billOp" name="billOp">
   <option value="">Select </option>
     
      <option value="Cash">Cash</option> 
      <option value="NHIF">NHIF</option>
    </select>  
</div>
<div class="col"> 
<small>Dr incharge:</small> 
  <select style="width:100%; height:35px; border-radius:12px;" class="form-select" id="drN" name="drN">
   <option value="">Select </option>
    <?php
     $Q= $con->getDrTech();
     if ($Q->rowCount()>0) {
     $lb=$Q->fetchAll();
     foreach ($lb as $key => $l) {
      
      ?>
      <option value="<?php echo  $l["lname"].', '.$l["fname"];?>"><?php echo  $l["lname"].', '.$l["fname"]?></option> 
             <?php
            
           }
           }
 
      ?>
      
    </select>  
</div>


    </div>
     <div class="row">
    <div class="col">
    <label for="tname">Search for consultant:</label>  
      <input type="text"style="width:100%; height:35px; border-radius:12px; background-color:white;" onkeyup ="submision()" class="form-control" id="tname"   placeholder="Type name" name="tname" required>
        
    </div>
</div> 
</div>
<?php 
}
else {
  echo "Invalid patientID!..";
}
?>
</div>
<div id="dispR"></div>
 

 <script>

  function submision(){
    
    var searchValue=$('#tname').val();

    
 ;
    $('#dispR').empty();
    $.post('consultationOpt.php',{searchValue:searchValue},function(data){
      $('#dispR').html(data);

    });
  }
 
 
</script>
 
