Server IP : 162.240.98.243 / Your IP : 3.144.4.5 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/ |
Upload File : |
<?php include("headers.php"); include("menu.php"); include("dbconnection.php"); if(isset($_GET[delid])) { $sql ="DELETE FROM prescription_records WHERE prescription_record_id='$_GET[delid]'"; $qsql=mysqli_query($con,$sql); if(mysqli_affected_rows($con) == 1) { echo "<script>window.location='prescriptionrecord.php?prescriptionid=$_GET[prescriptionid]';</script>"; echo "<script>alert('prescription deleted successfully..');</script>"; } } if(isset($_POST[submit])) { if(isset($_GET[editid])) { $sql ="UPDATE prescription_records SET prescription_id='$_POST[prescriptionid]',HospitalName='$_POST[HospitalName]',BedNo='$_POST[BedNo]',Dr='$_POST[Dr]',Addiction='$_POST[Addiction]',PastHistory='$_POST[PastHistory]' WHERE prescription_record_id='$_GET[editid]'"; if($qsql = mysqli_query($con,$sql)) { echo "<script>alert('prescription record updated successfully...');</script>"; } else { echo mysqli_error($con); } } else { //$sql ="INSERT INTO prescription_records(prescription_id,HospitalName,BedNo,Dr,Addiction,PastHistory,KnownAllergies,Food,Medicine,Other,ConDischarge,Investigation,CBC,RFT,ABG,LFT,XRAY,DEV,CTMRI,PTPTT,ECG,USG,RPOthers,ER,IPD,OT,DRUGS1,Dose1,Route1,Frequency1,Date1) values('$_POST[prescriptionid]','$_POST[HospitalName]','$_POST[BedNo]','$_POST[Dr]','$_POST[Addiction]','$_POST[PastHistory]','$_POST[KnownAllergies]','$_POST[Food]','$_POST[Medicine]','$_POST[Other]','$_POST[ConDischarge]','$_POST[Investigation]','$_POST[CBC]','$_POST[RFT]','$_POST[ABG]','$_POST[LFT]','$_POST[XRAY]','$_POST[DEV]','$_POST[CTMRI]','$_POST[PTPTT]','$_POST[ECG]','$_POST[USG]','$_POST[RPOthers]','$_POST[ER]','$_POST[IPD]','$_POST[OT]','$_POST[DRUGS1]','$_POST[Dose1]','$_POST[Route1]','$_POST[Frequency1]','$_POST[Date1]')"; $sql ="INSERT INTO prescription_records(prescription_id,HospitalName,BedNo,Dr,Addiction,PastHistory,KnownAllergies,Food,Medicine,Other,ConDischarge,Investigation,CBC,RFT,ABG,LFT,XRAY,ECHO2,CTMRI,PTPTT,ECG,USG,RPOthers,ER,IPD,OT,DRUGS1,Dose1,Route1,Frequency1,Date1) values('$_POST[prescriptionid]','$_POST[HospitalName]','$_POST[BedNo]','$_POST[Dr]','$_POST[Addiction]','$_POST[PastHistory]','$_POST[KnownAllergies]','$_POST[Food]','$_POST[Medicine]','$_POST[Other]','$_POST[ConDischarge]','$_POST[Investigation]','$_POST[CBC]','$_POST[RFT]','$_POST[ABG]','$_POST[LFT]','$_POST[XRAY]','$_POST[ECHO2]','$_POST[CTMRI]','$_POST[PTPTT]','$_POST[ECG]','$_POST[USG]','$_POST[RPOthers]','$_POST[ER]','$_POST[IPD]','$_POST[OT]','$_POST[DRUGS1]','$_POST[Dose1]','$_POST[Route1]','$_POST[Frequency1]','$_POST[Date1]')"; if($qsql = mysqli_query($con,$sql)) { echo "<script>alert('Administrator record inserted successfully...');</script>"; } else { echo mysqli_error($con); } } } ?> <style> form{ margin: 20px 0; } form input, button{ padding: 5px; } table{ width: 100%; margin-bottom: 20px; border-collapse: collapse; } table, th, td{ border: 1px solid #cdcdcd; } table th, table td{ padding: 10px; text-align: left; } <style> table{ border: solid 1px gray; width: 100%; } </style> </style> <!-- Control Sidebar --> <aside class="control-sidebar control-sidebar-dark"> <!-- Control sidebar content goes here --> </aside> <!-- /.control-sidebar --> </div> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <div class="wrapper col2"> <div id="breadcrumb"> </div> </div> <div class="wrapper col4"> <div id="container"> <table width="200" border="3"> <tbody> <tr> <td><strong>Healthcare Provider</strong></td> <td><strong>Patient Name</strong></td> <td><strong>Prescription Date</strong></td> <td><strong>Problem</strong></td> </tr> <?php $sql ="SELECT * FROM prescription WHERE prescriptionid='$_GET[prescriptionid]'"; $qsql = mysqli_query($con,$sql); while($rs = mysqli_fetch_array($qsql)) { $sqlpatient = "SELECT * FROM patient WHERE patientid='$rs[patientid]'"; $qsqlpatient = mysqli_query($con,$sqlpatient); $rspatient = mysqli_fetch_array($qsqlpatient); $sqldoctor = "SELECT * FROM admin WHERE adminid='$rs[adminid]'"; $qsqldoctor = mysqli_query($con,$sqldoctor); $rsdoctor = mysqli_fetch_array($qsqldoctor); echo "<tr> <td> $rsdoctor[adminname]</td> <td> $rspatient[patientname]</td> <td> $rs[prescriptiondate]</td> <td> $rs[problem]</td> </tr>"; } ?> </tbody> </table> <hr> <h1>Add Prescription record</h1> <?php if(!isset($_SESSION[patientid])) { ?> <form method="post" action="" name="frmpresrecord" onSubmit="return validateform()"> <input type="hidden" name="prescriptionid" value="<?php echo $_GET[prescriptionid]; ?>" /> <table width="200" border="3"> <tbody> </select> </tbody></table> <div class="account-details"> <div> <label for="item"> Hospital Name <span>*</span></label> <td><input type="text" name="HospitalName" id="HospitalName" value="<?php echo $rsedit[HospitalName]; ?>"/></div> <div> <label for="item"> Bed No <span>*</span></label> <td><input type="text" name="BedNo" id="BedNo" value="<?php echo $rsedit[BedNo]; ?>"/></div> <div> <label for="item"> Consultant’s Name : Dr.<span>*</span></label> <input type="text" name="Dr" id="Dr" value="<?php echo $rsedit[Dr]; ?>" /></div> <div> <label for="item"> Addiction<span>*</span></label> <input type="text" name="Addiction" id="Addiction" value="<?php echo $rsedit[Addiction]; ?>"/></div> <div> <label for="item"> Past History/Medication History Before Admission <span>*</span></label> <textarea rows="4" cols="50" name="PastHistory" id="PastHistory" value="<?php echo $rsedit[PastHistory]; ?>"></textarea></div> <div> <label for="item">Known Allergies<span>*</span></label> <input type="text" name="KnownAllergies" id="KnownAllergies" value="<?php echo $rsedit[KnownAllergies]; ?>"/></div> <div> <label for="item">Food Allergie<span>*</span></label> <textarea rows="2" cols="50" name="Food" id="Food" value="<?php echo $rsedit[Food]; ?>"></textarea></div> <div> <label for="item"> Medicine Allergie<span>*</span></label> <td><textarea rows="2" cols="50" name="Medicine" id="Medicine" value="<?php echo $rsedit[Medicine]; ?>"></textarea></div> <div> <label for="item"> Other Allergie <span>*</span></label> <td><textarea rows="2" cols="50" name="Other" id="Other" value="<?php echo $rsedit[Other]; ?>"></textarea></div> <div> <label for="item"> Condition at Discharge <span>*</span></label> <input type="text" name="ConDischarge" id="ConDischarge" value="<?php echo $rsedit[ConDischarge]; ?>" /></div> <div> <label for="item"> Vitals<span>*</span></label> <textarea rows="3" cols="50" name="Vitals" id="Vitals" value="<?php echo $rsedit[Vitals]; ?>"></textarea></div> <div> <label for="item"> Investigation <span>*</span></label> <input type="text" name="Investigation" id="Investigation" value="<?php echo $rsedit[Investigation]; ?>"/></div> <div> <label for="item">CBC<span>*</span></label> <input type="text" name="CBC" id="CBC" value="<?php echo $rsedit[CBC]; ?>"/></div> <div> <label for="item">RFT <span>*</span></label> <input type="text" name="RFT" id="RFT" value="<?php echo $rsedit[RFT]; ?>"/></div> <div> <label for="item">ABG<span>*</span></label> <input type="text" name="ABG" id="ABG" value="<?php echo $rsedit[ABG]; ?>"/></div> <div> <label for="item">X-RAY<span>*</span></label> <input type="text" name="XRAY" id="XRAY" value="<?php echo $rsedit[XRAY]; ?>"/></div> <div> <label for="item">SUGAR<span>*</span></label> <input type="text" name="SUGAR" id="SUGAR" value="<?php echo $rsedit[SUGAR]; ?>"/></div> <div> <label for="item"> ECHO<span>*</span></label> <input type="text" name="ECHO2" id="ECHO2" value="<?php echo $rsedit[ECHO2]; ?>"></div> <div> <label for="item">CT/MRI<span>*</span></label> <input type="text" name="CTMRI" id="CTMRI" value="<?php echo $rsedit[CTMRI]; ?>"/></div> <div> <label for="item">PT/PTT<span>*</span></label> <input type="text" name="PT/PTT" id="PT/PTT" value="<?php echo $rsedit[PT/PTT]; ?>"/></div> <div> <label for="item">ECG<span>*</span></label> <input type="text" name="ECG" id="ECG" value="<?php echo $rsedit[ECG]; ?>"/></div> <div> <label for="item">USG<span>*</span></label> <input type="text" name="USG" id="USG" value="<?php echo $rsedit[USG]; ?>"/></div></div> <div> <label for="item">Others:<span>*</span></label> <textarea rows="2" cols="50" name="RPOthers" id="RPOthers" value="<?php echo $rsedit[RPOthers]; ?>"></textarea></div> <h2 align="center">Hospital Course </h2> <div class="account-details"> <div> <label for="item">ER Days<span>*</span></label> <input type="text" name="ER" id="ER" value="<?php echo $rsedit[ER]; ?>"/></div> <div> <label for="item">IPD Days <span>*</span></label> <input type="text" name="IPD" id="IPD" value="<?php echo $rsedit[IPD]; ?>"/></div> <div> <label for="item">OT Days <span>*</span></label> <input type="text" name="OT" id="OT" value="<?php echo $rsedit[OT]; ?>"/></div> </div> <td colspan="2" align="center"><input type="submit" name="submit" id="submit" value="Submit" /> </td> </tr> </tbody> </table> </form> <?php } ?> </div> <div class="card-body"> <table id="example2" class="table table-bordered table-hover"> <thead> <tr> <th><strong>DRUGS </strong></th> <th><strong>Dose</strong></th> <th><strong>Route</strong></th> <th><strong>Frequency</strong></th> <th><strong>Date</strong></th> </tr> </script><table class="gridtable2" id="tableMain2"> </thead> <tbody> <input type="button"id="button3" value="Insert Row" /> <table> <script> $(document).ready(function () { var newrow1 = "<tr><td><input type='text'/></td><td<input type='text'/>td><td><input type='text'/></td><td><input type='text'/></td><td><input type='text'/></td><td><input type='text'/></td><td><input type='text'/></td></tr>" $("#button3").click(function () { $('#tableMain2 > tbody').append(newrow1); }); }); </script> </div> <div> <label for="item">Advice On Discharge/ Follow Up:<span>*</span></label> <textarea rows="3" cols="100" name="AdvicDischarge" id="AdvicDischarge" value="<?php echo $rsedit[AdvicDischarge]; ?>"></textarea></div> <div class="card-body"> <table id="example2" class="table table-bordered table-hover"> <thead> <tr> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function () { var newrow1 = "<tr><td><input type='text'/></td><td<input type='text'/>td><td><input type='text'/></td><td><input type='text'/></td><td><input type='text'/></td><td><input type='text'/></td><td><input type='text'/></td></tr>" $("#button2").click(function () { $('#tableMain > tbody').append(newrow1); }); }); </script><table class="gridtable" id="tableMain"> <th><strong>DRUGS </strong></th> <th><strong>Dose</strong></th> <th><strong>Route</strong></th> <th><strong>Frequency</strong></th> <th><strong>Date</strong></th> </script><table class="gridtable" id="tableMain"> </tr> </thead> <input type="button"id="button2" value="Insert Row" /> </table> <center><a href='patientreport.php?patientid=<?php echo $_GET[patientid]; ?>&appointmentid=<?php echo $_GET[appid]; ?>'><strong>View Patient Report>></strong></a></center> <script> function myFunction() { window.print(); } </script> <p> </p> </div> </div> </div> <div class="clear"></div> </div> </div> <?php include("footer.php"); ?> <script type="application/javascript"> function loadmedicine(medicineid) { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("totcost").value = this.responseText; document.getElementById("cost").value = this.responseText; document.getElementById("unit").value = 1; } }; xmlhttp.open("GET","ajaxmedicine.php?medicineid="+medicineid,true); xmlhttp.send(); } function calctotalcost(cost,qty) { document.getElementById("totcost").value = parseFloat(cost) * parseFloat(qty); } function validateform() { if(document.frmpresrecord.prescriptionid.value == "") { alert("Prescription id should not be empty.."); document.frmpresrecord.prescriptionid.focus(); return false; } else if(document.frmpresrecord.medicine.value == "") { alert("Medicine field should not be empty.."); document.frmpresrecord.medicine.focus(); return false; } else if(document.frmpresrecord.cost.value == "") { alert("Cost should not be empty.."); document.frmpresrecord.cost.focus(); return false; } else if(document.frmpresrecord.unit.value == "") { alert("Unit should not be empty.."); document.frmpresrecord.unit.focus(); return false; } else if(document.frmpresrecord.select2.value == "") { alert("Dosage should not be empty.."); document.frmpresrecord.select2.focus(); return false; } else if(document.frmpresrecord.select.value == "" ) { alert("Kindly select the status.."); document.frmpresrecord.select.focus(); return false; } else { return true; } } </script> <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> <script> $(document).ready(function(){ $(".add-row").click(function(){ var name = $("#name").val(); var email = $("#email").val(); var markup = "<tr><td><input type='checkbox' name='record'></td><td>" + name + "</td><td>" + email + "</td></tr>"; $("table tbody").append(markup); }); // Find and remove selected table rows $(".delete-row").click(function(){ $("table tbody").find('input[name="record"]').each(function(){ if($(this).is(":checked")){ $(this).parents("tr").remove(); } }); }); }); </script> <script> $(function () { $("#example1").DataTable({ "responsive": true, "autoWidth": false, }); $('#example2').DataTable({ "paging": true, "lengthChange": false, "searching": false, "ordering": true, "info": true, "autoWidth": false, "responsive": true, }); }); </script>