Server IP : 162.240.98.243 / Your IP : 3.139.80.199 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/public_html/login.easenup.in/NewNurse/Patient/ |
Upload File : |
<?php if(isset($_GET['BIPAP_id'])){ $sql=$con->query("DELETE FROM `BIPAP` WHERE id='$_GET[BIPAP_id]'"); if($sql){ echo "<script>alert('BIPAP DELETE successfully..');</script><script> window.history.go(-1)</script>;</script>";} else { echo "<script>alert('Inavlid');</script><script> window.history.go(-1)</script>;</script>";} } ?> <?php if(isset($_POST['BIPAPva'])) { $updated_at=date("Y-m-d"); $created_at=date("F d, Y / h:i:s A"); $sql=$con->query("INSERT INTO `BIPAP`(`prescriptionid`, `patientid`, `BIPAP`, `BIPAP_start`, `BIPAP_stop`, `rate`, `duration`, `ward_id`, `bed_id`, `entered_by`, `created_at`, `updated_at`) VALUES ('$_POST[prescriptionid]','$_POST[patientid]','$_POST[BIPAP]','$_POST[BIPAP_start]','$_POST[BIPAP_stop]','$_POST[rate]','0','0','0','$_POST[entered_by]','$created_at','$updated_at')"); $sql =$con->query("select last_insert_id() from BIPAP"); $row=mysqli_fetch_row($BIPAP1); $id=$row[0]; $BIPAP_site_users = $con->query("SELECT * FROM save_activity WHERE prescriptionid = '$_POST[prescriptionid]' AND userno='$_POST[patientid]' AND discription='Respiratory Record<br>BIPAP<br>Doc.no-'"); $BIPAP_numrows=mysqli_num_rows($BIPAP_site_users); if($BIPAP_numrows > 0){ // echo "<script>alert('Already Exists');</script>"; }else{ $sql=$con->query("INSERT INTO save_activity(srno,userno,prescriptionid,discription,entered_by,link,created_at,updated_at) VALUES (NULL, '$_POST[patientid]','$_POST[prescriptionid]','Respiratory Record<br>BIPAP<br>Doc.no-','$_POST[entered_by]','showBIPAP.php?prescriptionid=$_POST[prescriptionid]&patientid=$_POST[patientid]&id=$id&srno=',' $created_at','$updated_at')"); } if($sql){ echo "<script>alert('BIPAP Add successfully..');</script><script> window.history.go(-1)</script>;</script>";} else { echo "<script>alert('BIPAP not add successfully..');</script><script> window.history.go(-1)</script>;</script>";} } ?> <?php if(isset($_POST['updateoxygen'])) { $sql6="UPDATE BIPAP SET BIPAP='$_POST[BIPAP]',BIPAP_stop='$_POST[BIPAP_stop]' ,ward_id='$_POST[wardid]',bed_id='$_POST[bedid]' WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]' AND BIPAP='on'"; if($qsql6 = mysqli_query($con,$sql6)) { echo "<script>alert('Update successfully');</script><script>window.location='Respiration.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]'</script>;</script>"; $sql4 ="SELECT * FROM BIPAP WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]' AND id='$_POST[id]'"; $qsql4 = mysqli_query($con,$sql4); while($rpn = mysqli_fetch_array($qsql4)) { $date1 =$rpn[BIPAP_start]; $date2 =$rpn[BIPAP_stop]; $timestamp1 = strtotime($date1); $timestamp2 = strtotime($date2); $hour = abs($timestamp2 - $timestamp1)/(60*60); $d8=round($hour); if ($rpn[BIPAP_stop]=='') { if ($d8 < "1") { } } else { $total=$d8; } $today = date('Y-m-d'); $sql1 ="SELECT * FROM site_users WHERE userno='$harilal'"; $qsql1 = mysqli_query($con,$sql1); if($re = mysqli_fetch_array($qsql1)) { $sql56 ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'"; $qsql56 = mysqli_query($con,$sql56); while($rs56 = mysqli_fetch_array($qsql56)) { $sql212 ="SELECT * FROM tarifrate WHERE tarifid='7' AND hospitalid='$re[entered_by]' AND wardid='$rs56[Ward]'"; $qsql212 = mysqli_query($con,$sql212); if($rs112 = mysqli_fetch_array($qsql212)) { $subbill=$total*$rs112[rate]; $msg=mysqli_query($con,"insert into patient_invace(patientid, prescriptionid,discription,pagetype,link,pricetotal,discount,grand_total,paymentmode,status,entered_by,created_at,updated_at) values('$_GET[patientid]','$_GET[prescriptionid]','BI-PAP','$total','drinvace.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&id=$_POST[id]','$subbill','','','','','$harilal','','')"); { } } } } } } } ?> <?php $DisplayForm=True; $sql5 ="SELECT * FROM BIPAP WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]' AND BIPAP='on'"; $qsql5 = mysqli_query($con,$sql5); if($rt5 = mysqli_fetch_array($qsql5)) { $DisplayForm=False; date_default_timezone_set('Asia/Kolkata'); $date = date('y-m-d h:i:s'); echo " <form name='updateoxygen' method='post'> <input type='hidden' name='bedid' id='bedid' value='$qTransferbed[Bed]'/> <input type='hidden' name='wardid' id='Ward' value='$qTransferbed[Ward]'/> <input type='hidden' name='id' value='$rt5[id]'> <input type='hidden' name='BIPAP_stop' value='20$date'> <script> var today = new Date(); var time = today.getHours() + ':' + today.getMinutes() + ':' + today.getSeconds(); document.getElementById('myCheckBIPAP').value = time; </script> <button type='submit' name='updateoxygen' class='btn btn-success'>Stop</button> </form>"; } if($DisplayForm) { ?> <form name="BIPAPva" method="post"> <input type='hidden' value='on' name='BIPAP'> <input type='hidden' value='<?php echo $_GET['prescriptionid'] ?>' name='prescriptionid'> <input type='hidden' value='<?php echo $_GET['patientid'] ?>' name='patientid'> <input type='hidden' value='<?php echo $RowRate['rate'] ?>' name='rate'> <input type='hidden' value='<?php echo $RowSite['entered_by'] ?>' name='entered_by'> <?php date_default_timezone_set('Asia/Kolkata'); $date = date('y-m-d h:i:s'); echo" <input type='hidden' name='BIPAP_start' value='20$date'> "; ?> <script> var today = new Date(); var time = today.getHours() + ':' + today.getMinutes() + ':' + today.getSeconds(); document.getElementById('myCheckBIPAPstart').value = time; </script> <button type='submit' name='BIPAPva' class='btn btn-success'>Start</button> </form> <?php } ?> <table class='table table-hover table-bordered'> <tbody> <tr> <th><div align="center">Start At <br> (YYYY-MM-DD)</div></th> <th><div align="center">Stop At <br> (YYYY-MM-DD)</div></th> <th><div align="center">Duration </div></th> <th><div align="center">Created By</div></th> <th><div align="center">Action</div></th> </tr> </tbody> <?php $sql1 ="SELECT * FROM site_users WHERE userno='$harilal'"; $qsql1 = mysqli_query($con,$sql1); while($re = mysqli_fetch_array($qsql1)) { $sql4 ="SELECT * FROM BIPAP WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]'"; $qsql4 = mysqli_query($con,$sql4); while($rpn = mysqli_fetch_array($qsql4)) { $date1 =$rpn[BIPAP_start]; $date2 =$rpn[BIPAP_stop]; $timestamp1 = strtotime($date1); $timestamp2 = strtotime($date2); $hour = abs($timestamp2 - $timestamp1)/(60*60); $d8=round($hour); echo " <tbody> <tr> <td> $rpn[BIPAP_start]</td> <td> $rpn[BIPAP_stop]</td> <td>"; if ($rpn[BIPAP_stop]=='') { if ($d8 < "1") { } } else { echo"$d8 Hours"; } echo"</td> <td> $re[name]</td> <td style='width:25%'><a href='edit_BIPAP.php?prescriptionid=$rpn[prescriptionid]&patientid=$rpn[patientid]&id=$rpn[id]' style='width:15%'><i class='fa fa-pencil-square-o' aria-text='true' style='font-size:20px;width:10%'></i></a> | <a href='Respiration.php?prescriptionid=$rpn[prescriptionid]&patientid=$rpn[patientid]&BIPAP_id=$rpn[id]' style='width:15%'><i class='fa fa-trash-o' aria-text='true' style='font-size:20px;color:red;width:10%'></i></a></td> </tr> "; } } ?> </tbody> <tfoot> </tfoot> </table>