UnknownSec Bypass
403
:
/
var
/
www
/
zenithentcare
/
stmedicosoftware
/
prescription
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
manage_prescription.php
<?php include "top1.php";?> <!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> --> <!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> --> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css"> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tokenfield/0.12.0/css/bootstrap-tokenfield.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tokenfield/0.12.0/bootstrap-tokenfield.js"></script> <!-- /inner_content--> <div class="inner_content"> <!-- /inner_content_w3_agile_info--> <!-- breadcrumbs --> <div class="w3l_agileits_breadcrumbs"> <div class="w3l_agileits_breadcrumbs_inner"> <ul> <li><a href="dashboard.php">Dashboard</a><span>«</span></li> <li>Manage Priscription </li> </ul> </div> </div> <!-- //breadcrumbs --> <div class="inner_content_w3_agile_info two_in"> <table width="100%"> <tr> <td width="70%"> <h2 class="w3_inner_tittle">MANAGE PRESCRIPTION</h2> </td> <td width="30%" align="right"> <!-- <a href="opd_list.php" class="btn btn-primary"><i class="fa fa-list"></i> Patient List</a> --> <button class="btn btn-warning" id="myBtn"><i class="fa fa-list"></i> Registered Patient</button> </td> </tr> </table> <!--/forms--> <div class="forms-main_agileits"> <!--/forms-inner--> <div class="forms-inner"> <!--/set-1--> <div class="set-1_w3ls"> <div class="col-md-12 button_set_one two agile_info_shadow graph-form"> <!-- <h3 class="w3_inner_tittle two">Inline Form </h3> --> <div class="grid-1"> <div class="form-body"> <div data-example-id="simple-form-inline"> <div class="form-inline"> <div class="col-md-12 form-group" align="center"> <p style="margin-top: 20px"></p> <!-- <div align="cemter"><button class="btn btn-warning" id="myBtn"><i class="fa fa-search"></i> Appointment</button> </div> --> <!-- <button type="submit" class="btn btn-default mt-4" id="btnsave" name="btnsave">SAVE</button> --> <button type="button" class="btn btn-default mt-4" id="btnuploadimage" name="btnuploadimage">Upload Image</button> <button type="button" class="btn btn-default mt-4" id="btnhistory" name="btnhistory">History</button> <button type="button" class="btn btn-default mt-4" id="editbtn" name="editbtn">EDIT</button> <button type="submit" class="btn btn-default" id="btnprint" name="btnprint" onclick="printprescription();">PRINT</button> <button type="submit" class="btn btn-default" onclick="clearall();" id="btnclear" name="btnclear">CLEAR</button> </div> </div> <form method="post" id="insert_form"> <div class="form-inline"> <input type="hidden" class="form-control1" id="hduhid" name="hduhid" value=""> <input type="hidden" class="form-control1" id="hdfileno" name="hdfileno" value=""> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label>Patient Name </label> <table width="100%"> <tr> <td width="20%"> <select name="cmbpatientpre" id="cmbpatientpre" class="form-control1" style="font-size: 14px"> <option value="Mr.">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Miss.">Miss.</option> <option value="Master">Master</option> </select> </td> <td width="60%"> <!-- <input type="text" class="form-control1" id="txtpatientname" name="txtpatientname" placeholder="Patient Name" style="width: 100%" style="font-size: 33px"> --> <input type="text" class="form-control1" id="txtpatientname" name="txtpatientname" placeholder="Patient Name" style="font-size: 14px; width: 100%; text-transform:capitalize;"> </td> <td width="20%"> <!-- <input type="text" class="form-control1" id="txtpatientname" name="txtpatientname" placeholder="Patient Name" style="width: 100%" style="font-size: 33px"> --> <input type="text" class="form-control1" id="txtvisitno" name="txtvisitno" placeholder="Visit No" style="font-size: 14px; width: 100%; text-transform:capitalize;"> </td> </tr> </table> </div> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <!-- <label>Age</label> --> <div> <table width="100%"> <tr> <td width="15%"><label>Age</label></td> <td width="25%"><label></label></td> <td width="30%"><label>Gender</label></td> <td width="30%"><label>Mobile No.</label></td> </tr> <tr> <td width="15%"> <input type="text" class="form-control1" id="txtage" name="txtage" onkeypress="return isNumberKey(event,this);" placeholder="Age" style="font-size: 14px; width: 100%;"> </td> <td width="25%" align="right"> <select class="form-control1" id="cmbyear" name="cmbyear" style="font-size: 14px"> <option>Year</option> <option>Months</option> <option>Days</option> </select> </td> <td width="30%" align="right"> <select class="form-control1" id="txtgender" name="txtgender" style="font-size: 14px"> <option>Male</option> <option>Female</option> <option>Other</option> </select> </td> <td width="30%" align="right"> <input type="text" class="form-control1" id="txtmobile" name="txtmobile" onkeypress="return isNumberKey(event,this);" placeholder="Mobile No." style="font-size: 14px; width: 100%;"> </td> </tr> </table> </div> </div> </div> <!-- <div class="form-inline"> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label>Gender</label> <select class="form-control1" id="txtgender" name="txtgender" style="font-size: 14px"> <option>Male</option> <option>Female</option> <option>Other</option> </select> </div> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label>Mobile No.</label> <input type="text" class="form-control1" id="txtmobile" name="txtmobile" onkeypress="return isNumberKey(event,this);" placeholder="Mobile No." style="font-size: 14px; width: 100%;"> </div> </div> --> <div class="form-inline"> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <div> <table width="100%"> <tr> <td width="20%"><label>B.P.</label></td> <td width="20%"><label>Pulse</label></td> <td width="20%"><label>SPO2</label></td> <!-- <td width="20%"><label>Height</label></td> <td width="20%"><label>Weight</label></td> --> </tr> <tr> <td width="20%"> <input type="text" class="form-control1" id="txtbp" name="txtbp" placeholder="B.P." style="font-size: 14px; width: 100%;"> </td> <td width="20%" align="right"> <input type="text" class="form-control1" id="txtpluse" name="txtpluse" onkeypress="return isNumberKey(event,this);" placeholder="Pluse" style="font-size: 14px; width: 100%;"> </td> <td width="20%" align="right"> <input type="text" class="form-control1" id="txtspo2" name="txtspo2" onkeypress="return isNumberKey(event,this);" placeholder="Spo2" style="font-size: 14px; width: 100%;"> </td> <!-- <td width="20%" align="right"> <input type="text" class="form-control1" id="txtheight" name="txtheight" onkeypress="return isNumberKey(event,this);" placeholder="Height" style="font-size: 14px; width: 100%;"> </td> <td width="20%" align="right"> <input type="text" class="form-control1" id="txtweight" name="txtweight" onkeypress="return isNumberKey(event,this);" placeholder="Weight" style="font-size: 14px; width: 100%;"> </td> --> </tr> </table> </div> </div> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <div> <table width="100%"> <tr> <td width="50%"><label>Height</label></td> <td width="50%"><label>Weight</label></td> </tr> <tr> <td width="50%"> <input type="text" class="form-control1" id="txtheight" name="txtheight" onkeypress="return isNumberKey(event,this);" placeholder="Height" style="font-size: 14px; width: 100%;"> </td> <td width="50%" align="right"> <input type="text" class="form-control1" id="txtweight" name="txtweight" onkeypress="return isNumberKey(event,this);" placeholder="Weight" style="font-size: 14px; width: 100%;"> </td> </tr> </table> </div> </div> </div> <div class="form-inline"> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label>Complaints</label> <input type="text" id="txtcomplaint" name="txtcomplaint" placeholder="" autocomplete="off" class="form-control input-lg" style="font-size: 14px; width: 100%;" /> </div> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label>Diagnosis</label> <!-- <input type="text" class="form-control" id="txtdiagnosis" class="form-control input-lg" name="txtdiagnosis" autocomplete="off" style="font-size: 14px; width: 100%;"> --> <input type="text" id="txtdiagnosis" name="txtdiagnosis" placeholder="" autocomplete="off" class="form-control input-lg" style="font-size: 14px; width: 100%;" /> </div> </div> <div class="form-inline"> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label>Test Required</label> <input type="text" id="txttestrequired" name="txttestrequired" placeholder="" autocomplete="off" class="form-control input-lg" style="font-size: 14px; width: 100%;" /> </div> <div class="col-md-6 form-group"> <p style="margin-top: 20px"></p> <label>Advice</label> <input type="text" id="txtadvice" name="txtadvice" placeholder="" autocomplete="off" class="form-control input-lg" style="font-size: 14px; width: 100%;" /> </div> </div> <div class="form-inline"> <div class="col-md-12 form-group"> <span id="error"></span> <p style="margin-top: 20px"></p> <h4>Rx. <button type="button" name="lastrx" id="lastrx" class="btn btn-success btn-sm lastrx">Last Rx</button> <button type="button" name="btnlastpatient" id="btnlastpatient" class="btn btn-success btn-sm btnlastpatient">Last Patient</button> </h4> <br> <div> <table width="100%" id="prescription_table" class="table table-striped"> <tr> <td width="5%"><button type="button" name="add" id="add" class="btn btn-success btn-sm add"><i class="fa fa-plus"></i></button></td> <td width="20%"><label><b>Medicine</b></label></td> <td width="20%"><label><b>Dosage</b></label></td> <td width="15%"><label><b>When</b></label></td> <td width="10%"><label><b>Frequncy</b></label></td> <td width="10%"><label><b>Duration</b></label></td> <td width="20%"><label><b>Note</b></label></td> </tr> </table> </div> </div> </div> <div class="form-inline"> <div class="col-md-6 form-group"> <table> <tr> <td> <p style="margin-top: 20px"></p> <label>Next Follow up After (No. of Days)</label> <input type="text" class="form-control input-lg" maxlength="6" id="txtfollowupdays" name="txtfollowupdays" style="font-size: 14px; width: 100%;" onkeypress="return isNumberKey(event,this);"> </td> <td> <p style="margin-top: 20px"></p> <label>Next Follow up After</label> <input type="date" class="form-control input-lg" maxlength="6" id="txtfollowupdate" name="txtfollowupdate" style="font-size: 14px; width: 100%;"> </td> <td> <label id="lbldays",name="lbldays">Days</label> </td> </tr> </table> </div> <div class="col-md-6 form-group" align="right"> <p style="margin-top: 20px"></p> <input type="submit" name="submit" id="submit_button" class="btn btn-primary" value="SAVE PRESCRIPTION" /> </div> </div> </form> </div> </div> </div> </div> <div class="clearfix"> </div> </div> <!--//set-1--> </div> <!--//forms-inner--> </div> <!--//forms--> </div> <!-- //inner_content_w3_agile_info--> </div> <!-- //inner_content--> <div id="imageuploadModal" class="modal"> <!-- Modal content --> <div class="modal-content"> <span class="imgclose">×</span> <div class="inner_content_w3_agile_info two_in"> <!--/forms--> <div class="forms-main_agileits"> <!--/forms-inner--> <div class="forms-inner"> <!--/set-1--> <div class="set-1_w3ls"> <div class="col-md-12 graph-form general agile_info_shadow"> <h3 class="w3_inner_tittle two">Upload Image: </h3> <table> <tr> <td> <h6><input type="file" id="patimage" name="patimage[]" multiple ></h6> </td> <td> <input type="submit" class="btn btn-primary" id="uploadimg" onclick="data();" value="Upload"/> </td> </tr> </table> <br> <!-- <div class="form-body"> <table id="uploadtable" class="display" width="100%" cellspacing="0" class="table table-striped table-bordered"> <thead> <tr> <th></th> <th>UHID</th> <th>Opd No</th> <th>SNo</th> <th>Visit No</th> <th>Name</th> <th>Age</th> <th>Sex</th> <th>Mobile</th> <th>Address</th> <th></th> </tr> </thead> </table> </div> --> <div id="display-div"> <table id="displaytable" class="table table-striped table-bordered"> <tbody> <tr> <td width="25%"> <div id="displayArea" style="height: 700px; overflow-y: scroll;"> </div> </td> <td width="75%"> <div align="center" valign="middle" style="width: 700px; height: 700px; overflow-y: scroll;"> <img id="fullimage" name="fullimage" src=""> </div> </td> <tr> </tbody> </table> </div> </div> <div class="clearfix"> </div> </div> <!--//set-1--> </div> <!--//forms-inner--> </div> <!--//forms--> </div> </div> </div> <div id="myModal" class="modal"> <!-- Modal content --> <div class="modal-content"> <span class="close">×</span> <div class="inner_content_w3_agile_info two_in"> <!--/forms--> <div class="forms-main_agileits"> <!--/forms-inner--> <div class="forms-inner"> <!--/set-1--> <div class="set-1_w3ls"> <div class="col-md-12 graph-form general agile_info_shadow"> <h3 class="w3_inner_tittle two">Appointment Patient List </h3> <div class="form-body"> <table id="example" class="display" width="100%" cellspacing="0" class="table table-striped table-bordered"> <thead> <tr> <th></th> <th>UHID</th> <th>Opd No</th> <th>SNo</th> <th>Visit No</th> <th>Name</th> <th>Age</th> <th>Sex</th> <th>Mobile</th> <th>Address</th> <th></th> </tr> </thead> </table> </div> </div> <div class="clearfix"> </div> </div> <!--//set-1--> </div> <!--//forms-inner--> </div> <!--//forms--> </div> </div> </div> <div id="historyModal" class="modal"> <!-- Modal content --> <div class="modal-content"> <span class="hisclose">×</span> <div class="inner_content_w3_agile_info two_in"> <!--/forms--> <div class="forms-main_agileits"> <!--/forms-inner--> <div class="forms-inner"> <!--/set-1--> <div class="set-1_w3ls"> <div class="col-md-12 graph-form general agile_info_shadow"> <h3 class="w3_inner_tittle two">Patient History </h3> <div class="form-body"> <div class="pt_details"> <div class="form-body"> <table id="visittable" class="display" width="100%" cellspacing="0" class="table table-striped table-bordered"> <thead> <tr> <th></th> <th>Visit date</th> <th>Visit No</th> <th>Opd No</th> </tr> </thead> </table> </div> <table width="100%"> <tr> <td width="34%"> <p class="p_title"><b>UHID:</b> <label id="lblh_uhid" name="lblh_uhid">UHID:</label></p> </td> <td width="33%"> <p class="p_title"><b>OPD No.:</b> <label id="lblh_opdno" name="lblh_opdno"></label></p> </td> <td width="33%"> <p class="p_title"><b>Date:</b> <label id="lblh_visitdate" name="lblh_visitdate"></label></p> </td> </tr> <tr> <td width="34%"> <p class="p_title"><b>Name:</b> <label id="lblh_name" name="lblh_name"> </label></p> </td> <td width="33%"> <p class="p_title"><b>Age:</b> <label id="lblh_age" name="lblh_age"> </label> / <b>Sex:</b> <label id="lblh_sex" name="lblh_sex"> </label> </p> </td> <td width="33%"> <p class="p_title"><b>Mobile No.:</b> <label id="lblh_mobile" name="lblh_mobile"></label></p> </td> </tr> </table> <!--<table width="100%"> <tr> <td width="67%"> <p class="p_title"><b>Address:</b> <label id="address" name="address"></label> </p> </td> <td width="33%"> <p class="p_title"><b>Consultant:</b> <label id="consultant" name="consultant"></label></p> </td> </tr> </table>--> </div> <div class="health_details"> <!-- <h2>Health Details</h2> <table width="100%"> <tr> <td width="20%"> <p class="p_title"><b>B.P.:</b> <label id="bp" name="bp"></label></p> </td> <td width="20%"> <p class="p_title"><b>Pulse:</b> <label id="pulse" name="pulse"></label></p> </td> <td width="20%"> <p class="p_title"><b>Spo2:</b> <label id="spo2" name="spo2"></label></p> </td> <td width="20%"> <p class="p_title"><b>Height:</b> <label id="height" name="height"> </label></p> </td> <td width="20%"> <p class="p_title"><b>Weight:</b> <label id="weight" name="weight"> </label></p> </td> </tr> </table> --> <table width="100%"> <tr> <td> <p class="p_title"><b>Complaint:</b> <label id="lblcomplaint" name="lblcomplaint"></label></p> </td> </tr> <tr> <td> <p class="p_title"><b>Diagnosis:</b> <label id="lbldiagnosis" name="lbldiagnosis"></label></p> </td> </tr> <tr> <td> <p class="p_title"><b>Test Required:</b> <label id="lbltestrequired" name="lbltestrequired"></label> </p> </td> </tr> </table> </div> <table width="100%"> <tr> <td width="5%"> <h2>Rx.</h2> </td> <td width="5%"></td> <td width="90%"> <p class="p_title"><b>Advice:</b> <label id="lblh_remarkadvice" name="lblh_remarkadvice"></label> </p> </td> </tr> </table> <br> <p>Rx </p> <div class="form-body"> <table id="histable" class="display" width="100%" cellspacing="0" class="table table-striped table-bordered"> <thead> <tr> <th>Medicine Name</th> <th>Dosage</th> <th>When</th> <th>Frequency</th> <th>Duration</th> <th>Notes</th> </tr> </thead> </table> </div> <!-- <table id="example" class="display" width="100%" cellspacing="0" class="table table-striped table-bordered"> <thead> <tr> <th></th> <th>UHID</th> <th>Opd No</th> <th>SNo</th> <th>Name</th> <th>Age</th> <th>Sex</th> <th>Mobile</th> <th>Address</th> <th></th> </tr> </thead> </table> --> </div> </div> <div class="clearfix"> </div> </div> <!--//set-1--> </div> <!--//forms-inner--> </div> <!--//forms--> </div> </div> </div> <div id="editmodal" class="modal"> <!-- Modal content --> <div class="modal-content"> <span class="close1">×</span> <div class="inner_content_w3_agile_info two_in"> <!--/forms--> <div class="forms-main_agileits"> <!--/forms-inner--> <div class="forms-inner"> <!--/set-1--> <div class="set-1_w3ls"> <div class="col-md-12 graph-form general agile_info_shadow"> <h3 class="w3_inner_tittle two">Edit Patient </h3> <div> <select name="ddlsearch" class="form-control1 ddlsearch" data-live-search="true" style="font-size: 16px;"> <option value="Today">Today</option> <option value="Weekly">Weekly</option> <option value="Monthly">Monthly</option> <option value="All">All</option> </select> </div> <div class="form-body"> <table id="edittable" class="display" width="100%" cellspacing="0" class="table table-striped table-bordered"> <thead> <tr> <th></th> <th>UHID</th> <th>Opd No</th> <th>Date</th> <th>Name</th> <th>Age</th> <th>Age In Years</th> <th>Sex</th> <th></th> </tr> </thead> </table> </div> </div> <div class="clearfix"> </div> </div> <!--//set-1--> </div> <!--//forms-inner--> </div> <!--//forms--> </div> </div> </div> </div> <!-- banner --> <!-- Searchable Dropdown --> <script src='../select2/dist/js/select2.min.js' type='text/javascript'></script> <link href='../select2/dist/css/select2.min.css' rel='stylesheet' type='text/css'> <!-- End Dropdown --> <?php include "footer.php";?> <?php //index.php require_once "../config.php"; function fill_medicine($connect) { $output = ''; $query = "SELECT name FROM medicinemasttb where isdeleted=0 ORDER BY name ASC"; $result = $connect->query($query); foreach($result as $row) { $output .= '<option value="'.$row["name"].'">'.$row["name"] . '</option>'; } return $output; } function fill_dosage($connect) { $output = ''; $query = "SELECT distinct dosage FROM dosageremarktb where isdeleted=0 ORDER BY dosage ASC"; $result = $connect->query($query); foreach($result as $row) { $output .= '<option value="'.$row["dosage"].'">'.$row["dosage"] . '</option>'; } return $output; } ?> <script> function formatDate(dt) { var d, y, m; d = dt.getDate(); m = dt.getMonth() + 1; y = dt.getFullYear(); var ret = ''; if (d < 10) d = '0' + d; if (m < 10) m = '0' + m; ret = y + "-" + m + "-" + d; return ret; } function setfollowupdate() { const nextDayDate = new Date(); const _days= parseInt($('#txtfollowupdays').val()); nextDayDate.setDate(nextDayDate.getDate() +_days); const dayinnumber = parseInt(nextDayDate.getDay()); var _dayname=""; if(dayinnumber==0) { _dayname="Sunday"; } else if(dayinnumber==1) { _dayname="Monday"; } else if(dayinnumber==2) { _dayname="Tuesday"; } else if(dayinnumber==3) { _dayname="Wednesday"; } else if(dayinnumber==4) { _dayname="Thursday"; } else if(dayinnumber==5) { _dayname="Friday"; } else if(dayinnumber==6) { _dayname="Saturday"; } $('#txtfollowupdate').val(formatDate(nextDayDate)); document.getElementById('lbldays').innerHTML = _dayname; } $("#txtfollowupdays").on('input',function() { setfollowupdate(); }); $("#patimage").change(function(){ var fileLength = this.files.length; var match= ["image/jpeg","image/png","image/jpg","image/gif"]; var i; for(i = 0; i < fileLength; i++){ var file = this.files[i]; var imagefile = file.type; if(!((imagefile==match[0]) || (imagefile==match[1]) || (imagefile==match[2]) || (imagefile==match[3]))){ alert('Please select a valid image file (JPEG/JPG/PNG/GIF).'); $("#patimage").val(''); return false; } } }); function showpatientdocument() { const _uhid=document.getElementById('hduhid').value; const _fileno=document.getElementById('hdfileno').value; var page="1"; var query=""; $.ajax({ url:"showpatient_document.php", method:"POST", data:{page:page, query:query,_uhid:_uhid,_fileno:_fileno}, success:function(res) { $('#displayArea').html(res); // var data = JSON.parse(res); // table = $('#studtable').DataTable(); // table.clear(); // // table.row.add(['','','','', 'Total Collection Report','','','','','']); // for (var i = 0; i < data.length; i++) { // table.row.add([data[i].trandate, data[i].sfileno,data[i].uhid,data[i].name,data[i].chargename, // data[i].recamt,data[i].paymentmode,data[i].bankname,data[i].chequeno,data[i].fileno]); // // // // } // table.draw(); } }); } function getimage(id) { $.ajax({ method: 'POST', url: 'get_docimagepath.php', data: '&id=' + id, dataType: "JSON", success: function(data) { document.getElementById("fullimage").src=data.pat_imagepath.replaceAll('"', ''); // $('#txtfollowupdays').val(data.followupdays); // // $('#txtfollowupdays').val(data.followupdays); } }); } function data() { var flag=true; try { if (flag == true) { const _uhid=document.getElementById('hduhid').value; const _fileno=document.getElementById('hdfileno').value; // var file_data = $("#patimage").prop("files")[0]; const fileInput = document.getElementById('patimage'); let fileInput_length = fileInput.files.length; if(fileInput.files.length==0) { alert("Please select image"); return; } const form_data = new FormData(); if (fileInput_length > 0) { for (var i = 0; i < fileInput_length; i++) { form_data.append("file[]", fileInput.files[i]); } } form_data.append("uh_id", _uhid); // Adding extra parameters to form_data form_data.append("fileno_id", _fileno); var result = confirm("Do you want to upload file?"); if (result == true) { $.ajax({ url: "upload_patimage.php", type: "POST", data: form_data, contentType: false, cache: false, processData:false, success: function(data){ const obj = JSON.parse(data); if(obj.code=="1") { alert("Image Upload Successfully"); showpatientdocument(); $("#patimage").val(''); document.getElementById("adimg").src='document_images/'+obj.path.replaceAll('"', ''); document.getElementById("aadharfile").value=null; } }, error: function(){} }); } } } catch (Error) { alert(Error); } } $(document).ready(function() { var count = 0; var flag = false; $(document).on('change', '.medicine', function() { var currentRow = $(this).closest("tr"); var _medicine = currentRow.find('.medicine').val(); if (_medicine == "Select Medicine") { flag = false; return; } var ncount = 0; $("select[name='medicine[]']").each(function(key, val) { if ($(this).val() == _medicine) { ncount = ncount + 1; } }); if (ncount == 2) { flag = false; alert($(this).val() + " is already exist"); currentRow.find('.medicine').val("Select Medicine").change(); return; } if (flag == false) { try { var urlgetcode = 'get_pmedicinedetails.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&med=' + _medicine, dataType: 'json', async: true, cache: false, success: function(data) { currentRow.find('.dosage').val(data.dosage).change(); currentRow.find('.when').val(data.timing).change(); currentRow.find('.frequency').val(data.frequency).change(); }, error: function(request) { alert(request.responseText); } }); } catch (Error) { alert(Error); } } }); $(document).keypress( function(event){ if (event.which == '13' || event.which == '39' || event.which == '34' || event.which == '96' || event.which == '126') { event.preventDefault(); } }); function add_input_field(count) { var html = ''; html += '<tr>'; var remove_button = ''; // if (count > 0) { remove_button = '<button type="button" name="remove" class="btn btn-danger btn-sm remove"><i class="fa fa-minus"></i> </button>'; // } html += '<td>' + remove_button + '</td>'; html += '<td><select name="medicine[]" id="medicine[]" class="form-control1 medicine" ><option value="Select Medicine">Select Medicine</option><?php echo fill_medicine($connect); ?></select></td>'; html += '<td><select name="dosage[]" class="form-control1 dosage" data-live-search="true"><option value="Select Dosage">Select Dosage</option> <?php echo fill_dosage($connect); ?></select></td>'; html += '<td><select name="when[]" class="form-control1 when" data-live-search="true"><option value="After Food">After Food</option><option value="Before Food">Before Food</option><option value="Before Breakfast">Before Breakfast</option><option value="After Breakfast">After Breakfast</option><option value="Before Lunch">Before Lunch</option><option value="After Lunch">After Lunch</option><option value="Before Dinner">Before Dinner</option><option value="After Dinner">After Dinner</option><option value="Empty Stomach">Empty Stomach</option><option value="Bed Time">Bed Time</option><option value="Sos">Sos</option><option value="One Time">One Time</option><option value="Two Time">Two Time</option><option value="Three Time">Three Time</option></select></td>'; html += '<td><select name="frequency[]" class="form-control1 frequency" data-live-search="true"><option value="Daily">Daily</option><option value="Alternate day">Alternate day</option><option value="Weekly">Weekly</option><option value="For night">For night</option><option value="Monthly">Monthly</option><option value="Sos">Sos</option></select></td>'; html += '<td><select name="duration[]" class="form-control1 duration" data-live-search="true"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option><option value="4">4</option> <option value="5">5</option><option value="6">6</option><option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="12">12</option> <option value="15">15</option> <option value="20">20</option> <option value="30">30</option> <option value="60">60</option></select></td>'; html += '<td><input type="text" style="width:100%" name="note[]" class="form-control note" /></td>'; html += '<tr>'; return html; } $('#prescription_table').append(add_input_field(0)); $(".medicine").select2(); $(".dosage").select2(); $(".when").select2(); $(".frequency").select2(); $(".duration").select2(); $(document).on('click', '.add', function() { var uhid = document.getElementById("hduhid").value; if(uhid=="") { alert("Please select patient"); return; } count++; $('#prescription_table').append(add_input_field(count)); $(".medicine").select2(); $(".dosage").select2(); $(".when").select2(); $(".frequency").select2(); $(".duration").select2(); flag = false; }); $(document).on('click', '.remove', function() { $(this).closest('tr').remove(); }); $(document).on('change', '.ddlsearch', function() { var search = $('.ddlsearch').val(); var table = $('#edittable').DataTable({ "ajax": { 'type': 'POST', 'url': 'select_edit_prescription.php', 'data': { search: search, }, }, "bPaginate": true, destroy: true, "bProcessing": true, "pageLength": 10, "columns": [{ mData: null, defaultContent: '<button id="btnselect" class="btn btn-warning btnselect">Select</button>', targets: -1 }, { mData: 'suhid' }, { mData: 'sfileno' }, { mData: 'visitdate' }, { mData: 'name' }, { mData: 'agey' }, { mData: 'pntageyrs' }, { mData: 'sex' }, { mData: 'opdno' } ] }); }); $(document).on('click', '.lastrx', function() { var uhid = document.getElementById("hduhid").value; if (uhid == "") { alert("Please select patient"); return; } $('#prescription_table').find('tr:gt(0)').remove(); $('#prescription_table').append(add_input_field(0)); $(".medicine").select2(); $(".dosage").select2(); $(".when").select2(); $(".frequency").select2(); $(".duration").select2(); getlastrx(uhid); }); function getlastrx(uhid) { $.ajax({ method: 'POST', url: 'get_lastrx.php', data: '&uhid=' + uhid, dataType: "JSON", success: function(res) { var _visitid=""; for (var i = 0; i < res.length; i++) { if (i == 0) { _visitid=res[i].vid; let type = res[i].type; let medicine = res[i].medicine; let dosage = res[i].dosage; let dosageremark = res[i].dosageremark; let timing = res[i].timing; let frequency = res[i].frequency; let duration = res[i].duration; let notes = res[i].notes; $($('#prescription_table tr')).each(function() { if ($(this).find(".medicine").val() == "Select Medicine") { flag = true; $(this).find(".medicine").val(res[i].medicine).change(); $(this).find(".dosage").val(res[i].dosage).change(); $(this).find(".when").val(res[i].timing).change(); $(this).find(".frequency").val(res[i].frequency).change(); $(this).find(".duration").val(res[i].duration).change(); $(this).find(".note").val(res[i].notes); return false; } }); } else { $('#prescription_table').append(add_input_field(i)); $($('#prescription_table tr')).each(function() { if ($(this).find(".medicine").val() == "Select Medicine") { flag = true; $(this).find(".medicine").val(res[i].medicine).change(); $(this).find(".medicine").val(res[i].medicine).change(); $(this).find(".dosage").val(res[i].dosage).change(); $(this).find(".when").val(res[i].timing).change(); $(this).find(".frequency").val(res[i].frequency).change(); $(this).find(".duration").val(res[i].duration).change(); $(this).find(".note").val(res[i].notes); return false; } }); // var currentRow = $(this).closest("tr"); // currentRow.find('.dosage').val('1-1-1').change(); // currentRow.find('.when').val('After Food').change(); // currentRow.find('.frequency').val('Daily'y).change(); $(".medicine").select2(); $(".dosage").select2(); $(".when").select2(); $(".frequency").select2(); $(".duration").select2(); } } getLastvisitdetails(_visitid); } }); } function getLastvisitdetails(opdno) { $.ajax({ method: 'POST', url: 'get_visitdetails.php', data: '&opdno=' + opdno, dataType: "JSON", success: function(data) { $('#txtcomplaint').val(data.complaint).change(); $('#txtdiagnosis').val(data.diagnosis).change(); $('#txttestrequired').val(data.testrequired).change(); $('#txtadvice').val(data.remark).change(); // $('#txtfollowupdays').val(data.followupdays); // // $('#txtfollowupdays').val(data.followupdays); } }); } $('#txtdiagnosis').tokenfield({ autocomplete: { source: function(request, response) { jQuery.get('get_diagnosis.php', { query: request.term }, function(data) { data = JSON.parse(data); response(data); }); }, delay: 100 } }); $('#txttestrequired').tokenfield({ autocomplete: { source: function(request, response) { jQuery.get('get_testrequireddetails.php', { query: request.term }, function(data) { data = JSON.parse(data); response(data); }); }, delay: 100 } }); $('#txtadvice').tokenfield({ autocomplete: { source: function(request, response) { jQuery.get('get_advisedetails.php', { query: request.term }, function(data) { data = JSON.parse(data); response(data); }); }, delay: 100 } }); function getvisitdetails(opdno) { $.ajax({ method: 'POST', url: 'get_visitdetails.php', data: '&opdno=' + opdno, dataType: "JSON", success: function(data) { $('#txtcomplaint').val(" ").change(); $('#txtdiagnosis').val(" ").change(); $('#txttestrequired').val(" ").change(); $('#txtadvise').val(" ").change(); $('#txtfollowupdays').val(""); $('#hduhid').val(data.uhid); $('#hdfileno').val(data.fileno); $('#cmbpatientpre').val(data.pntpre); $('#txtpatientname').val(data.name); $('#txtage').val(data.age); $('#cmbyear').val(data.pntageyrs); $('#txtgender').val(data.sex); $('#txtmobile').val(data.mobile); $('#txtvisitno').val(data.visitno); $('#txtbp').val(data.pressure); $('#txtpluse').val(data.pulse); $('#txtspo2').val(data.spo2); $('#txtheight').val(data.height); $('#txtweight').val(data.weight); $('#txtcomplaint').val(data.complaint).change(); $('#txtdiagnosis').val(data.diagnosis).change(); $('#txttestrequired').val(data.testrequired).change(); $('#txtadvice').val(data.remark).change(); $('#txtfollowupdays').val(data.followupdays); if(data.followupdays!="0") { $('#txtfollowupdate').val(data.fdate); } } }); } $('#txtcomplaint').tokenfield({ autocomplete: { source: function(request, response) { jQuery.get('get_complaint.php', { query: request.term }, function(data) { data = JSON.parse(data); response(data); }); }, delay: 100 } }); function get_prescription(_opdno) { try { var urlgetcode = 'get_prescription.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&opdno=' + _opdno, dataType: 'json', async: true, cache: false, success: function(res) { for (var i = 0; i < res.length; i++) { if (i == 0) { if(res[i].type=="") { getvisitdetails(_opdno); return; } let type = res[i].type; let medicine = res[i].medicine; let dosage = res[i].dosage; let dosageremark = res[i].dosageremark; let timing = res[i].timing; let frequency = res[i].frequency; let duration = res[i].duration; let notes = res[i].notes; $($('#prescription_table tr')).each(function() { if ($(this).find(".medicine").val() == "Select Medicine") { flag = true; $(this).find(".medicine").val(res[i].medicine).change(); $(this).find(".dosage").val(res[i].dosage).change(); $(this).find(".when").val(res[i].timing).change(); $(this).find(".frequency").val(res[i].frequency) .change(); $(this).find(".duration").val(res[i].duration).change(); $(this).find(".note").val(res[i].notes); return false; } }); } else { $('#prescription_table').append(add_input_field(i)); $($('#prescription_table tr')).each(function() { if ($(this).find(".medicine").val() == "Select Medicine") { flag = true; $(this).find(".medicine").val(res[i].medicine).change(); $(this).find(".medicine").val(res[i].medicine).change(); $(this).find(".dosage").val(res[i].dosage).change(); $(this).find(".when").val(res[i].timing).change(); $(this).find(".frequency").val(res[i].frequency) .change(); $(this).find(".duration").val(res[i].duration).change(); $(this).find(".note").val(res[i].notes); return false; } }); // var currentRow = $(this).closest("tr"); // currentRow.find('.dosage').val('1-1-1').change(); // currentRow.find('.when').val('After Food').change(); // currentRow.find('.frequency').val('Daily'y).change(); $(".medicine").select2(); $(".dosage").select2(); $(".when").select2(); $(".frequency").select2(); $(".duration").select2(); } } getvisitdetails(_opdno); flag = false; // $($('#prescription_table tr')).each(function(){ // // $(this).find(".medicine").val('Corax').change(); // }); //alert(array.length); }, error: function(request) { alert(request.responseText); } }); } catch (Error) { alert(Error); } } $(document).on('click', '.btnlastpatient', function(){ $('#prescription_table').find('tr:gt(0)').remove(); $('#prescription_table').append(add_input_field(0)); $.ajax({ method: 'Post', url: 'get_lastpatientopdno.php', dataType: "JSON", success: function(data) { // var _opdno="OPD/20240815053015/1/8382"; // getvisitdetails(opdno) // alert(_opdno); get_prescription(data.opdno); } }); }); $('#search').click(function() { alert($('#search_data').val()); $('#country_name').text($('#search_data').val()); }); $('#insert_form').on('submit', function(event) { event.preventDefault(); var error = ''; var uhid = document.getElementById("hduhid").value; if(uhid=="") { alert("Please select patient"); return; } count = 1; $("select[name='medicine[]']").each(function() { if ($(this).val() == 'Select Medicine') { error += "<li>Select Medicine at " + count + " Row</li>"; } count = count + 1; }); count = 1; $("select[name='dosage[]']").each(function() { if ($(this).val() == 'Select Dosage') { error += "<li>Select Dosage at " + count + " Row</li>"; } count = count + 1; }); if(count==1) { alert("Please add rows"); error="Please add rows"; } var form_data = $(this).serialize(); if (error == '') { $.ajax({ url: "newsave_prescription.php", method: "POST", data: form_data, beforeSend: function() { $('#submit_button').attr('disabled', 'disabled'); }, success: function(data) { if (data == 'Ok') { $('#prescription_table').find('tr:gt(0)').remove(); $('#error').html( '<div class="alert alert-success">Prescription Saved Successfully</div>' ); $('#prescription_table').append(add_input_field(0)); $('#submit_button').attr('disabled', false); printprescription(); // window.location.href="manage_prescription.php"; } } }) } else { $('#error').html('<div class="alert alert-danger"><ul>' + error + '</ul></div>'); } }); // Get the modal var modal = document.getElementById("editmodal"); // Get the button that opens the modal var btn = document.getElementById("editbtn"); var btnselect = document.getElementById("select"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("close1")[0]; // When the user clicks on the button, open the modal btn.onclick = function() { count = 0; var funcnt = 0; $('#prescription_table').find('tr:gt(0)').remove(); $('#prescription_table').append(add_input_field(0)); $(".medicine").select2(); $(".dosage").select2(); $(".when").select2(); $(".frequency").select2(); $(".duration").select2(); var search = $('.ddlsearch').val(); var table = $('#edittable').DataTable({ "ajax": { 'type': 'POST', 'url': 'select_edit_prescription.php', 'data': { search: search, }, }, "bPaginate": true, destroy: true, "bProcessing": true, "pageLength": 10, "columns": [{ mData: null, defaultContent: '<button id="btnselect" class="btn btn-warning btnselect">Select</button>', targets: -1 }, { mData: 'suhid' }, { mData: 'sfileno' }, { mData: 'visitdate' }, { mData: 'name' }, { mData: 'agey' }, { mData: 'pntageyrs' }, { mData: 'sex' }, { mData: 'opdno' } ] }); modal.style.display = "block"; $('#edittable').DataTable().columns(8).visible(false); table.one('click', '.btnselect', function(e) { $('#edittable').DataTable().columns(8).visible(true); var currentRow = $(this).closest("tr"); var opdno = currentRow.find("td:eq(8)").text(); modal.style.display = "none"; if (funcnt == 0) { funcnt = funcnt + 1;; get_prescription(opdno); } }); } function isNumberKey(evt, element) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57) && !(charCode == 46 || charCode == 8)) return false; else { var len = $(element).val().length; var index = $(element).val().indexOf('.'); if (index > 0 && charCode == 46) { return false; } if (index > 0) { var CharAfterdot = (len + 1) - index; if (CharAfterdot > 3) { return false; } } } return true; } function refresh() { editmodal.ajax.reload(); } function closemodalpopup(val) { count = 0; $('#prescription_table').find('tr:gt(0)').remove(); $('#prescription_table').append(add_input_field(0)); $(".medicine").select2(); $(".dosage").select2(); $(".when").select2(); $(".frequency").select2(); $(".duration").select2(); modal.style.display = "none"; window.location.href = "manage_prescription.php"; //getpatientdetails(val); } // When the user clicks on <span> (x), close the modal span.onclick = function() { count = 0; $('#prescription_table').find('tr:gt(0)').remove(); $('#prescription_table').append(add_input_field(0)); $(".medicine").select2(); $(".dosage").select2(); $(".when").select2(); $(".frequency").select2(); $(".duration").select2(); modal.style.display = "none"; window.location.href = "manage_prescription.php"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { count = 0; $('#prescription_table').find('tr:gt(0)').remove(); $('#prescription_table').append(add_input_field(0)); $(".medicine").select2(); $(".dosage").select2(); $(".when").select2(); $(".frequency").select2(); $(".duration").select2(); modal.style.display = "none"; window.location.href = "manage_prescription.php"; } } }); function printprescription() { var opdno = document.getElementById("hdfileno").value; if (opdno == "") { return; } window.location.href = "print_prescriptionnew.php?opdno=" + opdno; } </script> <script> function getpastvisitdetails(opdno) { $.ajax({ method: 'POST', url: 'get_visitdetails.php', data: '&opdno=' + opdno, dataType: "JSON", success: function(data) { document.getElementById('lblh_uhid').innerHTML=data.suhid; document.getElementById('lblh_opdno').innerHTML=data.sfileno; document.getElementById('lblh_visitdate').innerHTML=data.visitdate; document.getElementById('lblh_name').innerHTML=data.name; document.getElementById('lblh_age').innerHTML=data.age+'/'+data.pntageyrs; document.getElementById('lblh_mobile').innerHTML=data.mobile; document.getElementById('lblh_sex').innerHTML=data.sex; document.getElementById('lblcomplaint').innerHTML=data.complaint; document.getElementById('lbldiagnosis').innerHTML=data.diagnosis; document.getElementById('lbltestrequired').innerHTML=data.testrequired; document.getElementById('lblh_remarkadvice').innerHTML=data.remark; // // $('#txtfollowupdays').val(data.followupdays); } }); } var hismodal = document.getElementById("historyModal"); // Get the button that opens the modal var btnhis = document.getElementById("btnhistory"); // var btnselect = document.getElementById("select"); // // // Get the <span> element that closes the modal var spanhis = document.getElementsByClassName("hisclose")[0]; // When the user clicks on the button, open the modal btnhis.onclick = function() { var patuhid=document.getElementById("hduhid").value; if(patuhid=="") { alert("Please select patient"); return; } else { getallvisit(); hismodal.style.display = "block"; } } spanhis.onclick = function() { hismodal.style.display = "none"; document.getElementById('lblh_uhid').innerHTML=""; document.getElementById('lblh_opdno').innerHTML=""; document.getElementById('lblh_visitdate').innerHTML=""; document.getElementById('lblh_name').innerHTML=""; document.getElementById('lblh_age').innerHTML=""; document.getElementById('lblh_mobile').innerHTML=""; document.getElementById('lblh_sex').innerHTML=""; document.getElementById('lblcomplaint').innerHTML=""; document.getElementById('lbldiagnosis').innerHTML=""; document.getElementById('lbltestrequired').innerHTML=""; document.getElementById('lblh_remarkadvice').innerHTML=""; $('#histable').DataTable().clear().destroy(); } function getallvisit() { var patuhid=document.getElementById("hduhid").value; var visitid=document.getElementById("hdfileno").value; var table1 = $('#visittable').DataTable({ "ajax": { 'type': 'POST', 'url': 'get_allvisitdetails.php', 'data': { patuhid: patuhid, }, }, "bPaginate": true, destroy: true, "bProcessing": true, "pageLength": 10, "columns": [ { mData: null, defaultContent: '<button id="btnvisitselect" class="btn btn-warning btnvisitselect">Select</button>', targets: -1 }, { mData: 'visitdate' }, { mData: 'visitno' }, { mData: 'opdno' } ] }); table1.on('click', '.btnvisitselect', function(e) { var currentRow = $(this).closest("tr"); var opdno = currentRow.find("td:eq(3)").text(); getvisitprescription(opdno); //modal.style.display = "none"; getpastvisitdetails(opdno); }); } function getvisitprescription(visitid) { var table1 = $('#histable').DataTable({ "ajax": { 'type': 'POST', 'url': 'get_pastprescription.php', 'data': { visitid: visitid, }, }, "bPaginate": true, destroy: true, "bProcessing": true, "pageLength": 10, "columns": [ { mData: 'medicine' }, { mData: 'dosage' }, { mData: 'timing' }, { mData: 'frequency' }, { mData: 'duration' }, { mData: 'notes' } ] }); } </script> <script> function getpatientdetails(opdno) { $.ajax({ method: 'POST', url: '../get_opddetails.php', data: '&id=' + opdno, dataType: "JSON", success: function(data) { $('#hduhid').val(data.uhid); $('#hdfileno').val(data.fileno); $('#cmbpatientpre').val(data.pntpre); $('#txtpatientname').val(data.name); $('#txtage').val(data.age); $('#cmbyear').val(data.pntageyrs); $('#txtgender').val(data.sex); $('#txtmobile').val(data.mobile); $('#txtvisitno').val(data.sno); $('#txtcomplaint').val(" ").change(); $('#txtdiagnosis').val(" ").change(); $('#txttestrequired').val(" ").change(); $('#txtadvise').val(" ").change(); $('#txtfollowupdays').val(""); var cnt = 1; $("select[name='medicine[]']").each(function() { if(cnt==1) { } else { $(this).closest('tr').remove(); } cnt = cnt + 1; }); } }); } // Get the modal var modal = document.getElementById("myModal"); // Get the button that opens the modal var btn = document.getElementById("myBtn"); var btnselect = document.getElementById("select"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on the button, open the modal btn.onclick = function() { var table = $('#example').DataTable({ "ajax": "loadopdapp_patient.php", "bPaginate": true, destroy: true, "bProcessing": true, "pageLength": 10, "columns": [{ mData: null, defaultContent: '<button class="btn btn-warning">Select</button>', targets: -1 }, { mData: 'suhid' }, { mData: 'sfileno' }, { mData: 'doctorpatientcount' }, { mData: 'sno' }, { mData: 'name' }, { mData: 'age' }, { mData: 'sex' }, { mData: 'mobile' }, { mData: 'address1' }, { mData: 'fileno' } ] }); modal.style.display = "block"; table.on('click', 'button', function(e) { var currentRow = $(this).closest("tr"); var opdno = currentRow.find("td:eq(10)").text(); modal.style.display = "none"; getpatientdetails(opdno); }); } function isNumberKey(evt, element) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57) && !(charCode == 46 || charCode == 8)) return false; else { var len = $(element).val().length; var index = $(element).val().indexOf('.'); if (index > 0 && charCode == 46) { return false; } if (index > 0) { var CharAfterdot = (len + 1) - index; if (CharAfterdot > 3) { return false; } } } return true; } function refresh() { myModal.ajax.reload(); } function closemodalpopup(val) { modal.style.display = "none"; //getpatientdetails(val); } // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } function clearall() { window.location.href = "manage_prescription.php" } </script> <script> </script> <script> // Get the modal var modal1 = document.getElementById("imageuploadModal"); // Get the button that opens the modal var btn1 = document.getElementById("btnuploadimage"); var btnselect1 = document.getElementById("select"); // Get the <span> element that closes the modal var span1 = document.getElementsByClassName("imgclose")[0]; // When the user clicks on the button, open the modal btn1.onclick = function() { const _uhid=document.getElementById('hduhid').value; const _fileno=document.getElementById('hdfileno').value; if(_uhid=="") { alert("Please Select Patient"); return; } modal1.style.display = "block"; document.getElementById("fullimage").src=null; showpatientdocument(); } function isNumberKey(evt, element) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57) && !(charCode == 46 || charCode == 8)) return false; else { var len = $(element).val().length; var index = $(element).val().indexOf('.'); if (index > 0 && charCode == 46) { return false; } if (index > 0) { var CharAfterdot = (len + 1) - index; if (CharAfterdot > 3) { return false; } } } return true; } function refresh() { myModal1.ajax.reload(); } function closemodalpopup(val) { modal1.style.display = "none"; //getpatientdetails(val); } // When the user clicks on <span> (x), close the modal span1.onclick = function() { modal1.style.display = "none"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { alert(); if (event.target == modal1) { alert("none"); modal1.style.display = "none"; } } </script> <style> /* The Modal (background) */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ left: 0; top: 0; width: 100%; /* Full width */ height: 100vh; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0, 0, 0); /* Fallback color */ background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */ } /* Modal Content/Box */ .modal-content { background-color: #fefefe; margin: 5% auto; /* 15% from the top and centered */ padding: 15px; border: 1px solid #888; width: 80%; /* Could be more or less, depending on screen size */ } /* The Close Button */ .close { color: #ff0000; float: right; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: black; text-decoration: none; cursor: pointer; } .hisclose { color: #ff0000; float: right; font-size: 28px; font-weight: bold; } .imgclose { color: #ff0000; float: right; font-size: 28px; font-weight: bold; } /* The Close Button */ .close1 { color: #ff0000; float: right; font-size: 28px; font-weight: bold; } .close1:hover, .close1:focus { color: black; text-decoration: none; cursor: pointer; } </style>
Copyright © 2025 - UnknownSec