Autopopulate billing page html
Array Demo Billl3.html
—
HTML,
3 kB (3467 bytes)
File contents
<html> <head> <title>***Find Demographic***</title> <script type="text/javascript" src="${oscar_javascript_path}jquery/jquery-1.4.2.js"></script> <script type="text/javascript" language="javascript"> function getDateJoined() { xmlhttp = new XMLHttpRequest(); var pathArray = window.location.href; var mydemographic= /demographic_no=(.*?)&appointment/; var demoNumber = (mydemographic.exec(pathArray))[1]; var myURL= /^(.*?)\/eform/; var URL = (myURL.exec(pathArray))[1]; var newURL = URL+"/demographic/demographiccontrol.jsp?demographic_no="+demoNumber+"&displaymode=edit&dboperation=search_detail"; xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var str = xmlhttp.responseText; if (!str) { return; } var demoArray = /Date Joined:<\/span>\s*<span class="info">([0-9,-]+)<\/span>/g; var demo = (demoArray.exec(str))[1]; $('#dateJoined').val(demo); var demoArray2 = /Referral Doctor #:<\/span><span class="info">(.*?)<\/span>/g; var demo2 = (demoArray2.exec(str))[1]; $('#referralNo').val(demo2); var demoArray3 = /Referral Doctor:<\/span><span class="info">(.*?)<\/span>/g; var demo3 = (demoArray3.exec(str))[1]; $('#referralDoctor').val(demo3); } } xmlhttp.open("GET", newURL, false); xmlhttp.send(); } function billService() { var pathArray = window.location.href; var mydemographic= /demographic_no=(.*?)&appointment/; var demoNumber = (mydemographic.exec(pathArray))[1]; var myURL= /^(.*?)\/eform/; var URL = (myURL.exec(pathArray))[1]; var referralNumber=$('#referralNo').val(); var billCode=$('#billingCode').val(); var diagCode=$('#diagnosticCode').val(); var date=$('#dateService').val(); var providerNumber=$('#providerNo').val(); var billingWindow = window.open(URL+"/billing.do?billRegion=BC&billForm=GP&hotclick=&appointment_no=0&demographic_name=none&demographic_no="+demoNumber+"&providerview=1&user_no="+providerNumber+"&apptProvider_no="+providerNumber+"&appointment_date="+date+"&start_time=0:00&bNewForm=1&status=t",'_blank'); billingWindow.addEventListener('load',function(){ $('[name=xml_refer1]',billingWindow.document).val(referralNumber); $('[name=xml_diagnostic_detail1]',billingWindow.document).val(diagCode); $('[name=xml_other1]',billingWindow.document).val(billCode); }); } </script> </head> <body onload='getDateJoined()'> Date joined:<input type="text" name="dateJoined" id="dateJoined"><br> Referral doctor:<input type="text" name="referralDoctor" id="referralDoctor"><br> Referral doctor number:<input type="text" name="referralNo" id="referralNo"><br> Date of service:<input type="text" name="dateService" id="dateService" oscarDB=today><br> Billing code:<input type="text" name="billingCode" id="billingCode"><br> Diagnostic code:<input type="text" name="diagnosticCode" id="diagnosticCode"><br> Provider number:<input type="text" name="providerNo" id="providerNo" oscarDB=appt_provider_id><br> <input type="button" name="bill" id="bill" value='Bill' onclick='billService()'><br> </body > </html>
Document Actions