lets put OCEAN where the OSCAR instance has allowance
jQuery("#ocean_placeholder").show();
jQuery("#ocean_placeholder").append("
Sorry, the Ocean toolbar is currently unavailable.
");
diff --git a/src/main/webapp/js/custom/ocean/conreq.js b/src/main/webapp/js/custom/ocean/conreq.js
index 2d1ef4f9f48..e535ec3b386 100644
--- a/src/main/webapp/js/custom/ocean/conreq.js
+++ b/src/main/webapp/js/custom/ocean/conreq.js
@@ -90,4 +90,3 @@ function attachOceanAttachments() {
}
});
}
-
diff --git a/src/main/webapp/js/custom/ocean/master.js b/src/main/webapp/js/custom/ocean/master.js
deleted file mode 100644
index 3c1456cb63b..00000000000
--- a/src/main/webapp/js/custom/ocean/master.js
+++ /dev/null
@@ -1,2 +0,0 @@
-jQuery(document).ready(function () {
-});
diff --git a/src/main/webapp/js/custom/renal/adddemo.js b/src/main/webapp/js/custom/renal/adddemo.js
deleted file mode 100644
index 44d0c5d90bb..00000000000
--- a/src/main/webapp/js/custom/renal/adddemo.js
+++ /dev/null
@@ -1,11 +0,0 @@
-jQuery(document).ready(function () {
-
- jQuery("#addDemographicTbl #renewDateLbl").css("display", "none");
- jQuery("#addDemographicTbl #renewDate").css("display", "none");
- jQuery("#addDemographicTbl #countryLbl").insertAfter(jQuery("#addDemographicTbl #hcType"));
- jQuery("#addDemographicTbl #countryCell").insertAfter(jQuery("#addDemographicTbl #countryLbl"));
-
- jQuery("#last_name").focus();
- jQuery("#last_name").select();
- window.resizeTo(1100, 700);
-});
diff --git a/src/main/webapp/js/custom/renal/diab.js b/src/main/webapp/js/custom/renal/diab.js
deleted file mode 100644
index c5e5cc5c949..00000000000
--- a/src/main/webapp/js/custom/renal/diab.js
+++ /dev/null
@@ -1,73 +0,0 @@
-function addToDx(codingSystem, code) {
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=addtoDx&demographicNo=" + getDemographicNo() + "&codingSystem=" + codingSystem + "&code=" + code,
- async: false,
- success: function (data) {
- if (data.result != '0') {
- alert('added to Dx');
- }
- location.href = 'TemplateFlowSheet.jsp?demographic_no=' + getDemographicNo() + '&template=diab2';
- }
- });
-}
-
-jQuery(document).ready(function () {
- jQuery("#print_box").before(
- "
" +
- "
" +
- "
" +
- "
" +
- "- Next Steps:
" +
- "
" +
- "
" +
- "
");
-
- jQuery("#add_overdue").after(
- "
" +
- "" +
- "Add Renal" +
- "
"
- );
-
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=250",
- async: false,
- success: function (data) {
- //got it
- if (data.result == false) {
- jQuery('#dxaddshortcut_list').append("
Add Diabetes to Dx");
- }
- }
- });
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=401",
- async: false,
- success: function (data) {
- //got it
- if (data.result == false) {
- jQuery('#dxaddshortcut_list').append("
Add Hypertension to Dx");
- }
- }
- });
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=585",
- async: false,
- success: function (data) {
- //got it
- if (data.result == false) {
- jQuery('#dxaddshortcut_list').append("
Add Chronic Renal Failure to Dx");
- }
- }
- });
-
- //next steps
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=getNextSteps&demographicNo=" + getDemographicNo(),
- async: false,
- success: function (data) {
- jQuery("#renal_next_steps").html(data.result);
- }
- });
-
-
-});
\ No newline at end of file
diff --git a/src/main/webapp/js/custom/renal/health_tracker.js b/src/main/webapp/js/custom/renal/health_tracker.js
deleted file mode 100644
index 9e6ad8b4464..00000000000
--- a/src/main/webapp/js/custom/renal/health_tracker.js
+++ /dev/null
@@ -1,25 +0,0 @@
-function addToDx(codingSystem, code) {
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=addtoDx&demographicNo=" + getDemographicNo() + "&codingSystem=" + codingSystem + "&code=" + code,
- async: false,
- success: function (data) {
- if (data.result != '0') {
- alert('added to Dx');
- location.href = 'TemplateFlowSheet.jsp?demographic_no=' + getDemographicNo() + '&template=diab3';
- }
- }
- });
-}
-
-jQuery(document).ready(function () {
-
- //next steps
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=getNextSteps&demographicNo=" + getDemographicNo(),
- async: false,
- success: function (data) {
- jQuery("#renal_next_steps").html(data.result);
- }
- });
-
-});
diff --git a/src/main/webapp/js/custom/renal/indicators.js b/src/main/webapp/js/custom/renal/indicators.js
deleted file mode 100644
index 321e0a35a9c..00000000000
--- a/src/main/webapp/js/custom/renal/indicators.js
+++ /dev/null
@@ -1,66 +0,0 @@
-function addToDx(codingSystem, code) {
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=addtoDx&demographicNo=" + getDemographicNo() + "&codingSystem=" + codingSystem + "&code=" + code,
- async: false,
- success: function (data) {
- if (data.result != '0') {
- alert('added to Dx');
- location.href = 'TemplateFlowSheet.jsp?demographic_no=' + getDemographicNo() + '&template=diab3';
- }
- }
- });
-}
-
-jQuery(document).ready(function () {
- $('#Renal_update').before(
- "
| Next Steps | " +
- "" +
- " |
" +
- "
" +
- "| CSN Algorithm Detection, Monitoring & Referral of CKD |
" +
- "
|   | Kidney Foundation of Canada |
" +
- "
| " +
- " |
"
- );
-
-
- $('#Renal_update_comments').css('border', 'none');
-
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=250",
- async: false,
- success: function (data) {
- if (data.result == false) {
- jQuery('#dxaddshortcut_list').append("
");
- }
- }
- });
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=401",
- async: false,
- success: function (data) {
- if (data.result == false) {
- jQuery('#dxaddshortcut_list').append("
");
- }
- }
- });
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=checkForDx&demographicNo=" + getDemographicNo() + "&codingSystem=icd9&code=585",
- async: false,
- success: function (data) {
- if (data.result == false) {
- jQuery('#dxaddshortcut_list').append("
");
- }
- }
- });
-
- //next steps
- jQuery.ajax({
- url: getContextPath() + "/renal/Renal.do?method=getNextSteps&demographicNo=" + getDemographicNo(),
- async: false,
- success: function (data) {
- jQuery("#renal_next_steps").html(data.result);
- }
- });
-
-});
diff --git a/src/main/webapp/js/custom/renal/master.js b/src/main/webapp/js/custom/renal/master.js
deleted file mode 100644
index 3c1456cb63b..00000000000
--- a/src/main/webapp/js/custom/renal/master.js
+++ /dev/null
@@ -1,2 +0,0 @@
-jQuery(document).ready(function () {
-});
diff --git a/src/main/webapp/js/custom/westernu/adddemo.js b/src/main/webapp/js/custom/westernu/adddemo.js
deleted file mode 100644
index 335c2a7e3a3..00000000000
--- a/src/main/webapp/js/custom/westernu/adddemo.js
+++ /dev/null
@@ -1,180 +0,0 @@
-jQuery(document).ready(function () {
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #chartNoLbl")).append(jQuery("#addDemographicTbl #chartNo")).append(jQuery("#addDemographicTbl #hinLbl")).append(jQuery("#addDemographicTbl #hinVer"))).insertBefore(jQuery("#addDemographicTbl tr:first"));
- jQuery("#addDemographicTbl #hcTypeLbl").insertAfter(jQuery("#addDemographicTbl #lastName"));
- jQuery("#addDemographicTbl #hcType").insertAfter(jQuery("#addDemographicTbl #hcTypeLbl"));
-
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #firstNameLbl")).append(jQuery("#addDemographicTbl #firstName"))).insertAfter(jQuery("#addDemographicTbl #rowWithLastName"));
- jQuery("#addDemographicTbl #rosterStatusLbl").insertAfter(jQuery("#addDemographicTbl #firstName"));
- jQuery("#addDemographicTbl #rosterStatus").insertAfter(jQuery("#addDemographicTbl #rosterStatusLbl"));
-
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #genderLbl")).append(jQuery("#addDemographicTbl #gender"))).insertAfter(jQuery("#addDemographicTbl #rowWithFirstName"));
- jQuery("#addDemographicTbl #effDateLbl").insertAfter(jQuery("#addDemographicTbl #gender"));
- jQuery("#addDemographicTbl #effDate").insertAfter(jQuery("#addDemographicTbl #effDateLbl"));
-
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #dobLbl")).append(jQuery("#addDemographicTbl #dobTbl"))).insertAfter(jQuery("#addDemographicTbl #rowWithGender"));
- jQuery("#addDemographicTbl #renewDateLbl").insertAfter(jQuery("#addDemographicTbl #dobTbl"));
- jQuery("#addDemographicTbl #renewDate").insertAfter(jQuery("#addDemographicTbl #renewDateLbl"));
-
- jQuery("#addDemographicTbl #dobLbl").css("padding-bottom", "1em");
- jQuery("#addDemographicTbl #dobTbl").css("padding-bottom", "1em");
-
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #addrLbl")).append(jQuery("#addDemographicTbl #addressCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithDob"));
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #cityLbl")).append(jQuery("#addDemographicTbl #cityCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithAddress"));
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #provLbl")).append(jQuery("#addDemographicTbl #provCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithCity"));
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #postalLbl")).append(jQuery("#addDemographicTbl #postalCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithProvince"));
-
- jQuery("#addDemographicTbl #postalLbl").css("padding-bottom", "1em");
- jQuery("#addDemographicTbl #postalCell").css("padding-bottom", "1em");
-
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #emailLbl")).append(jQuery("#addDemographicTbl #emailCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithPostal"));
-
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #phoneLbl")).append(jQuery("#addDemographicTbl #phoneCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithEmail"));
- jQuery("#addDemographicTbl #ptStatusLbl").insertAfter(jQuery("#addDemographicTbl #phoneCell"));
- jQuery("#addDemographicTbl #ptStatusCell").insertAfter(jQuery("#addDemographicTbl #ptStatusLbl"));
-
- jQuery("#addDemographicTbl #phoneLbl").css("padding-bottom", "1em");
- jQuery("#addDemographicTbl #phoneCell").css("padding-bottom", "1em");
-
- jQuery("#addDemographicTbl #ptStatusLbl").css("padding-bottom", "1em");
- jQuery("#addDemographicTbl #ptStatusCell").css("padding-bottom", "1em");
-
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #alertLbl")).append(jQuery("#addDemographicTbl #alertCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithPhone"));
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #notesLbl")).append(jQuery("#addDemographicTbl #notesCell"))).insertAfter(jQuery("#addDemographicTbl #rowWithAlert"));
-
- jQuery("#addDemographicTbl #alertCell").attr("colspan", "3");
- jQuery("#addDemographicTbl #notesCell").attr("colspan", "3");
-
- jQuery(jQuery("
").append(jQuery("#addDemographicTbl #waitListTbl"))).insertAfter(jQuery("#addDemographicTbl #rowWithNotes"));
-
- jQuery("#addDemographicTbl #notesLbl").css("padding-bottom", "1em");
- jQuery("#addDemographicTbl #notesCell").css("padding-bottom", "1em");
-
- jQuery("#addDemographicTbl #languageLbl").css("display", "none");
- jQuery("#addDemographicTbl #languageCell").css("display", "none");
-
- jQuery("#addDemographicTbl #titleLbl").css("display", "none");
- jQuery("#addDemographicTbl #titleCell").css("display", "none");
-
- jQuery("#addDemographicTbl #spokenLbl").css("display", "none");
- jQuery("#addDemographicTbl #spokenCell").css("display", "none");
-
- jQuery("#addDemographicTbl #phoneWorkLbl").css("display", "none");
- jQuery("#addDemographicTbl #phoneWorkCell").css("display", "none");
-
- jQuery("#addDemographicTbl #phoneCellLbl").css("display", "none");
- jQuery("#addDemographicTbl #phoneCellCell").css("display", "none");
-
- jQuery("#addDemographicTbl #newsletterLbl").css("display", "none");
- jQuery("#addDemographicTbl #newsletterCell").css("display", "none");
-
- jQuery("#addDemographicTbl #myOscarLbl").css("display", "none");
- jQuery("#addDemographicTbl #myOscarCell").css("display", "none");
-
- jQuery("#addDemographicTbl #countryLbl").css("display", "none");
- jQuery("#addDemographicTbl #countryCell").css("display", "none");
-
- jQuery("#addDemographicTbl #sinNoLbl").css("display", "none");
- jQuery("#addDemographicTbl #sinNoCell").css("display", "none");
-
- jQuery("#addDemographicTbl #cytologyLbl").css("display", "none");
- jQuery("#addDemographicTbl #cytologyCell").css("display", "none");
-
- jQuery("#addDemographicTbl #demoDoctorLbl").css("display", "none");
- jQuery("#addDemographicTbl #demoDoctorCell").css("display", "none");
-
- jQuery("#addDemographicTbl #nurseLbl").css("display", "none");
- jQuery("#addDemographicTbl #nurseCell").css("display", "none");
-
- jQuery("#addDemographicTbl #midwifeLbl").css("display", "none");
- jQuery("#addDemographicTbl #midwifeCell").css("display", "none");
-
- jQuery("#addDemographicTbl #residentLbl").css("display", "none");
- jQuery("#addDemographicTbl #residentCell").css("display", "none");
-
- jQuery("#addDemographicTbl #referralDocLbl").css("display", "none");
- jQuery("#addDemographicTbl #referralDocCell").css("display", "none");
-
- jQuery("#addDemographicTbl #referralDocNoLbl").css("display", "none");
- jQuery("#addDemographicTbl #referralDocNoCell").css("display", "none");
-
- jQuery("#addDemographicTbl #rosterDateLbl").css("display", "none");
- jQuery("#addDemographicTbl #rosterDateCell").css("display", "none");
-
- jQuery("#addDemographicTbl #joinDateLbl").css("display", "none");
- jQuery("#addDemographicTbl #joinDateCell").css("display", "none");
-
- jQuery("#addDemographicTbl #endDateLbl").css("display", "none");
- jQuery("#addDemographicTbl #endDateCell").css("display", "none");
-
- jQuery("#addDemographicTbl #chart_no").attr("tabindex", "1");
- jQuery("#addDemographicTbl #last_name").attr("tabindex", "2");
- jQuery("#addDemographicTbl #first_name").attr("tabindex", "3");
- jQuery("#addDemographicTbl #sex").attr("tabindex", "4");
- jQuery("#addDemographicTbl #year_of_birth").attr("tabindex", "5");
- jQuery("#addDemographicTbl #month_of_birth").attr("tabindex", "6");
- jQuery("#addDemographicTbl #date_of_birth").attr("tabindex", "7");
- jQuery("#addDemographicTbl #address").attr("tabindex", "8");
- jQuery("#addDemographicTbl #city").attr("tabindex", "9");
- jQuery("#addDemographicTbl #province").attr("tabindex", "10");
- jQuery("#addDemographicTbl #postal").attr("tabindex", "11");
- jQuery("#addDemographicTbl #email").attr("tabindex", "12");
- jQuery("#addDemographicTbl #phone").attr("tabindex", "13");
- jQuery("#addDemographicTbl #hPhoneExt").attr("tabindex", "14");
- jQuery("#addDemographicTbl #hin").attr("tabindex", "15");
- jQuery("#addDemographicTbl #ver").attr("tabindex", "16");
- jQuery("#addDemographicTbl #hc_type").attr("tabindex", "17");
- jQuery("#addDemographicTbl #roster_status").attr("tabindex", "18");
- jQuery("#addDemographicTbl #eff_date_year").attr("tabindex", "19");
- jQuery("#addDemographicTbl #eff_date_month").attr("tabindex", "20");
- jQuery("#addDemographicTbl #eff_date_date").attr("tabindex", "21");
- jQuery("#addDemographicTbl #hc_renew_date_year").attr("tabindex", "22");
- jQuery("#addDemographicTbl #hc_renew_date_month").attr("tabindex", "23");
- jQuery("#addDemographicTbl #hc_renew_date_date").attr("tabindex", "24");
- jQuery("#addDemographicTbl #patient_status").attr("tabindex", "25");
- jQuery("#addDemographicTbl #cust3").attr("tabindex", "26");
- jQuery("#addDemographicTbl #content").attr("tabindex", "27");
- jQuery("#addDemographicTbl #name_list_id").attr("tabindex", "28");
- jQuery("#addDemographicTbl #waiting_list_note").attr("tabindex", "29");
- jQuery("#addDemographicTbl #waiting_list_referral_date").attr("tabindex", "30");
- jQuery("#addDemographicTbl #btnAddRecord").attr("tabindex", "31");
- jQuery("#addDemographicTbl #btnSwipeCard").attr("tabindex", "32");
- jQuery("#addDemographicTbl #btnCancel").attr("tabindex", "33");
-
- //Set Default Family Doctor change XXXXXX to provider number of default doctor
- jQuery("#addDemographicTbl #docXXXXXX").attr("selected", "selected");
-
- //Set default city (in this case, London)
- jQuery("#addDemographicTbl #city").val("London");
-
- //dont prefix phone number by default
- jQuery("#addDemographicTbl #phone").val("");
-
- jQuery("form#adddemographic").submit(function () {
-
- if (!jQuery("#addDemographicTbl #chart_no").val()) {
- alert("Student Number must be completed");
- return false;
- }
-
- if (!jQuery("#addDemographicTbl #phone").val() && !jQuery("#addDemographicTbl #email").val()) {
- alert("Either a phone number of email address must be completed");
- return false;
- }
-
- if (jQuery("#addDemographicTbl #email").val() && !isValidEmailAddress(jQuery("#addDemographicTbl #email").val())) {
- alert("Invalid email address format. Please correct");
- return false;
- }
-
- });
-
- function isValidEmailAddress(emailAddress) {
- var pattern = new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);
- return pattern.test(emailAddress);
- }
-
-
- jQuery("#chart_no").focus();
- jQuery("#chart_no").select();
- window.resizeTo(1250, 800);
-});
diff --git a/src/main/webapp/js/custom/westernu/billingInvoice.js b/src/main/webapp/js/custom/westernu/billingInvoice.js
deleted file mode 100644
index ab2768266ac..00000000000
--- a/src/main/webapp/js/custom/westernu/billingInvoice.js
+++ /dev/null
@@ -1,6 +0,0 @@
-jQuery(document).ready(function () {
- jQuery("#ptDemoNo").hide();
- jQuery("#ptGender").hide();
- jQuery("#ptDOB").hide();
- jQuery("#ptHin").hide();
-});
diff --git a/src/main/webapp/js/custom/westernu/billingreview.js b/src/main/webapp/js/custom/westernu/billingreview.js
deleted file mode 100644
index 1e04e10a787..00000000000
--- a/src/main/webapp/js/custom/westernu/billingreview.js
+++ /dev/null
@@ -1,23 +0,0 @@
-jQuery(document).ready(function () {
- var url = ctx + "/BillingONReview.do";
- jQuery.ajax({
- url: url,
- dataType: 'json',
- data: {method: "getDemographic", demographicNo: demographicNo},
- success: function (data) {
- jQuery("textarea#billTo").val(data.firstName + " " + data.lastName + "\n" + data.address + "\n" + data.city + ", " + data.province + "\n" + data.postal + "\nEmail: " + data.email + "\nTel: " + data.phone + "\n\nStudent ID: " + data.chartNo);
- }
-
- });
- jQuery.ajax({
- url: url,
- dataType: 'json',
- data: {method: "getClinic"},
- success: function (data) {
- jQuery("textarea#remitTo").val(data.clinicName + "\n" + data.clinicAddress + "\n" + data.clinicCity + ", " + data.clinicProvince + "\n" + data.clinicPostal + "\nTel: 519-661-2111 x11111");
- }
-
- });
- jQuery("#settlePrintBtn").css("display", "none");
-
-});
diff --git a/src/main/webapp/js/custom/westernu/master.js b/src/main/webapp/js/custom/westernu/master.js
deleted file mode 100644
index 3c1456cb63b..00000000000
--- a/src/main/webapp/js/custom/westernu/master.js
+++ /dev/null
@@ -1,2 +0,0 @@
-jQuery(document).ready(function () {
-});
diff --git a/src/main/webapp/js/custom/westernu/ticklerMain.js b/src/main/webapp/js/custom/westernu/ticklerMain.js
index f9c11ac991f..71d6c4ba54d 100644
--- a/src/main/webapp/js/custom/westernu/ticklerMain.js
+++ b/src/main/webapp/js/custom/westernu/ticklerMain.js
@@ -1,4 +1,3 @@
jQuery(document).ready(function () {
jQuery("#checkAllLink").hide();
});
-
diff --git a/src/main/webapp/js/demographicProviderAutocomplete.js b/src/main/webapp/js/demographicProviderAutocomplete.js
index 6e8ecbb11f1..182e7414c86 100644
--- a/src/main/webapp/js/demographicProviderAutocomplete.js
+++ b/src/main/webapp/js/demographicProviderAutocomplete.js
@@ -8,18 +8,14 @@ var highlightMatch = function (full, snippet, matchindex) {
full.substring(matchindex + snippet.length);
};
var resultFormatter2 = function (oResultData, sQuery, sResultMatch) {
- //console.log(oResultData);
var query = sQuery.toLowerCase(),
fname = oResultData[0],
dob = oResultData[1],
status = oResultData[3],
fnameMatchIndex = fname.toLowerCase().indexOf(query),
displayfname = '';
- //oscarLog("in resultFormatter2");
- //oscarLog(oResultData);
if (fnameMatchIndex > -1) {
displayfname = highlightMatch(fname, query, fnameMatchIndex);
- //oscarLog("displayfname in if="+displayfname);
} else {
displayfname = fname;
}
@@ -28,7 +24,6 @@ var resultFormatter2 = function (oResultData, sQuery, sResultMatch) {
};
var resultFormatter = function (oResultData, sQuery, sResultMatch) {
- //console.log(oResultData);
var query = sQuery.toLowerCase(),
fname = oResultData[1],
lname = oResultData[2],
@@ -54,7 +49,6 @@ var resultFormatter = function (oResultData, sQuery, sResultMatch) {
};
var resultFormatter3 = function (oResultData, sQuery, sResultMatch) {
- //console.log(oResultData);
var query = sQuery.toLowerCase(),
fname = oResultData[1],
lname = oResultData[2],
@@ -98,4 +92,4 @@ function removeProv(th) {
var ele = th.up();
ele.remove();
-}
\ No newline at end of file
+}
diff --git a/src/main/webapp/js/documentDescriptionTypeahead.js b/src/main/webapp/js/documentDescriptionTypeahead.js
index d2450169d53..9602f7b0bba 100644
--- a/src/main/webapp/js/documentDescriptionTypeahead.js
+++ b/src/main/webapp/js/documentDescriptionTypeahead.js
@@ -9,7 +9,6 @@ var highlightMatch = function (full, snippet, matchIndex) {
};
var formatDocumentDescriptionResults = function (oResultData, sQuery, sResultMatch) {
- //console.log(oResultData);
var query = sQuery.toLowerCase(),
fname = oResultData[1],
lname = oResultData[2],
@@ -70,4 +69,4 @@ function checkDesc() {
break;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/webapp/js/dxJSONCodeSearch.js b/src/main/webapp/js/dxJSONCodeSearch.js
index 5e9fb07aedf..cc793251390 100644
--- a/src/main/webapp/js/dxJSONCodeSearch.js
+++ b/src/main/webapp/js/dxJSONCodeSearch.js
@@ -106,4 +106,3 @@ function bindDxJSONEvents() {
jQuery(document).ready(function () {
bindDxJSONEvents();
})
-
diff --git a/src/main/webapp/js/fg.menu.js b/src/main/webapp/js/fg.menu.js
index cf930411962..6c3bb1920bf 100644
--- a/src/main/webapp/js/fg.menu.js
+++ b/src/main/webapp/js/fg.menu.js
@@ -126,7 +126,6 @@ function Menu(caller, options) {
;
caller
.addClass('fg-menu-open');
- // .addClass(options.callerOnState);
container.parent().show().click(function () {
menu.kill();
return false;
diff --git a/src/main/webapp/js/formBCAR2020Record.js b/src/main/webapp/js/formBCAR2020Record.js
index aaea36cc0d9..16e4acfc828 100644
--- a/src/main/webapp/js/formBCAR2020Record.js
+++ b/src/main/webapp/js/formBCAR2020Record.js
@@ -703,7 +703,6 @@ function valDate(dateBox, ds = dtCh) {
try {
var dateString = dateBox.value;
if (dateString === "") {
- // alert('dateString'+dateString);
return true;
}
var dt = dateString.split(ds);
@@ -1223,11 +1222,3 @@ const wtEnglish2Metric = function (obj) {
}
}
}
-
-
-
-
-
-
-
-
diff --git a/src/main/webapp/js/genericIntake.js b/src/main/webapp/js/genericIntake.js
index ff72104aef1..cf99441da29 100644
--- a/src/main/webapp/js/genericIntake.js
+++ b/src/main/webapp/js/genericIntake.js
@@ -61,7 +61,6 @@ function validBedCommunityProgram() {
var programId = Number(programIdStr);
if (programIdStr == "") {
- //alert( "Bed program is mandatory");
return false;
} else {
return true;
@@ -85,8 +84,6 @@ function validateEdit() {
return true;
}
- //$("form").validate({meta: "validate"});
-
var programIdEl = getElement('bedCommunityProgramId');
var programId = 0;
if (programIdEl != null) {
diff --git a/src/main/webapp/js/global.js b/src/main/webapp/js/global.js
index d8da5cf9939..9f4fe693259 100755
--- a/src/main/webapp/js/global.js
+++ b/src/main/webapp/js/global.js
@@ -167,4 +167,4 @@ function selectSelectListOption(selectList, optionValue) {
function getSelectListValue(selectList) {
return (selectList.options[selectList.selectedIndex].value);
-}
\ No newline at end of file
+}
diff --git a/src/main/webapp/js/hideexpand.js b/src/main/webapp/js/hideexpand.js
deleted file mode 100755
index 4fc77cdc989..00000000000
--- a/src/main/webapp/js/hideexpand.js
+++ /dev/null
@@ -1,207 +0,0 @@
-// our global vars
-var heightnow;
-var targetheight;
-var block;
-var slideinterval;
-var divheights = new Array();
-
-// the delay between the slide in/out, and a little inertia
-var inertiabase = 1;
-var inertiainc = 1;
-var slideintervalinc = 1;
-var inertiabaseoriginal = inertiabase;
-
-var closedSections = [];
-
-function getFormField() {
- return document.getElementById("closedSections");
-}
-
-function initSections() {
- var ssv = getFormField().value;
- closedSections = ssv.split(",");
- for (var i = 0; i < closedSections.length; i++) {
- var s = document.getElementById(closedSections[i]);
- if (s != null) document.getElementById(closedSections[i]).style.display = "none";
- }
-}
-
-function setup_slidey() {
-
- // detect whether the user has ie or not, how we get the height is different
- var useragent = navigator.userAgent.toLowerCase();
- var ie = ((useragent.indexOf('msie') != -1) && (useragent.indexOf('opera') == -1) && (useragent.indexOf('webtv') == -1));
- var divs = getElementsByClassName(document, "div", "slideblock");
-
- for (var i = 0; i < divs.length; i++) {
- // get the original height
- var baseheight = (ie) ? divs[i].offsetHeight + "px" : document.defaultView.getComputedStyle(divs[i], null).getPropertyValue('height', null);
-
- // explicitly display it (optional, you could use cookies to toggle whether to display it or not)
- divs[i].style.display = "block";
-
- // "save" our div height, because once it's display is set to none we can't get the original height again
- var d = new div();
- d.el = divs[i];
- d.ht = baseheight.substring(0, baseheight.indexOf("p"));
-
- // store our saved versoin
- divheights[i] = d;
- }
-
- initSections();
-
- touchColor();
-}
-
-// this is one of our divs, it just has a DOM reference to the element and the original height
-function div(_el, _ht) {
- this.el = _el;
- this.ht = _ht;
-}
-
-// this is our slidein function the interval uses, it keeps subtracting
-// from the height till it's 1px then it hides it
-function slidein() {
- if (heightnow > targetheight) {
- // reduce the height by intertiabase * inertiainc
- heightnow -= inertiabase;
-
- // increase the intertiabase by the amount to keep it changing
- inertiabase += inertiainc;
-
- // it's possible to exceed the height we want so we use a ternary - (condition) ? when true : when false;
- block.style.height = (heightnow > 1) ? heightnow + "px" : targetheight + "px";
- } else {
- // finished, so hide the div properly and kill the interval
- clearInterval(slideinterval);
- block.style.display = "none";
- }
-}
-
-// this is the function our slideout interval uses, it keeps adding
-// to the height till it's fully displayed
-function slideout() {
- if (heightnow < targetheight) {
- // increases the height by the inertia stuff
- heightnow += inertiabase;
-
- // increase the inertia stuff
- inertiabase += inertiainc;
-
- // it's possible to exceed the height we want so we use a ternary - (condition) ? when true : when false;
- block.style.height = (heightnow < targetheight) ? heightnow + "px" : targetheight + "px";
-
- } else {
- // finished, so make sure the height is what it's meant to be (inertia can make it off a little)
- // then kill the interval
- clearInterval(slideinterval);
- block.style.height = targetheight + "px";
- }
-}
-
-// returns the height of the div from our array of such things
-function divheight(d) {
- for (var i = 0; i < divheights.length; i++) {
- if (divheights[i].el == d) {
- return divheights[i].ht;
- }
- }
-}
-
-/*
- the getElementsByClassName function I pilfered from this guy. It's
- a useful function that'll return any/all tags with a specific css class.
-
- Written by Jonathan Snook, http://www.snook.ca/jonathan
- Add-ons by Robert Nyman, http://www.robertnyman.com
-*/
-function getElementsByClassName(oElm, strTagName, strClassName) {
- // first it gets all of the specified tags
- var arrElements = (strTagName == "*" && document.all) ? document.all : oElm.getElementsByTagName(strTagName);
-
- // then it sets up an array that'll hold the results
- var arrReturnElements = new Array();
-
- // some regex stuff you don't need to worry about
- strClassName = strClassName.replace(/\-/g, "\\-");
-
- var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
- var oElement;
-
- // now it iterates through the elements it grabbed above
- for (var i = 0; i < arrElements.length; i++) {
- oElement = arrElements[i];
-
- // if the class matches what we're looking for it ads to the results array
- if (oRegExp.test(oElement.className)) {
- arrReturnElements.push(oElement);
- }
- }
-
- // then it kicks the results back to us
- return (arrReturnElements)
-}
-
-function togglediv(t) {
-
- // reset our inertia base and interval
- inertiabase = inertiabaseoriginal;
- clearInterval(slideinterval);
-
- // get our block
- block = t.parentNode.nextSibling;
-
- // for mozilla, it doesn't like whitespace between elements
- if (block.className == undefined)
- block = t.parentNode.nextSibling.nextSibling;
-
- if (block.style.display == "none") {
- // link text
- // t.innerHTML = "Hide";
- for (var i = 0; i < closedSections.length; i++)
- if (closedSections[i] == block.id)
- closedSections.splice(i, 1);
- getFormField().value = closedSections.join(",");
-
- block.style.display = "block";
- block.style.height = "1px";
-
- // our goal and current height
- targetheight = divheight(block);
- heightnow = 1;
-
- // our interval
- slideinterval = setInterval(slideout, slideintervalinc);
- } else {
- // linkstext
- // t.innerHTML = "Show";
- closedSections.push(block.id);
- getFormField().value = closedSections.join(",");
-
- // our goal and current height
- targetheight = 1;
- heightnow = divheight(block);
-
- // our interval
- slideinterval = setInterval(slidein, slideintervalinc);
- }
-}
-
-function expandAll() {
- var divs = getElementsByClassName(document, "div", "slideblock");
- for (var i = 0; i < divs.length; i++) {
- divs[i].style.height = divheight(divs[i]);
- divs[i].style.display = "block";
- }
- getFormField().value = "";
-}
-
-function collapseAll() {
- var divs = getElementsByClassName(document, "div", "slideblock");
- getFormField().value = "";
- for (var i = 0; i < divs.length; i++) {
- divs[i].style.display = "none";
- getFormField().value += divs[i].id + ",";
- }
-}
diff --git a/src/main/webapp/js/history.js b/src/main/webapp/js/history.js
index 7fee25c70d1..dce7535c5b8 100644
--- a/src/main/webapp/js/history.js
+++ b/src/main/webapp/js/history.js
@@ -720,7 +720,6 @@
}
if (!api) {
- //
document[_a](eventPrefix + "click", function (e) {
var
event = e || window.event,
@@ -902,4 +901,4 @@
History.pushState = pushState;
-})(window, true, false, null);
\ No newline at end of file
+})(window, true, false, null);
diff --git a/src/main/webapp/js/jqplot/plugins/jqplot.pieRenderer.js b/src/main/webapp/js/jqplot/plugins/jqplot.pieRenderer.js
index dc93a2a021b..45a09da36f7 100644
--- a/src/main/webapp/js/jqplot/plugins/jqplot.pieRenderer.js
+++ b/src/main/webapp/js/jqplot/plugins/jqplot.pieRenderer.js
@@ -408,7 +408,6 @@
//see http://stackoverflow.com/questions/20221461/hidpi-retina-plot-drawing
var cw = parseInt(ctx.canvas.style.width);
var ch = parseInt(ctx.canvas.style.height);
- //
var w = cw - offx - 2 * this.padding;
var h = ch - offy - 2 * this.padding;
@@ -525,7 +524,6 @@
// dummy objects with properties so the plot will render.
// called with scope of axis object.
$.jqplot.PieAxisRenderer.prototype.init = function (options) {
- //
this.tickRenderer = $.jqplot.PieTickRenderer;
$.extend(true, this, options);
// I don't think I'm going to need _dataBounds here.
@@ -916,5 +914,3 @@
$.jqplot.PieTickRenderer.prototype.constructor = $.jqplot.PieTickRenderer;
})(jQuery);
-
-
\ No newline at end of file
diff --git a/src/main/webapp/js/jquery-1.9.1.js b/src/main/webapp/js/jquery-1.9.1.js
index 88105eda92b..7dec3941a96 100644
--- a/src/main/webapp/js/jquery-1.9.1.js
+++ b/src/main/webapp/js/jquery-1.9.1.js
@@ -982,7 +982,7 @@
return object;
}
- /*
+/*
* Create a callback list using the following parameters:
*
* options: an optional list of space-separated options that will change how
@@ -2713,7 +2713,7 @@
return false;
}
- /*
+/*
* Helper functions for managing events -- not part of the public interface.
* Props to Dean Edwards' addEvent library for many of the ideas.
*/
@@ -3691,7 +3691,7 @@
}
}
});
- /*!
+/*!
* Sizzle CSS Selector Engine
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license
@@ -4578,7 +4578,7 @@
},
"CHILD": function (match) {
- /* matches from matchExpr["CHILD"]
+ /* matches from matchExpr["CHILD"]
1 type (only|nth|...)
2 what (child|of-type)
3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
@@ -7443,7 +7443,7 @@
// Keep a copy of the old load method
_load = jQuery.fn.load,
- /* Prefilters
+ /* Prefilters
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
* 2) These are called:
* - BEFORE asking for a transport
@@ -7454,7 +7454,7 @@
*/
prefilters = {},
- /* Transports bindings
+ /* Transports bindings
* 1) key is the dataType
* 2) the catchall symbol "*" can be used
* 3) selection will start with transport dataType and THEN go to "*" if needed
@@ -7655,17 +7655,6 @@
processData: true,
async: true,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
accepts: {
"*": allTypes,
@@ -8126,7 +8115,7 @@
}
});
- /* Handles responses to an ajax request:
+/* Handles responses to an ajax request:
* - sets all responseXXX fields accordingly
* - finds the right dataType (mediates between content-type and expected dataType)
* - returns the corresponding response
@@ -8474,7 +8463,7 @@
// Create the request object
// (This is still attached to ajaxSettings for backward compatibility)
jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
+ /* Microsoft failed to properly
* implement the XMLHttpRequest in IE7 (can't request local files),
* so we use the ActiveXObject when it is available
* Additionally XMLHttpRequest can be disabled in IE7/IE8 so
diff --git a/src/main/webapp/js/jquery.autocomplete.js b/src/main/webapp/js/jquery.autocomplete.js
index c5b8804f083..69cadf4c918 100755
--- a/src/main/webapp/js/jquery.autocomplete.js
+++ b/src/main/webapp/js/jquery.autocomplete.js
@@ -228,7 +228,6 @@
});
words[wordAt] = v;
// TODO this should set the cursor to the right position, but it gets overriden somewhere
- //$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
v = words.join(options.multipleSeparator);
}
v += options.multipleSeparator;
@@ -810,4 +809,4 @@
}
};
-})(jQuery);
\ No newline at end of file
+})(jQuery);
diff --git a/src/main/webapp/js/jquery.fileDownload.js b/src/main/webapp/js/jquery.fileDownload.js
index a2b619a4614..f0c2b050fcc 100644
--- a/src/main/webapp/js/jquery.fileDownload.js
+++ b/src/main/webapp/js/jquery.fileDownload.js
@@ -12,7 +12,6 @@
var $ = jQuery.noConflict();
$.extend({
- //
//$.fileDownload('/path/to/url/', options)
// see directly below for possible 'options'
fileDownload: function (fileUrl, options) {
@@ -409,4 +408,3 @@ $.extend({
}
}
});
-
diff --git a/src/main/webapp/js/jquery.metadata.js b/src/main/webapp/js/jquery.metadata.js
index b83f5905a1d..dfd694ad554 100755
--- a/src/main/webapp/js/jquery.metadata.js
+++ b/src/main/webapp/js/jquery.metadata.js
@@ -119,4 +119,4 @@
return $.metadata.get(this[0], opts);
};
-})(jQuery);
\ No newline at end of file
+})(jQuery);
diff --git a/src/main/webapp/js/jquery.treeview.js b/src/main/webapp/js/jquery.treeview.js
index 5a9bcc21991..57d821b5e11 100644
--- a/src/main/webapp/js/jquery.treeview.js
+++ b/src/main/webapp/js/jquery.treeview.js
@@ -256,4 +256,4 @@
hitarea: "hitarea"
});
-})(jQuery);
\ No newline at end of file
+})(jQuery);
diff --git a/src/main/webapp/js/jquery.validate.js b/src/main/webapp/js/jquery.validate.js
index 7d69ab376c4..3d9a2fc2adc 100644
--- a/src/main/webapp/js/jquery.validate.js
+++ b/src/main/webapp/js/jquery.validate.js
@@ -1236,4 +1236,4 @@
});
}
});
-}(jQuery));
\ No newline at end of file
+}(jQuery));
diff --git a/src/main/webapp/js/loading-bar.js b/src/main/webapp/js/loading-bar.js
index 6040f224b71..4c21d0b721f 100644
--- a/src/main/webapp/js/loading-bar.js
+++ b/src/main/webapp/js/loading-bar.js
@@ -306,6 +306,6 @@
};
- }]; //
+ }];
}); // wtf javascript. srsly
-})(); //
\ No newline at end of file
+})();
diff --git a/src/main/webapp/js/menuExpandable.js b/src/main/webapp/js/menuExpandable.js
index 73cfff5bcf9..4a53289f7e9 100755
--- a/src/main/webapp/js/menuExpandable.js
+++ b/src/main/webapp/js/menuExpandable.js
@@ -18,8 +18,6 @@ function initializeMenu(menuId, actuatorId) {
if (menu == null || actuator == null) return;
- //if (window.opera) return; // I'm too tired
-
actuator.parentNode.style.backgroundImage = "url(../images/plus.gif)";
//expand all nodes at init
diff --git a/src/main/webapp/js/messenger/messenger-theme-future.js b/src/main/webapp/js/messenger/messenger-theme-future.js
index dbbd1dee21f..55b7e7a9f24 100644
--- a/src/main/webapp/js/messenger/messenger-theme-future.js
+++ b/src/main/webapp/js/messenger/messenger-theme-future.js
@@ -43,4 +43,4 @@
Message: FutureMessage
};
-}).call(this);
\ No newline at end of file
+}).call(this);
diff --git a/src/main/webapp/js/oscar-alert.js b/src/main/webapp/js/oscar-alert.js
index 6a2615f8434..c06f210ff23 100644
--- a/src/main/webapp/js/oscar-alert.js
+++ b/src/main/webapp/js/oscar-alert.js
@@ -174,4 +174,3 @@ class OscarAlert {
return labels[this.alertType] || 'Unknown';
}
}
-
diff --git a/src/main/webapp/js/oscarRx.js b/src/main/webapp/js/oscarRx.js
deleted file mode 100644
index 48ca48f602d..00000000000
--- a/src/main/webapp/js/oscarRx.js
+++ /dev/null
@@ -1,1633 +0,0 @@
-/*
- *
- * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. *
- * This software is published under the GPL GNU General Public License.
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- *
- *
- *
- * This software was written for the
- * Department of Family Medicine
- * McMaster University
- * Hamilton
- * Ontario, Canada
- */
-
-function saveLinks(randNumber) {
- $('method_' + randNumber).onblur();
- $('route_' + randNumber).onblur();
- $('frequency_' + randNumber).onblur();
- $('minimum_' + randNumber).onblur();
- $('maximum_' + randNumber).onblur();
- $('duration_' + randNumber).onblur();
- $('durationUnit_' + randNumber).onblur();
-}
-
-
-function handleEnter(inField, ev) {
- var charCode;
- if (ev && ev.which)
- charCode = ev.which;
- else if (window.event) {
- ev = window.event;
- charCode = ev.keyCode;
- }
- var id = inField.id.split("_")[1];
- if (charCode == 13)
- showHideSpecInst('siAutoComplete_' + id);
-}
-
-//has to be in here, not prescribe.jsp for it to work in IE 6/7 and probably 8.
-function showHideSpecInst(elementId) {
- alert(elementId);
- if ($(elementId).is(":visible")) {
- $(elementId).hide("fold", 1000);
- } else {
- $(elementId).show("fold", 1000);
- }
-}
-
-function resetReRxDrugList() {
- var rand = Math.floor(Math.random() * 10001);
- var url = ctx + "/oscarRx/deleteRx.do?parameterValue=clearReRxDrugList";
- var data = "rand=" + rand;
- new Ajax.Request(url, {
- method: 'post', parameters: data, onSuccess: function (transport) {
- }
- });
-}
-
-function onPrint(cfgPage) {
- var docF = $('printFormDD');
-
- docF.action = "../form/createpdf?__title=Rx&__cfgfile=" + cfgPage + "&__template=a6blank";
- docF.target = "_blank";
- docF.submit();
- return true;
-}
-
-function buildRoute() {
-
- pickRoute = "";
-}
-
-
-function popupRxSearchWindow() {
- var winX = (document.all) ? window.screenLeft : window.screenX;
- var winY = (document.all) ? window.screenTop : window.screenY;
-
- var top = winY + 70;
- var left = winX + 110;
- var url = "searchDrug.do?rx2=true&searchString=" + $('searchString').value;
- popup2(600, 800, top, left, url, 'windowNameRxSearch<%=demoNo%>');
-
-}
-
-
-function popupRxReasonWindow(demographic, id) {
- var winX = (document.all) ? window.screenLeft : window.screenX;
- var winY = (document.all) ? window.screenTop : window.screenY;
-
- var top = winY + 70;
- var left = winX + 110;
- var url = "SelectReason.jsp?demographicNo=" + demographic + "&drugId=" + id;
- popup2(575, 650, top, left, url, 'windowNameRxReason<%=demoNo%>');
-
-}
-
-
-var highlightMatch = function (full, snippet, matchindex) {
- return "" + full.substring(0, matchindex) +
- "" + full.substr(matchindex, snippet.length) + "" + full.substring(matchindex + snippet.length) + "";
-};
-
-var highlightMatchInactiveMatchWord = function (full, snippet, matchindex) {
- //oscarLog(full+"--"+snippet+"--"+matchindex);
- return "" + "" + full.substring(0, matchindex) +
- "" + full.substr(matchindex, snippet.length) + "" + full.substring(matchindex + snippet.length) + "" + "";
-};
-var highlightMatchInactive = function (full, snippet, matchindex) {
- /* oscarLog(full+"--"+snippet+"--"+matchindex);
- oscarLog(" aa "+full.substring(0, matchindex) );
- oscarLog(" bb "+full.substr(matchindex, snippet.length) );
- oscarLog(" cc "+ full.substring(matchindex + snippet.length));*/
- /*return ""+""+full.substring(0, matchindex) +
- full.substr(matchindex, snippet.length) +full.substring(matchindex + snippet.length)+""+"";*/
- return "" + "" + full + "" + "";
-};
-var resultFormatter = function (oResultData, sQuery, sResultMatch) {
- //oscarLog("oResultData, sQuery, sResultMatch="+oResultData+"--"+sQuery+"--"+sResultMatch);
- //oscarLog("oResultData[0]="+oResultData[0]);
- //oscarLog("oResultData.name="+oResultData.name);
- //oscarLog("oResultData.name="+oResultData.id);
- var query = sQuery.toUpperCase();
- var drugName = oResultData[0];
-
- var mIndex = drugName.toUpperCase().indexOf(query);
- var display = '';
-
- if (mIndex > -1) {
- display = highlightMatch(drugName, query, mIndex);
- } else {
- display = drugName;
- }
- return display;
-};
-
-var resultFormatter2 = function (oResultData, sQuery, sResultMatch) {
- /*oscarLog("oResultData, sQuery, sResultMatch="+oResultData+"--"+sQuery+"--"+sResultMatch);
- oscarLog("oResultData[0]="+oResultData[0]);
- oscarLog("oResultData.name="+oResultData.name);
- oscarLog("oResultData.name="+oResultData.id);*/
- var query = sQuery.toUpperCase();
- var drugName = oResultData.name;
- var isInactive = oResultData.isInactive;
- //oscarLog("isInactive="+isInactive);
-
- var mIndex = drugName.toUpperCase().indexOf(query);
- var display = '';
- if (mIndex > -1 && (isInactive == 'true' || isInactive == true)) { //match and inactive
- display = highlightMatchInactiveMatchWord(drugName, query, mIndex);
- } else if (mIndex > -1 && (isInactive == 'false' || isInactive == false || isInactive == undefined || isInactive == null)) { //match and active
- display = highlightMatch(drugName, query, mIndex);
- } else if (mIndex <= -1 && (isInactive == 'true' || isInactive == true)) {//no match and inactive
- display = highlightMatchInactive(drugName, query, mIndex);
- } else {//active and no match
- display = drugName;
- }
- return display;
-};
-
-
-addEvent(window, "load", sortables_init);
-
-var SORT_COLUMN_INDEX;
-
-function sortables_init() {
- // Find all tables with class sortable and make them sortable
-
- if (!document.getElementsByTagName) return;
-
- tbls = document.getElementsByTagName("table");
-
- for (ti = 0; ti < tbls.length; ti++) {
- thisTbl = tbls[ti];
-
- if (((' ' + thisTbl.className + ' ').indexOf("sortable") != -1) && (thisTbl.id)) {
- //initTable(thisTbl.id);
- ts_makeSortable(thisTbl);
- }
- }
-}
-
-function ts_makeSortable(table) {
- oscarLog('making ' + table + ' sortable');
- if (table.rows && table.rows.length > 0) {
- var firstRow = table.rows[0];
- }
- if (!firstRow) return;
- oscarLog('Gets past here');
-
- // We have a first row: assume it's the header, and make its contents clickable links
- for (var i = 0; i < firstRow.cells.length; i++) {
- var cell = firstRow.cells[i];
- var txt = ts_getInnerText(cell);
- cell.innerHTML = '';
- }
-}
-
-function ts_getInnerText(el) {
- if (typeof el == "string") return el;
- if (typeof el == "undefined") {
- return el
- }
- ;
- if (el.innerText) return el.innerText; //Not needed but it is faster
- var str = "";
-
- var cs = el.childNodes;
- var l = cs.length;
- for (var i = 0; i < l; i++) {
- switch (cs[i].nodeType) {
- case 1: //ELEMENT_NODE
- str += ts_getInnerText(cs[i]);
- break;
- case 3: //TEXT_NODE
- str += cs[i].nodeValue;
- break;
- }
- }
- return str;
-}
-
-function ts_resortTable(lnk, clid) {
- // get the span
- var span;
- for (var ci = 0; ci < lnk.childNodes.length; ci++) {
- if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci];
- }
- var spantext = ts_getInnerText(span);
- var td = lnk.parentNode;
- var column = clid;
- var table = getParent(td, 'TABLE');
-
- // Work out a type for the column
- if (table.rows.length <= 1) return;
-
-
- var itm = ts_getInnerText(table.rows[1].cells[column]).trim();
- sortfn = ts_sort_caseinsensitive;
- if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) sortfn = ts_sort_date;
- if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) sortfn = ts_sort_date;
- if (itm.match(/^[£$]/)) sortfn = ts_sort_currency;
- if (itm.match(/^[\d\.]+$/)) sortfn = ts_sort_numeric;
- SORT_COLUMN_INDEX = column;
- var firstRow = new Array();
- var newRows = new Array();
- for (i = 0; i < table.rows[0].length; i++) {
- firstRow[i] = table.rows[0][i];
- }
- for (j = 1; j < table.rows.length; j++) {
- newRows[j - 1] = table.rows[j];
- }
-
- newRows.sort(sortfn);
-
- if (span.getAttribute("sortdir") == 'down') {
- ARROW = ' ↑';
- newRows.reverse();
- span.setAttribute('sortdir', 'up');
- } else {
- ARROW = ' ↓';
- span.setAttribute('sortdir', 'down');
- }
-
- // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones
- // don't do sortbottom rows
- for (i = 0; i < newRows.length; i++) {
- if (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) table.tBodies[0].appendChild(newRows[i]);
- }
- // do sortbottom rows only
- for (i = 0; i < newRows.length; i++) {
- if (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) table.tBodies[0].appendChild(newRows[i]);
- }
-
- // Delete any other arrows there may be showing
- var allspans = document.getElementsByTagName("span");
- for (var ci = 0; ci < allspans.length; ci++) {
- if (allspans[ci].className == 'sortarrow') {
- if (getParent(allspans[ci], "table") == getParent(lnk, "table")) { // in the same table as us?
- allspans[ci].innerHTML = '';
- }
- }
- }
-
- span.innerHTML = ARROW;
-}
-
-function getParent(el, pTagName) {
- if (el == null) return null;
- else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase()) // Gecko bug, supposed to be uppercase
- return el;
- else
- return getParent(el.parentNode, pTagName);
-}
-
-function ts_sort_date(a, b) {
- // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX
- aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
- bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
- if (aa.length == 10) {
- dt1 = aa.substr(6, 4) + aa.substr(3, 2) + aa.substr(0, 2);
- } else {
- yr = aa.substr(6, 2);
- if (parseInt(yr) < 50) {
- yr = '20' + yr;
- } else {
- yr = '19' + yr;
- }
- dt1 = yr + aa.substr(3, 2) + aa.substr(0, 2);
- }
- if (bb.length == 10) {
- dt2 = bb.substr(6, 4) + bb.substr(3, 2) + bb.substr(0, 2);
- } else {
- yr = bb.substr(6, 2);
- if (parseInt(yr) < 50) {
- yr = '20' + yr;
- } else {
- yr = '19' + yr;
- }
- dt2 = yr + bb.substr(3, 2) + bb.substr(0, 2);
- }
- if (dt1 == dt2) return 0;
- if (dt1 < dt2) return -1;
- return 1;
-}
-
-function ts_sort_currency(a, b) {
- aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g, '');
- bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g, '');
- return parseFloat(aa) - parseFloat(bb);
-}
-
-function ts_sort_numeric(a, b) {
- aa = parseFloat(ts_getInnerText(a.cells[SORT_COLUMN_INDEX]));
- if (isNaN(aa)) aa = 0;
- bb = parseFloat(ts_getInnerText(b.cells[SORT_COLUMN_INDEX]));
- if (isNaN(bb)) bb = 0;
- return aa - bb;
-}
-
-function ts_sort_caseinsensitive(a, b) {
- aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).toLowerCase();
- bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).toLowerCase();
- if (aa == bb) return 0;
- if (aa < bb) return -1;
- return 1;
-}
-
-function ts_sort_default(a, b) {
- aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
- bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
- if (aa == bb) return 0;
- if (aa < bb) return -1;
- return 1;
-}
-
-
-function addEvent(elm, evType, fn, useCapture)
-// addEvent and removeEvent
-// cross-browser event handling for IE5+, NS6 and Mozilla
-// By Scott Andrew
-{
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- } else if (elm.attachEvent) {
- var r = elm.attachEvent("on" + evType, fn);
- return r;
- } else {
- alert("Handler could not be removed");
- }
-}
-
-function checkFav() {
- //oscarLog("****** in checkFav");
- var usefav = '<%=usefav%>';
- var favid = '<%=favid%>';
- if (usefav == "true" && favid != null && favid != 'null') {
- //oscarLog("****** favid "+favid);
- useFav2(favid);
- } else {
- }
-}
-
-//not used , represcribe a drug
-function represcribeOnLoad(drugId) {
- var data = "drugId=" + drugId + "&rand=" + Math.floor(Math.random() * 10001);
- var url = ctx + "/oscarRx/rePrescribe2.do?method=saveReRxDrugIdToStash";
- new Ajax.Updater('rxText', url, {
- method: 'get', parameters: data, evalScripts: true, insertion: Insertion.Bottom,
- onSuccess: function (transport) {
- }
- });
-
-}
-
-
-function moveDrugDown(drugId, swapDrugId, demographicNo) {
- new Ajax.Request(ctx + '/oscarRx/reorderDrug.do?method=update&direction=down&drugId=' + drugId + '&swapDrugId=' + swapDrugId + '&demographicNo=' + demographicNo + "&rand=" + Math.floor(Math.random() * 10001), {
- method: 'get',
- onSuccess: function (transport) {
- callReplacementWebService("ListDrugs.jsp", 'drugProfile');
- resetReRxDrugList();
- resetStash();
- }
- });
-}
-
-function moveDrugUp(drugId, swapDrugId, demographicNo) {
- new Ajax.Request(ctx + '/oscarRx/reorderDrug.do?method=update&direction=up&drugId=' + drugId + '&swapDrugId=' + swapDrugId + '&demographicNo=' + demographicNo + "&rand=" + Math.floor(Math.random() * 10001), {
- method: 'get',
- onSuccess: function (transport) {
- callReplacementWebService("ListDrugs.jsp", 'drugProfile');
- resetReRxDrugList();
- resetStash();
- }
- });
-}
-
-function showPreviousPrints(scriptNo) {
- popupWindow(720, 700, 'ShowPreviousPrints.jsp?scriptNo=' + scriptNo, 'ShowPreviousPrints')
-}
-
-
-/**/
-
-function toggleStartDateUnknown(rand) {
- var cb = document.getElementById('startDateUnknown_' + rand);
- var txt = document.getElementById('rxDate_' + rand);
- if (cb.checked) {
-
- txt.disabled = true;
- txt.value = new Date();
- } else {
- txt.disabled = false;
- }
-}
-
-function emptyWrittenDate(rand) {
- var cb = document.getElementById('pastMed_' + rand);
- var txt = document.getElementById('writtenDate_' + rand);
-
- if (cb.checked) {
- txt.value = '0001-01-01';
- txt.disabled = true;
- } else {
- txt.disabled = false;
-
- }
-
-}
-
-//this is a SJHH specific feature
-function completeMedRec() {
- var ok = confirm("Are you sure you would like to mark the Med Rec as complete?");
- if (ok) {
- var url = ctx + "/oscarRx/completeMedRec.jsp?demographicNo=<%=bean.getDemographicNo()%>";
- var data;
- new Ajax.Request(url, {
- method: 'get', parameters: data, onSuccess: function (transport) {
- alert('Completed.')
- }
- });
- }
-}
-
-
-function changeLt(drugId) {
- if (confirm('') == true) {
- var data = "ltDrugId=" + drugId + "&rand=" + Math.floor(Math.random() * 10001);
- var url = ctx + "/oscarRx/WriteScript.do?parameterValue=changeToLongTerm";
- new Ajax.Request(url, {
- method: 'post', parameters: data, onSuccess: function (transport) {
- var json = transport.responseText.evalJSON();
- if (json != null && (json.success == 'true' || json.success == true)) {
- $("notLongTermDrug_" + drugId).innerHTML = "*";
- $("notLongTermDrug_" + drugId).setStyle({
- textDecoration: 'none',
- color: 'red'
- });
- $("notLongTermDrug_" + drugId).setAttribute("onclick", "");
- $("notLongTermDrug_" + drugId).setAttribute("href", "");
- } else {
- }
- }
- });
- }
-}
-
-function checkReRxLongTerm() {
- var url = window.location.href;
- var match = url.indexOf('ltm=true');
- if (match > -1) {
- RePrescribeLongTerm();
- }
-}
-
-function changeContainerHeight(ele) {
- var ss = $('searchString').value;
- ss = trim(ss);
- if (ss.length == 0)
- $('autocomplete_choices').setStyle({height: '0%'});
- else
- $('autocomplete_choices').setStyle({height: '100%'});
-}
-
-function addInstruction(content, randomId) {
- $('instructions_' + randomId).value = content;
- parseIntr($('instructions_' + randomId));
-}
-
-function addSpecialInstruction(content, randomId) {
- if ($('siAutoComplete_' + randomId).getStyle('display') == 'none') {
- Effect.BlindDown('siAutoComplete_' + randomId);
- } else {
- }
- $('siInput_' + randomId).value = content;
- $('siInput_' + randomId).setStyle({color: 'black'});
-}
-
-function hideMedHistory() {
- mb.hide();
-}
-
-var modalBox = function () {
- this.show = function (randomId, displaySRC, H) {
- if (!document.getElementById("xmaskframe")) {
- var divFram = document.createElement('iframe');
- divFram.setAttribute("id", "xmaskframe");
- divFram.setAttribute("name", "xmaskframe");
- //divFram.setAttribute("src","displayMedHistory.jsp?randomId="+randomId);
- divFram.setAttribute("allowtransparency", "false");
- document.body.appendChild(divFram);
- var divSty = document.getElementById("xmaskframe").style;
- divSty.position = "fixed";
- divSty.top = "0px";
- divSty.right = "0px";
- divSty.width = "390px"
- //divSty.border="solid";
- divSty.backgroundColor = "#F5F5F5";
- divSty.zIndex = "45";
- //divSty.cursor="move";
- }
- this.waitifrm = document.getElementById("xmaskframe");
-
- this.waitifrm.setAttribute("src", displaySRC + ".jsp?randomId=" + randomId);
- this.waitifrm.style.display = "block";
- this.waitifrm.style.height = H;
-
- $("dragifm").appendChild(this.waitifrm);
- Effect.Appear('xmaskframe');
- };
- this.hide = function () {
- Effect.Fade('xmaskframe');
-
- };
-}
-var mb = new modalBox();
-
-function displayMedHistory(randomId) {
- var data = "randomId=" + randomId;
- new Ajax.Request(ctx + "/oscarRx/WriteScript.do?parameterValue=listPreviousInstructions",
- {
- method: 'post', parameters: data, asynchronous: false, onSuccess: function (transport) {
- mb.show(randomId, 'displayMedHistory', '200px');
- }
- });
-}
-
-function displayInstructions(randomId) {
- var data = "randomId=" + randomId;
- mb.show(randomId, 'displayInstructions', '600px');
-
-}
-
-function updateProperty(elementId) {
- var randomId = elementId.split("_")[1];
- if (randomId != null) {
- var url = ctx + "/oscarRx/WriteScript.do?parameterValue=updateProperty";
- var data = "";
- if (elementId.match("prnVal_") != null)
- data = "elementId=" + elementId + "&propertyValue=" + $(elementId).value;
- else
- data = "elementId=" + elementId + "&propertyValue=" + $(elementId).innerHTML;
- data = data + "&rand=" + Math.floor(Math.random() * 10001);
- new Ajax.Request(url, {method: 'post', parameters: data});
- }
-}
-
-function lookNonEdittable(elementId) {
- $(elementId).className = '';
-}
-
-function lookEdittable(elementId) {
- $(elementId).className = 'highlight';
-}
-
-function setPrn(randomId) {
- var prnStr = $('prn_' + randomId).innerHTML;
- prnStr = prnStr.strip();
- var prnStyle = $('prn_' + randomId).getStyle('textDecoration');
- if (prnStr == 'prn' || prnStr == 'PRN' || prnStr == 'Prn') {
- if (prnStyle.match("line-through") != null) {
- $('prn_' + randomId).setStyle({textDecoration: 'none'});
- $('prnVal_' + randomId).value = true;
- } else {
- $('prn_' + randomId).setStyle({textDecoration: 'line-through'});
- $('prnVal_' + randomId).value = false;
- }
- }
-}
-
-function focusTo(elementId) {
- $(elementId).contentEditable = 'true';
- $(elementId).focus();
- //IE 6/7 bug..will this call onfocus twice?? may need to do browser check.
- document.getElementById(elementId).onfocus();
-
-}
-
-function updateSpecialInstruction(elementId) {
- var randomId = elementId.split("_")[1];
- var url = ctx + "/oscarRx/WriteScript.do?parameterValue=updateSpecialInstruction";
- var data = "randomId=" + randomId + "&specialInstruction=" + $(elementId).value;
- data = data + "&rand=" + Math.floor(Math.random() * 10001);
- new Ajax.Request(url, {method: 'post', parameters: data});
-}
-
-function changeText(elementId) {
- if ($(elementId).value == 'Enter Special Instruction') {
- $(elementId).value = "";
- $(elementId).setStyle({color: 'black'});
- } else if ($(elementId).value == '') {
- $(elementId).value = 'Enter Special Instruction';
- $(elementId).setStyle({color: 'gray'});
- }
-
-}
-
-function updateMoreLess(elementId) {
- if ($(elementId).innerHTML == 'more')
- $(elementId).innerHTML = 'less';
- else
- $(elementId).innerHTML = 'more';
-}
-
-function changeDrugName(randomId, origDrugName) {
- if (confirm('If you change the drug name and write your own drug, you will lose the following functionality:'
- + '\n * Known Dosage Forms / Routes'
- + '\n * Drug Allergy Information'
- + '\n * Drug-Drug Interaction Information'
- + '\n * Drug Information'
- + '\n\nAre you sure you wish to use this feature?') == true) {
-
- //call another function to bring up prescribe.jsp
- var url = ctx + "/oscarRx/WriteScript.do?parameterValue=normalDrugSetCustom";
- var customDrugName = $("drugName_" + randomId).getValue();
- var data = "randomId=" + randomId + "&customDrugName=" + customDrugName;
- new Ajax.Updater('rxText', url, {
- method: 'get',
- parameters: data,
- asynchronous: true,
- insertion: Insertion.Bottom,
- onSuccess: function (transport) {
- $('set_' + randomId).remove();
-
- }
- });
-
- if (MYDRUGREF_DS == "yes") {
- callReplacementWebService("GetmyDrugrefInfo.do?method=view", 'interactionsRxMyD');
- }
- } else {
- $("drugName_" + randomId).value = origDrugName;
- }
-}
-
-function resetStash() {
- var url = ctx + "/oscarRx/deleteRx.do?parameterValue=clearStash";
- var data = "rand=" + Math.floor(Math.random() * 10001);
- new Ajax.Request(url, {
- method: 'post', parameters: data, onSuccess: function (transport) {
- updateCurrentInteractions();
- }
- });
- $('rxText').innerHTML = "";//make pending prescriptions disappear.
- $("searchString").focus();
-}
-
-function iterateStash() {
- var url = ctx + "/oscarRx/WriteScript.do?parameterValue=iterateStash";
- var data = "rand=" + Math.floor(Math.random() * 10001);
- new Ajax.Updater('rxText', url, {
- method: 'get', parameters: data, asynchronous: true, evalScripts: true,
- insertion: Insertion.Bottom, onSuccess: function (transport) {
- updateCurrentInteractions();
- }
- });
-
-}
-
-function rxPageSizeSelect() {
- var ran_number = Math.round(Math.random() * 1000000);
- var url = "GetRxPageSizeInfo.do?method=view";
- var params = "demographicNo=<%=demoNo%>&rand=" + ran_number; //hack to get around ie caching the page
- new Ajax.Request(url, {method: 'post', parameters: params});
-}
-
-function reprint2(scriptNo) {
- var data = "scriptNo=" + scriptNo + "&rand=" + Math.floor(Math.random() * 10001);
- var url = ctx + "/oscarRx/rePrescribe2.do?method=reprint2";
- new Ajax.Request(url,
- {
- method: 'post', postBody: data,
- onSuccess: function (transport) {
- popForm2(scriptNo);
-
- }
- });
- return false;
-}
-
-
-function deletePrescribe(randomId) {
- var data = "randomId=" + randomId;
- var url = ctx + "/oscarRx/rxStashDelete.do?parameterValue=deletePrescribe";
- new Ajax.Request(url, {
- method: 'get', parameters: data, onSuccess: function (transport) {
- updateCurrentInteractions();
- if ($('deleteOnCloseRxBox').value == 'true') {
- deleteRxOnCloseRxBox(randomId);
- }
- }
- });
-}
-
-function deleteRxOnCloseRxBox(randomId) {
-
- var data = "randomId=" + randomId;
- var url = ctx + "/oscarRx/deleteRx.do?parameterValue=DeleteRxOnCloseRxBox";
- new Ajax.Request(url, {
- method: 'get', parameters: data, onSuccess: function (transport) {
- var json = transport.responseText.evalJSON();
- if (json != null) {
- var id = json.drugId;
- var rxDate = "rxDate_" + id;
- var reRx = "reRx_" + id;
- var del = "del_" + id;
- var discont = "discont_" + id;
- var prescrip = "prescrip_" + id;
- $(rxDate).style.textDecoration = 'line-through';
- $(reRx).style.textDecoration = 'line-through';
- $(del).style.textDecoration = 'line-through';
- $(discont).style.textDecoration = 'line-through';
- $(prescrip).style.textDecoration = 'line-through';
- }
- }
- });
-
-}
-
-function ThemeViewer() {
-
- var xy = Position.page($('drugProfile'));
- var x = (xy[0] + 200) + 'px';
- var y = xy[1] + 'px';
- var wid = ($('drugProfile').getWidth() - 300) + 'px';
- var styleStr = {left: x, top: y, width: wid};
-
- $('themeLegend').setStyle(styleStr);
- $('themeLegend').show();
-}
-
-function useFav2(favoriteId) {
- var randomId = Math.round(Math.random() * 1000000);
- var data = "favoriteId=" + favoriteId + "&randomId=" + randomId;
- var url = ctx + "/oscarRx/useFavorite.do?parameterValue=useFav2";
- new Ajax.Updater('rxText', url, {
- method: 'get',
- parameters: data,
- asynchronous: true,
- evalScripts: true,
- insertion: Insertion.Bottom
- });
-}
-
-function calculateRxData(randomId) {
- var dummie = parseIntr($('instructions_' + randomId));
- if (dummie)
- updateQty($('quantity_' + randomId));
-}
-
-function Delete2(element) {
-
- if (confirm('Are you sure you wish to delete the selected prescriptions?') == true) {
- var id_str = (element.id).split("_");
- var id = id_str[1];
- //var id=element.id;
- var rxDate = "rxDate_" + id;
- var reRx = "reRx_" + id;
- var del = "del_" + id;
- var discont = "discont_" + id;
- var prescrip = "prescrip_" + id;
-
- var url = ctx + "/oscarRx/deleteRx.do?parameterValue=Delete2";
- var data = "deleteRxId=" + element.id + "&rand=" + Math.floor(Math.random() * 10001);
- new Ajax.Request(url, {
- method: 'post', postBody: data, onSuccess: function (transport) {
- $(rxDate).style.textDecoration = 'line-through';
- $(reRx).style.textDecoration = 'line-through';
- $(del).style.textDecoration = 'line-through';
- $(discont).style.textDecoration = 'line-through';
- $(prescrip).style.textDecoration = 'line-through';
- }
- });
- }
- return false;
-}
-
-function checkAllergy(id, atcCode) {
- var url = ctx + "/oscarRx/getAllergyData.jsp";
- var data = "atcCode=" + atcCode + "&id=" + id + "&rand=" + Math.floor(Math.random() * 10001);
- new Ajax.Request(url, {
- method: 'post', postBody: data, onSuccess: function (transport) {
- var json = transport.responseText.evalJSON();
- if (json != null && json.DESCRIPTION != null && json.reaction != null) {
- var str = "Allergy: " + json.DESCRIPTION + " Reaction: " + json.reaction + " Severity of Reaction: " + json.severity;
- $('alleg_' + json.id).innerHTML = str;
- document.getElementById('alleg_tbl_' + json.id).style.display = 'block';
- }
- }
- });
-}
-
-function checkIfInactive(id, dinNumber) {
- var url = ctx + "/oscarRx/getInactiveDate.jsp";
- var data = "din=" + dinNumber + "&id=" + id + "&rand=" + Math.floor(Math.random() * 10001);
- new Ajax.Request(url, {
- method: 'post', postBody: data, onSuccess: function (transport) {
- var json = transport.responseText.evalJSON();
- if (json != null) {
- var str = "Inactive Drug Since: " + new Date(json.vec[0].time).toDateString();
- $('inactive_' + json.id).innerHTML = str;
- }
- }
- });
-}
-
-
-function Discontinue(event, element) {
- var id_str = (element.id).split("_");
- var id = id_str[1];
- var widVal = ($('drugProfile').getWidth() - 300);
- var widStr = widVal + 'px';
- var heightDrugProfile = $('discontinueUI').getHeight();
- var posx = 0, posy = 0;
- if (event.pageX || event.pageY) {
- posx = event.pageX;
- posx = posx - widVal;
- posy = event.pageY - heightDrugProfile / 2;
- posx = posx + 'px';
- posy = posy + 'px';
- } else if (event.clientX || event.clientY) {
- posx = event.clientX + document.body.scrollLeft
- + document.documentElement.scrollLeft;
- posx = posx - widVal;
- posy = event.clientY + document.body.scrollTop
- + document.documentElement.scrollTop - heightDrugProfile / 2;
- posx = posx + 'px';
- posy = posy + 'px';
- } else {
- var xy = Position.page($('drugProfile'));
- posx = (xy[0] + 200) + 'px';
- if (xy[1] >= 0)
- posy = xy[1] + 'px';
- else
- posy = 0 + 'px';
- }
- var styleStr = {left: posx, top: posy, width: widStr};
-
- var drugName = $('prescrip_' + id).innerHTML;
- $('discontinueUI').setStyle(styleStr);
- $('disDrug').innerHTML = drugName;
- $('discontinueUI').show();
- $('disDrugId').value = id;
-
-
-}
-
-function Discontinue2(id, reason, comment, drugSpecial) {
- var url = ctx + "/oscarRx/deleteRx.do?parameterValue=Discontinue";
- var demoNo = '<%=patient.getDemographicNo()%>';
- var data = "drugId=" + id + "&reason=" + reason + "&comment=" + comment + "&demoNo=" + demoNo + "&drugSpecial=" + drugSpecial + "&rand=" + Math.floor(Math.random() * 10001);
- new Ajax.Request(url, {
- method: 'post', postBody: data, onSuccess: function (transport) {
- var json = transport.responseText.evalJSON();
- $('discontinueUI').hide();
- $('rxDate_' + json.id).style.textDecoration = 'line-through';
- $('reRx_' + json.id).style.textDecoration = 'line-through';
- $('del_' + json.id).style.textDecoration = 'line-through';
- $('discont_' + json.id).innerHTML = json.reason;
- $('prescrip_' + json.id).style.textDecoration = 'line-through';
- }
- });
-
-}
-
-function updateCurrentInteractions() {
- new Ajax.Request("GetmyDrugrefInfo.do?method=findInteractingDrugList&rand=" + Math.floor(Math.random() * 10001), {
- method: 'get', onSuccess: function (transport) {
- new Ajax.Request("UpdateInteractingDrugs.jsp?rand=" + Math.floor(Math.random() * 10001), {
- method: 'get', onSuccess: function (transport) {
- var str = transport.responseText;
- str = str.replace('