From e775e8ea991616932ffbd5ddfe5cfcb081eca1e7 Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Sat, 24 Aug 2019 14:48:38 -0700 Subject: [PATCH] Bye Bye Frames, take 3 (#2608) --- custom/readme_search.txt | 40 - custom/search.php | 147 -- interface/billing/billing_report.php | 13 +- interface/billing/sl_eob_invoice.php | 2 +- interface/forms/eye_mag/js/eye_base.php | 61 +- interface/forms/eye_mag/php/eye_mag_functions.php | 9 +- interface/forms/newGroupEncounter/common.php | 16 +- interface/forms/newpatient/common.php | 16 +- interface/login/login.php | 32 +- interface/main/daemon_frame.php | 75 - interface/main/left_nav.php | 1915 -------------------- interface/main/main_screen.php | 135 +- interface/main/main_title.php | 201 -- interface/main/messages/js/reminder_appts.js | 4 +- interface/main/messages/messages.php | 12 +- interface/main/tabs/js/include_opener.js | 40 +- interface/main/tabs/js/tabs_view_model.js | 1 - interface/main/tabs/main.php | 8 - interface/orders/single_order_results.inc.php | 26 +- interface/patient_file/encounter/forms.php | 6 +- interface/patient_file/front_payment.php | 43 +- interface/patient_file/summary/demographics.php | 24 +- interface/patient_tracker/patient_tracker.php | 8 +- interface/themes/rtl.scss | 23 +- interface/themes/rtl_style_pdf.css | 21 - .../groupDetailsGeneralData.php | 7 - .../groupDetailsParticipants.php | 5 - library/dialog.js | 76 +- library/globals.inc.php | 11 - portal/_header.php | 1 - templates/documents/general_view.html | 12 +- version.php | 2 +- 32 files changed, 105 insertions(+), 2887 deletions(-) delete mode 100644 custom/readme_search.txt delete mode 100644 custom/search.php delete mode 100644 interface/main/daemon_frame.php delete mode 100644 interface/main/left_nav.php delete mode 100644 interface/main/main_title.php diff --git a/custom/readme_search.txt b/custom/readme_search.txt deleted file mode 100644 index 0a93a3023..000000000 --- a/custom/readme_search.txt +++ /dev/null @@ -1,40 +0,0 @@ -Submitted by Medical Information Integration, LLC July 2009 - -Enhanced Search and Facility based Filters - -Changes: - -- Added enhanced search filter -This enhancement adds two selections to the left_nav.php "Find" tool. -1) Any - entering data in the search text field and clicking 'Any' will match what's has been entered against -any field in the patient data table it not listed as 'unused' in the layout table -2) Filter - entering date in the search text field and clicking 'Filter' brings up a popup window with a list -fields in the patient data table that are not listed as 'unused' in the layout table. The user can then select -one or more fields that the search should compare to and the result will be filtered down to that. - -- Added patient search restriction to support multiple facilities using the same database instance but needing some -light restrictions on visibility. Mostly this keeps clinic A from having to look at Clinic B's patient when -doing a name lookup, so it's easier to make sure they get the right patient. -* The current patient_data table does not have an inherent way to assign a patient to a facility, so we used a configurable -user defined field (userlist3 in the example). Then we created a cross reference using the "Lists" tool that has a map -of the facility id and name. This allowed us to limit the selections to a subset of what is in the facility table. -We used the facility record ID as the List ID and entered an short title to match the internal clinic name. -* Search restrictions apply only to the default Name search at this time -* Facility is matched between the custom field identified below and the users default facility in the users table. -* Patients records that do not have a clinic ID in the indentified custom field are not restrictied - -- TO DO -* It could be enhanced to be more secure by adding a gacl role for access by user default facility. -* Filter check boxes should be persistent during a user session and ajax might be prettier than the popup window. -* Filter Search could use a "whole words only" option. Right now a search for 'male' will match both males and females. -* Admin restrictions are based solely on the user name 'admin'. This should be based on the gacl role of "administrator" - -Manual steps: -- To activate patient search restriction, you must add the following lines to interface/globals.php: - -// If these options are omitted, patient searches will not be restricted. -$GLOBALS['pt_restrict_field'] = "userlist3"; // Custom map to assigned facility ID# -$GLOBALS['pt_restrict_admin'] = true; // Should the admin user be restricted as well -$GLOBALS['pt_restrict_by_id'] = false; // Should lookup by ID (pubpid) be restricted - - diff --git a/custom/search.php b/custom/search.php deleted file mode 100644 index b58c7ec8f..000000000 --- a/custom/search.php +++ /dev/null @@ -1,147 +0,0 @@ - - -// 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. - - - -require_once("../interface/globals.php"); -?> - - - - - - - - -
- - - - - - - -
- : - - - - -
- - 0) { - echo "\n"; - } - - echo "\n"; - } - - echo ""; - echo " " . text($fieldTitle) . ""; - echo "\n"; - } - - $layoutCols = sqlStatement("SELECT field_id, title, description, group_id " - . "FROM layout_options " - . "WHERE form_id='DEM' " - . "AND field_id not like 'em\_%' AND uor != 0 " - . "ORDER BY group_id,seq"); - - echo ""; - - for ($iter=0; $row=sqlFetchArray($layoutCols); $iter++) { - $label = $row['title'] ? $row['title'] : $row['description']; - if (!$label) { - $label = $row['field_id']; - } - - echoFilterItem( - $iter, - $row['field_id'], - xl_layout_label($label) - ); - } - - echoFilterItem($iter++, 'pid', xl('Internal Identifier (pid)')); - - // Finish the row gracefully. - while ($iter++ % 3) { - echo "\n"; - } - - echo "\n"; - - // Write a final line to solicit an optional service code. - echo "\n"; - echo "\n"; - echo "\n"; - - echo "
 
"; - echo " " . - "" . xlt('Service Code') . " (" . - xlt('if entered, select only those who have had this service') . ")"; - echo "
"; - ?> - -
- - diff --git a/interface/billing/billing_report.php b/interface/billing/billing_report.php index 17cf79ed9..6ee636ddf 100644 --- a/interface/billing/billing_report.php +++ b/interface/billing/billing_report.php @@ -327,14 +327,8 @@ $partners = $x->_utility_array($x->x12_partner_factory()); encurl = 'patient_file/encounter/encounter_top.php?set_encounter=' + encodeURIComponent(enc) + '&pid=' + encodeURIComponent(pid); parent.left_nav.setPatient(pname, pid, pubpid, '', dobstr); - parent.left_nav.setEncounter(datestr, enc, 'enc'); parent.left_nav.loadFrame('enc2', 'enc', encurl); - - var othername = (window.name == 'RTop') ? 'RBot' : 'RTop'; - parent.left_nav.setEncounter(datestr, enc, othername); - parent.frames[othername].location.href = '../' + encurl; - } // Process a click to go to an patient. @@ -342,14 +336,9 @@ $partners = $x->_utility_array($x->x12_partner_factory()); top.restoreSession(); paturl = 'patient_file/summary/demographics_full.php?pid=' + encodeURIComponent(pid); parent.left_nav.setPatient(pname, pid, pubpid, '', dobstr); - parent.left_nav.loadFrame('ens1', 'enc', 'patient_file/history/encounters.php?pid=' + encodeURIComponent(pid)); parent.left_nav.loadFrame('dem1', 'pat', paturl); - - var othername = (window.name == 'RTop') ? 'RBot' : 'RTop'; - parent.frames[othername].location.href = '../' + paturl; - } function popMBO(pid, enc, mboid) { @@ -1110,7 +1099,7 @@ $oemr_ui = new OemrUI($arrOeUiSettings); $lhtml .= "" . xlt('Encounter') . " " . text(oeFormatShortDate($raw_encounter_date)) . ""; // Changed "To xxx" buttons to allow room for encounter date display 2/17/09 JCH diff --git a/interface/billing/sl_eob_invoice.php b/interface/billing/sl_eob_invoice.php index e3ccbf29c..c01e12840 100644 --- a/interface/billing/sl_eob_invoice.php +++ b/interface/billing/sl_eob_invoice.php @@ -738,7 +738,7 @@ $pdrow = sqlQuery("select billing_note from patient_data where pid = ? limit 1", - + diff --git a/interface/forms/eye_mag/js/eye_base.php b/interface/forms/eye_mag/js/eye_base.php index 5941370b8..6d3378312 100644 --- a/interface/forms/eye_mag/js/eye_base.php +++ b/interface/forms/eye_mag/js/eye_base.php @@ -922,7 +922,7 @@ function show_PRIOR_CANVAS_section(section, newValue) { var result = base+'/controller.php?document&retrieve&patient_id='+pid+'&document_id='+newValue+'&as_file=false'; var cp_forward = ''; var filler = "
: "+cp_forward+"
<?php echo xla("Loading prior image");?>...
"; - + $("#"+zone+"_canvas").addClass('nodisplay'); $("#"+zone+"_olddrawing").html(filler); $("#"+zone+"_olddrawing").removeClass('nodisplay'); @@ -1020,18 +1020,18 @@ function show_KB() { function editScripts(url) { var pid = $('#pid').val(); var AddScript = function () { - var iam = top.tab_mode ? top.frames.editScripts : window[0]; + var iam = top.frames.editScripts; iam.location.href = "/openemr/controller.php?prescription&edit&id=&pid="+pid }; var ListScripts = function () { - var iam = top.tab_mode ? top.frames.editScripts : window[0]; + var iam = top.frames.editScripts; iam.location.href = "/openemr/controller.php?prescription&list&id="+pid }; - + let title = 'Prescriptions'; let w = 810; w = 910; - + dlgopen(url, 'editScripts', w, 300, '', '', { buttons: [ {text: 'Add', close: false, style: 'primary btn-sm', click: AddScript}, @@ -2040,7 +2040,7 @@ function update_Pharma() { } }); } - + /** * Function to convert ophthalmic prescriptions between plus cylinder and minus cylinder @@ -2158,21 +2158,19 @@ function color_IOP(IOP){ } } function showpnotes(docid) { - if (top.tab_mode) { - let btnClose = 'Done'; - let url = base+'/interface/patient_file/summary/pnotes.php?docid=' + docid; - dlgopen(url, 'pno1', 'modal-xl', 500, '', '', { - buttons: [ - {text: btnClose, close: true, style: 'default btn-xs'} - ], - sizeHeight: 'auto', - allowResize: true, - allowDrag: true, - dialogId: '', - type: 'iframe' - }); - return false; - } + let btnClose = 'Done'; + let url = base+'/interface/patient_file/summary/pnotes.php?docid=' + docid; + dlgopen(url, 'pno1', 'modal-xl', 500, '', '', { + buttons: [ + {text: btnClose, close: true, style: 'default btn-xs'} + ], + sizeHeight: 'auto', + allowResize: true, + allowDrag: true, + dialogId: '', + type: 'iframe' + }); + return false; } function getTimeStamp() { var now = new Date(); @@ -2216,7 +2214,7 @@ $(function() { var allPanels = $('.building_blocks > dd').hide(); var allPanels2 = $('.building_blocks2 > dd').hide(); refresh_page(); - + // AUTO- CODING FEATURES check_CPT_92060(); check_exam_detail(); @@ -2899,7 +2897,7 @@ $(function() { if (new_section[1] =="ALL") { //click updates prefs too $('#EXAM_QP').trigger("click"); - + } else { $('#BUTTON_QP_'+new_section[1]).trigger("click"); } @@ -3419,7 +3417,7 @@ $("body").on("click","[name^='old_canvas']", function() { (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('lists', ?, ?, ?, '1', '0', '', '', '')"; $providerNAME = getProviderName($providerID); - + sqlStatement($query, array("Eye_defaults_$providerID","Eye Exam Defaults $providerNAME ",$seq)); $query = "INSERT INTO `list_options` (`list_id`, `option_id`, `title`,`notes`,`activity`,`seq`) VALUES ".$add_fields; sqlStatement($query); @@ -3987,7 +3985,7 @@ $("body").on("click","[name^='old_canvas']", function() { issue= value.match(/(.*)_(.*)/); if (issue[1] == "CLINICAL") { if (!$('#inc_PE').is(':checked')) { return; } - + var the_code=''; var the_codedesc=''; var the_codetext=''; @@ -4072,7 +4070,7 @@ $("body").on("click","[name^='old_canvas']", function() { show_PRIOR_CANVAS_section(zone, this.value); } else { $("#"+zone+"_canvas").removeClass('nodisplay'); - + $("#"+zone+"_olddrawing").addClass('nodisplay'); } }); @@ -4183,12 +4181,12 @@ $("body").on("click","[name^='old_canvas']", function() { } update_PREFS(); }); - + $(document).on('change','[name="visit_status"]', function (event) { var item = $( "input[type=radio][name=visit_status]:checked" ).val(); update_appt_status(item); }); - + $(document).on("click", "[name='visit_justifier']", function () { var d = $(this).data(); var item = d.justcode; @@ -4222,15 +4220,10 @@ $("body").on("click","[name^='old_canvas']", function() { }); build_IMPPLAN(obj.IMPPLAN_items); - $("[class='tabHide']").css("display","inline-block"); $('[id^="BUTTON_TAB_"]').on('click', function () { var item = this.id.match(/BUTTON_TAB_(.*)/)[1]; - + $('#tabs-left-'+item).addClass('ui-state-default'); $("#setting_"+item).val('0'); $("#"+item+'_1').addClass('nodisplay'); diff --git a/interface/forms/eye_mag/php/eye_mag_functions.php b/interface/forms/eye_mag/php/eye_mag_functions.php index 34c5da5d5..179f69013 100644 --- a/interface/forms/eye_mag/php/eye_mag_functions.php +++ b/interface/forms/eye_mag/php/eye_mag_functions.php @@ -3942,7 +3942,6 @@ function menu_overhaul_top($pid, $encounter, $title = "Eye Exam") /** * This is currently a floating div top with patient demographics and such. * Used in fullscreen mode at the top. - * Moving towards containing info similar to main_title.php. * * @param string $pid patient_id * @param string $encounter is the current encounter number @@ -3961,7 +3960,7 @@ function menu_overhaul_left($pid, $encounter) global $ref_data; global $ins_coA; global $ins_coB; - + /* * find out if the patient has a photo */ @@ -4030,7 +4029,7 @@ function menu_overhaul_left($pid, $encounter)
- +
@@ -4039,10 +4038,10 @@ function menu_overhaul_left($pid, $encounter) echo ", ".text($pcp_data['suffix']);} ?> - + diff --git a/interface/forms/newGroupEncounter/common.php b/interface/forms/newGroupEncounter/common.php index 83ec4bf86..648181417 100644 --- a/interface/forms/newGroupEncounter/common.php +++ b/interface/forms/newGroupEncounter/common.php @@ -123,21 +123,7 @@ ajax_bill_loc(pid,dte,facility); // Handler for Cancel clicked when creating a new encounter. // Show demographics or encounters list depending on what frame we're in. function cancelClickedNew() { - if (top.tab_mode) { - window.parent.left_nav.loadFrame('ens1', window.name, 'patient_file/history/encounters.php'); - } - var target = window; - while (target != top) { - if (target.name == 'RBot') { - target.parent.left_nav.loadFrame('ens1', window.name, 'patient_file/history/encounters.php'); - break; - } - else if (target.name == 'RTop') { - target.parent.left_nav.loadFrame('dem1', window.name, 'patient_file/summary/demographics.php'); - break; - } - target = target.parent; - } + window.parent.left_nav.loadFrame('ens1', window.name, 'patient_file/history/encounters.php'); return false; } diff --git a/interface/forms/newpatient/common.php b/interface/forms/newpatient/common.php index aaf9ecbeb..9f02180ff 100644 --- a/interface/forms/newpatient/common.php +++ b/interface/forms/newpatient/common.php @@ -160,21 +160,7 @@ require_once($GLOBALS['srcdir'] . "/validation/validation_script.js.php"); ?> // Handler for Cancel clicked when creating a new encounter. // Show demographics or encounters list depending on what frame we're in. function cancelClickedNew() { - if (top.tab_mode) { - window.parent.left_nav.loadFrame('ens1', window.name, 'patient_file/history/encounters.php'); - } - var target = window; - while (target != top) { - if (target.name == 'RBot') { - target.parent.left_nav.loadFrame('ens1', window.name, 'patient_file/history/encounters.php'); - break; - } - else if (target.name == 'RTop') { - target.parent.left_nav.loadFrame('dem1', window.name, 'patient_file/summary/demographics.php'); - break; - } - target = target.parent; - } + window.parent.left_nav.loadFrame('ens1', window.name, 'patient_file/history/encounters.php'); return false; } diff --git a/interface/login/login.php b/interface/login/login.php index 90ef14f4e..61c1a1749 100644 --- a/interface/login/login.php +++ b/interface/login/login.php @@ -38,23 +38,21 @@ require_once("../globals.php"); // // Build a list of valid entries $emr_app = array(); -if ($GLOBALS['new_tabs_layout']) { - $rs = sqlStatement( - "SELECT option_id, title,is_default FROM list_options - WHERE list_id=? and activity=1 ORDER BY seq, option_id", - array ('apps') - ); - if (sqlNumRows($rs)) { - while ($app = sqlFetchArray($rs)) { - $app_req = explode('?', trim($app['title'])); - if (! file_exists('../'.$app_req[0])) { - continue; - } - - $emr_app [trim($app ['option_id'])] = trim($app ['title']); - if ($app ['is_default']) { - $emr_app_def = $app ['option_id']; - } +$rs = sqlStatement( + "SELECT option_id, title,is_default FROM list_options + WHERE list_id=? and activity=1 ORDER BY seq, option_id", + array ('apps') +); +if (sqlNumRows($rs)) { + while ($app = sqlFetchArray($rs)) { + $app_req = explode('?', trim($app['title'])); + if (! file_exists('../'.$app_req[0])) { + continue; + } + + $emr_app [trim($app ['option_id'])] = trim($app ['title']); + if ($app ['is_default']) { + $emr_app_def = $app ['option_id']; } } } diff --git a/interface/main/daemon_frame.php b/interface/main/daemon_frame.php deleted file mode 100644 index 4e8d6ec58..000000000 --- a/interface/main/daemon_frame.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @author Brady Miller - * @copyright Copyright (c) 2006 Rod Roark - * @copyright Copyright (c) 2018 Brady Miller - * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 - */ - - - // Tell auth.inc that this is the daemon script; this is so that - // inactivity timeouts will still work, and to avoid logging an - // event every time we run. - $GLOBALS['DAEMON_FLAG'] = true; - - require_once("../globals.php"); - - $daemon_interval = 120; // Interval in seconds between reloads. - $colorh = '#ff0000'; // highlight color - $colorn = '#000000'; // normal color - - // Check if there are faxes in the recvq. - $faxcount = 0; -if ($GLOBALS['enable_hylafax']) { - $statlines = array(); - exec("faxstat -r -l -h " . escapeshellarg($GLOBALS['hylafax_server']), $statlines); - foreach ($statlines as $line) { - if (substr($line, 0, 1) == '-') { - ++$faxcount; - } - } -} - - $color_fax = $faxcount ? $colorh : $colorn; - - // Check if this user has any active patient notes assigned to them. - $row = sqlQuery("SELECT count(*) AS count FROM pnotes WHERE " . - "activity = 1 ". - " AND deleted != 1 ". // exlude ALL deleted notes - " AND assigned_to = ?", array($_SESSION['authUser'])); - $color_aun = $row['count'] ? $colorh : $colorn; - ?> - - - - - diff --git a/interface/main/left_nav.php b/interface/main/left_nav.php deleted file mode 100644 index 2f6bda7c6..000000000 --- a/interface/main/left_nav.php +++ /dev/null @@ -1,1915 +0,0 @@ - - * @author Brady Miller - * @copyright Copyright (c) 2006-2012 Rod Roark - * @copyright Copyright (c) 2018 Brady Miller - * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 - */ - - // This provides the left navigation frame. - // Following are notes as to what else was changed for this feature: - // - // * interface/main/main_screen.php: the top-level frameset. - // * interface/main/finder/patient_select.php: loads stuff when a new patient - // is selected. - // * interface/patient_file/summary/demographics.php: this is the first frame - // loaded when a new patient is chosen, and in turn sets the current pid and - // then loads the initial bottom frame. - // * interface/patient_file/summary/demographics_full.php: added support for - // setting a new pid, needed for going to demographics from billing. - // * interface/patient_file/summary/demographics_save.php: redisplay - // demographics.php and not the frameset. - // * interface/patient_file/encounter/encounter_bottom.php: new frameset for - // the selected encounter, mosting coding/billing stuff, cloned from - // patient_encounter.php. This will also self-load the superbill pages - // as requested. - // * interface/usergroup/user_info.php: removed Back link. - // * interface/main/onotes/office_comments.php: removed Back link target. - // * interface/main/onotes/office_comments_full.php: changed Back link. - // * interface/billing/billing_report.php: removed Back link; added logic - // to properly go to demographics or to an encounter when requested. - // * interface/new/new.php: removed Back link and revised form target. - // * interface/new/new_patient_save.php: modified to load the demographics - // page to the current frame instead of loading a new frameset. - // * interface/patient_file/history/history.php: target change. - // * interface/patient_file/history/history_full.php: target changes. - // * interface/patient_file/history/history_save.php: target change. - // * interface/patient_file/history/encounters.php: link/target changes. - // * interface/patient_file/encounter/encounter_top.php: another new frameset - // cloned from patient_encounter.php. - // * interface/patient_file/encounter/forms.php: link target removal. - // * interface/forms/newpatient/new.php, view.php, save.php: link/target - // changes. - // * interface/patient_file/summary/immunizations.php: removed back link. - // * interface/patient_file/summary/pnotes.php: changed link targets. - // * interface/patient_file/summary/pnotes_full.php: changed back link and - // added set_pid logic. - // * interface/patient_file/transaction/transactions.php: various changes. - // * interface/patient_file/transaction/add_transaction.php: new return js. - // * interface/patient_file/encounter/superbill_codes.php: target and link - // changes. - // * interface/patient_file/encounter/superbill_custom_full.php: target and - // link changes. - // * interface/patient_file/encounter/diagnosis.php: target changes. - // * interface/patient_file/encounter/diagnosis_full.php: target and link - // changes. - // * interface/main/authorizations/authorizations.php: link and target changes. - // * library/api.inc: url change. - // * interface/patient_file/summary/rx_frameset.php: new frameset. - // * interface/patient_file/summary/rx_left.php: new for prescriptions. - // * all encounter forms: remove all instances of "target=Main" and change - // all instances of "patient_encounter.php" to "encounter_top.php". - - // Our find_patient form, when submitted, invokes patient_select.php in the - // upper frame. When the patient is selected, demographics.php is invoked - // with the set_pid parameter, which establishes the new session pid and also - // calls the setPatient() function (below). In this case demographics.php - // will also load the summary frameset into the bottom frame, invoking our - // loadFrame() function. - // - // Similarly, we have the concept of selecting an encounter from the - // Encounters list, and then having that "stick" until some other encounter - // or a new encounter is chosen. We also have a navigation item for creating - // a new encounter. interface/patient_file/encounter/encounter_top.php - // supports set_encounter to establish an encounter. - // - // TBD: Include active_pid and/or active_encounter in relevant submitted - // form data, and add logic to the save routines to make sure they match - // the corresponding session values. - - -require_once("../globals.php"); -require_once($GLOBALS['fileroot']."/library/acl.inc"); -require_once($GLOBALS['fileroot']."/custom/code_types.inc.php"); -require_once($GLOBALS['fileroot']."/library/patient.inc"); -require_once($GLOBALS['fileroot']."/library/lists.inc"); -require_once($GLOBALS['fileroot']."/library/registry.inc"); -require_once $GLOBALS['srcdir'].'/ESign/Api.php'; -require_once $GLOBALS['srcdir'].'/user.inc'; - -use ESign\Api; -use OpenEMR\Common\Csrf\CsrfUtils; -use OpenEMR\Menu\MenuEvent; - -// Fetch user preferences saved from prior session -$uspfx = substr(__FILE__, strlen($GLOBALS['fileroot']."/")) . '.'; -$cb_top_chk = prevSetting($uspfx, 'cb_top', 'frame0_chk', 'checked'); -$cb_bot_chk = prevSetting($uspfx, 'cb_bot', 'frame1_chk', 'checked'); -$usrval = json_encode(array ( $cb_top_chk, $cb_bot_chk )); - -// This array defines the list of primary documents that may be -// chosen. Each element value is an array of 3 values: -// -// * Name to appear in the navigation table -// * Usage: 0 = global, 1 = patient-specific, 2 = encounter-specific, 3 = therapy group-specific, 4 = therapy group encounter - specific -// * The URL relative to the interface directory -// - -$primary_docs = array( -'cal' => array(xl('Calendar') , 0, 'main/main_info.php'), -'pfb' => array(xl('Patient Flow Board') , 0, '../interface/patient_tracker/patient_tracker.php?skip_timeout_reset=1'), -'rcb' => array(xl('Recall Board') , 0, '../interface/main/messages/messages.php?go=Recalls'), -'app' => array(xl('Portal Activity') , 0, '../myportal/index.php'), -'aop' => array(xl('Portal Dashboard') , 0, '../portal/patient/provider'), -'msg' => array(xl('Messages') , 0, 'main/messages/messages.php?form_active=1'), -'pwd' => array(xl('Password') , 0, 'usergroup/user_info.php'), -'mfa' => array(xl('MFA Management'), 0, 'usergroup/mfa_registrations.php'), -'prf' => array(xl('Preferences') , 0, 'super/edit_globals.php?mode=user'), -'ono' => array(xl('Ofc Notes') , 0, 'main/onotes/office_comments.php'), -'fax' => array(xl('Fax/Scan') , 0, 'fax/faxq.php'), -'adb' => array(xl('Addr Bk') , 0, 'usergroup/addrbook_list.php'), -'orl' => array(xl('Proc Prov') , 0, 'orders/procedure_provider_list.php'), -'ort' => array(xl('Proc Cat') , 0, 'orders/types.php'), -'orc' => array(xl('Proc Load') , 0, 'orders/load_compendium.php'), -'orb' => array(xl('Proc Bat') , 0, 'orders/orders_results.php?batch=1'), -'ore' => array(xl('E-Reports') , 0, 'orders/list_reports.php'), -'ppo' => array(xl('CMS Portal'), 0, 'cmsportal/list_requests.php'), -'cht' => array(xl('Chart Trk') , 0, '../custom/chart_tracker.php'), -'imp' => array(xl('Import') , 0, '../custom/import.php'), -'bil' => array(xl('Billing') , 0, 'billing/billing_report.php'), -'sup' => array(xl('Superbill') , 0, 'patient_file/encounter/superbill_custom_full.php'), -'aun' => array(xl('Authorizations'), 0, 'main/authorizations/authorizations.php'), -'new' => array(xl('New Pt') , 0, 'new/new.php'), -'ped' => array(xl('Patient Education'), 0, 'reports/patient_edu_web_lookup.php'), -'lab' => array(xl('Check Lab Results') , 0, 'orders/lab_exchange.php'), -'dem' => array(xl('Patient') , 1, "patient_file/summary/demographics.php"), -'his' => array(xl('History') , 1, 'patient_file/history/history.php'), -'ens' => array(xl('Visit History'), 1, 'patient_file/history/encounters.php'), -'nen' => array(xl('Create Visit'), 1, 'forms/newpatient/new.php?autoloaded=1&calenc='), -'pre' => array(xl('Rx') , 1, 'patient_file/summary/rx_frameset.php'), -'iss' => array(xl('Issues') , 1, 'patient_file/summary/stats_full.php?active=all'), -'imm' => array(xl('Immunize') , 1, 'patient_file/summary/immunizations.php'), -'doc' => array(xl('Documents') , 1, '../controller.php?document&list&patient_id={PID}'), -'orp' => array(xl('Proc Pending Rev'), 1, 'orders/orders_results.php?review=1'), -'orr' => array(xl('Proc Res') , 1, 'orders/orders_results.php'), -'lda' => array(xl('Lab overview') , 1, 'patient_file/summary/labdata.php'), -'tan' => array(xl('Configure Tracks') , 0, 'forms/track_anything/create.php'), -'prp' => array(xl('Pt Report') , 1, 'patient_file/report/patient_report.php'), -'prq' => array(xl('Pt Rec Request') , 1, 'patient_file/transaction/record_request.php'), -'pno' => array(xl('Pt Notes') , 1, 'patient_file/summary/pnotes.php'), -'tra' => array(xl('Transact') , 1, 'patient_file/transaction/transactions.php'), -'enc' => array(xl('Encounter') , 2, 'patient_file/encounter/encounter_top.php'), -'erx' => array(xl('e-Rx') , 1, 'eRx.php'), -'err' => array(xl('e-Rx Renewal') , 1, 'eRx.php?page=status'), -'ere' => array(xl('e-Rx EPCS') , 1, 'eRx.php?page=epcs-admin'), -'pay' => array(xl('Payment') , 1, '../patient_file/front_payment.php'), -'edi' => array(xl('EDI History') , 0, 'billing/edih_view.php'), -'eob' => array(xl('Posting') , 0, 'billing/sl_eob_search.php'), -'dld' => array(xl('Display Documents'), 0, 'main/display_documents.php') -); -$disallowed = array(); - - -$primary_docs['npa']=array(xl('Batch Payments') , 0, 'billing/new_payment.php'); -if ($GLOBALS['use_charges_panel'] || $GLOBALS['menu_styling_vertical'] == 0) { - $primary_docs['cod'] = array(xl('Charges'), 2, 'patient_file/encounter/encounter_bottom.php'); -} - -if ($GLOBALS['enable_group_therapy']) { - $disallowed['gng'] = !acl_check("groups", "gadd"); - $disallowed['gdg'] = !acl_check("groups", "gadd"); - $disallowed['gcv'] = !acl_check("groups", "gcalendar"); - $disallowed['gce'] = !acl_check("groups", "glog"); - $disallowed['gvh'] = !acl_check("groups", "glog"); - - $primary_docs['gng'] = array(xl('New') , 0, 'therapy_groups/index.php?method=addGroup'); - $primary_docs['gdg'] = array(xl('Group Details') , 3, '/therapy_groups/index.php?method=groupDetails&group_id=from_session'); - $primary_docs['gcv'] = array(xl('Create Visit'), 3, 'forms/newGroupEncounter/new.php?autoloaded=1&calenc='); - $primary_docs['gce'] = array(xl('Current') , 4, 'patient_file/encounter/encounter_top.php'); - $primary_docs['gvh'] = array(xl('Visit History'), 3, 'patient_file/history/encounters.php'); -} - - -$esignApi = new Api(); -// This section decides which navigation items will not appear. - - -$disallowed['edi'] = !($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob')); -$disallowed['adm'] = !(acl_check('admin', 'calendar') || -acl_check('admin', 'database') || acl_check('admin', 'forms') || -acl_check('admin', 'practice') || acl_check('admin', 'users') || -acl_check('admin', 'acl') || acl_check('admin', 'super') || -acl_check('admin', 'superbill') || acl_check('admin', 'drugs')); - -$disallowed['bil'] = !(acl_check('acct', 'eob') || acl_check('acct', 'bill')); - -$disallowed['new'] = !(acl_check('patients', 'demo', '', array('write','addonly'))); - -$disallowed['fax'] = !(($GLOBALS['enable_hylafax'] || $GLOBALS['enable_scanner']) && acl_check('patients', 'docs')); - -$disallowed['iss'] = !((acl_check('encounters', 'notes', '', 'write') || -acl_check('encounters', 'notes_a', '', 'write') ) && -acl_check('patients', 'med', '', 'write') ); - -$disallowed['imp'] = $disallowed['new'] || !is_readable("$webserver_root/custom/import.php"); - -$disallowed['cht'] = !is_readable("$webserver_root/custom/chart_tracker.php"); - -$disallowed['pre'] = !(acl_check('patients', 'med')); -$disallowed['eob'] = !(acl_check('acct', 'eob')); - - // Helper functions for treeview generation. -function genTreeLink($frame, $name, $title, $mono = false) -{ - global $primary_docs, $disallowed; - if (empty($disallowed[$name])) { - $id = $name . $primary_docs[$name][1]; - echo "
  • " . text($title) . ($name == 'msg' ? ' ' : '')."
  • "; - } -} - -function genMiscLink($frame, $name, $level, $title, $url, $mono = false, $encform = false) -{ - global $disallowed; - if (empty($disallowed[$name])) { - $id = $name . $level; - echo "
  • " . text($title) . "
  • "; - } -} - -function genMiscLink2($frame, $name, $level, $title, $url, $mono = false, $mouseovertext = "") -{ - global $disallowed; - if (empty($disallowed[$name])) { - $id = $name . $level; - echo "
  • " . text($title) . "
  • "; - } -} -function genPopLink($title, $url, $linkid = '') -{ - echo "
  • " . text($title) . "
  • "; -} -function genDualLink($topname, $botname, $title) -{ - global $primary_docs, $disallowed; - if (empty($disallowed[$topname]) && empty($disallowed[$botname])) { - $topid = $topname . $primary_docs[$topname][1]; - $botid = $botname . $primary_docs[$botname][1]; - echo "
  • " . text($title) . "
  • "; - } -} - -function genPopupsList($style = '') -{ - global $disallowed, $webserver_root; - ?> - - -
    :    - +
    - - - - - - - - - - - - - - - - - - - -
    - -
    : - - - -
      - - - -
      - - - -
    - label=xl($moduleName); - $moduleMenuContainer->url= ''; - $moduleMenuContainer->menu_id = $modId; - $moduleMenuContainer->requirement=0; - $moduleMenuContainer->target='mod'; - $moduleMenuContainer->children = []; - return $moduleMenuContainer; -} - -/** - * Given a tree object structure of navigation items go through and generate the side navigation - * items for the given tree. If the user is not an administrator than hook menu items are hidden. - * @param $navMenuItems The tree object structure. @see genModuleMenuObject for the structure of this array. - * @param $disallowed A hashmap of acl restrictions. - */ -function genModuleMenuFromMenuItems($navMenuItems, $disallowed) -{ - // there's only one menu item in this case - if (!empty($navMenuItems[0])) { - foreach ($navMenuItems[0]->children as $menuItem) { - $acl_section = $menuItem->menu_id; // we use the url as the key since it's unique... - if (empty($menuItem->children)) { - genMiscLink2('RTop', $acl_section, '0', $menuItem->label, genModUrl($menuItem->url)); - } else if (!$disallowed['adm']) { // admin are not allowed hook settings... - ?> -
  • label); ?> - -
      - children as $childHookContainer) : - $acl_section = $childHookContainer->url; - // li closed in genMiscLink - genMiscLink('RTop', $acl_section, '0', $childHookContainer->label, genModUrl($childHookContainer->url)); - endforeach; ?> -
    -
  • - - - - -Navigation - - - - - - - - - - - - - - - - - - - - -
    - - -
    - -
    - - - - - - -
    - /> - - - - /> -
    - - - - -

    - - - - -\n"; - genFindBlock(); - echo "
    \n"; -?> - - - - - -
    - - - - - diff --git a/interface/main/main_screen.php b/interface/main/main_screen.php index f7d826858..6645c895a 100644 --- a/interface/main/main_screen.php +++ b/interface/main/main_screen.php @@ -471,127 +471,18 @@ if (!empty($GLOBALS['gbl_nav_area_width'])) { $nav_area_width = $GLOBALS['gbl_nav_area_width']; } -// This is where will decide whether to use tabs layout or non-tabs layout -// Will also set Session variables to communicate settings to tab layout -if ($GLOBALS['new_tabs_layout']) { - $_SESSION['frame1url'] = $frame1url; - $_SESSION['frame1target'] = $frame1target; - $_SESSION['frame2url'] = $frame2url; - $_SESSION['frame2target'] = $frame2target; - // mdsupport - Apps processing invoked for valid app selections from list - if ((isset($_POST['appChoice'])) && ($_POST['appChoice'] !== '*OpenEMR')) { - $_SESSION['app1'] = $_POST['appChoice']; - } - - // Pass a unique token, so main.php script can not be run on its own - $_SESSION['token_main_php'] = RandomGenUtils::createUniqueToken(); - header('Location: ' . $web_root . "/interface/main/tabs/main.php?token_main=" . urlencode($_SESSION['token_main_php'])); - exit(); -} - -?> - - - -<?php echo text($openemr_name) ?> - - - - - - - - - - - - - - "; - -$main_tpl = "" ; -$main_tpl .= " - "; - -// Please keep in mind that border (mozilla) and framespacing (ie) are the -// same thing. use both. -// frameborder specifies a 3d look, not whether there are borders. - -if (empty($GLOBALS['gbl_tall_nav_area'])) { - // not tall nav area ?> -,*' frameborder='1' border='1' framespacing='1' onunload='imclosing()'> - - - ' id='fsbody' frameborder='1' border='4' framespacing='4'> - - - - - - ' id='fsbody' frameborder='1' border='4' framespacing='4'> - - - - - - - - - - - - - - - - ,*' frameborder='1' border='1' framespacing='1'> - - - - - - - - - - - +// Pass a unique token, so main.php script can not be run on its own +$_SESSION['token_main_php'] = RandomGenUtils::createUniqueToken(); +header('Location: ' . $web_root . "/interface/main/tabs/main.php?token_main=" . urlencode($_SESSION['token_main_php'])); +exit(); +?> \ No newline at end of file diff --git a/interface/main/main_title.php b/interface/main/main_title.php deleted file mode 100644 index 27e671213..000000000 --- a/interface/main/main_title.php +++ /dev/null @@ -1,201 +0,0 @@ - - * @copyright Copyright (c) 2018 Brady Miller - * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 - */ - - -require_once('../globals.php'); - -use OpenEMR\Core\Header; - -?> - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - - - - - - - -
    - - - - - - -
    - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - -
    - - - - - - -
    - -
    -
    - - - - - diff --git a/interface/main/messages/js/reminder_appts.js b/interface/main/messages/js/reminder_appts.js index ab4b2570a..7a065e1b8 100644 --- a/interface/main/messages/js/reminder_appts.js +++ b/interface/main/messages/js/reminder_appts.js @@ -341,9 +341,7 @@ function show_this(colorish='') { //in bootstrap_menu.js function tabYourIt(tabNAME, url) { - if (!top.tab_mode) { - tabNAME = window.name; - } + tabNAME = window.name; parent.left_nav.loadFrame('1', tabNAME, url); } diff --git a/interface/main/messages/messages.php b/interface/main/messages/messages.php index 12785134f..1d4cb195c 100644 --- a/interface/main/messages/messages.php +++ b/interface/main/messages/messages.php @@ -171,7 +171,7 @@ if (!empty($_REQUEST['go'])) { ?> } } else { //original message.php stuff - + if ($GLOBALS['enable_help'] == 1) { $help_icon = ''; } elseif ($GLOBALS['enable_help'] == 2) { @@ -183,7 +183,7 @@ if (!empty($_REQUEST['go'])) { ?> if ($GLOBALS['disable_rcb'] != '1') { $heading_caption .= ', ' . xlt('Recalls'); } - + $arrOeUiSettings = array( 'heading_title' => $heading_caption, 'include_patient_name' => false,// use only in appropriate pages @@ -1064,19 +1064,11 @@ if (!empty($_REQUEST['go'])) { ?> }); parent.left_nav.setPatient(pname, pid, pubpid, '', str_dob); parent.left_nav.setPatientEncounter(EncounterIdArray, EncounterDateArray, CalendarCategoryArray); - var docurl = '../controller.php?document&view' + "&patient_id=" + encodeURIComponent(pid) + "&document_id=" + encodeURIComponent(doc_id) + "&"; var paturl = 'patient_file/summary/demographics.php?pid=' + encodeURIComponent(pid); parent.left_nav.loadFrame('dem1', 'pat', paturl); parent.left_nav.loadFrame('doc0', 'enc', docurl); top.activateTabByName('enc', true); - - var docurl = '' + "&patient_id=" + encodeURIComponent(pid) + "&document_id=" + encodeURIComponent(doc_id) + "&"; - var paturl = '' + encodeURIComponent(pid); - var othername = (window.name === 'RTop') ? 'RBot' : 'RTop'; - parent.frames[othername].location.href = paturl; - location.href = docurl; - } // This is for callback by the find-patient popup. diff --git a/interface/main/tabs/js/include_opener.js b/interface/main/tabs/js/include_opener.js index d70733767..9a0d8301b 100644 --- a/interface/main/tabs/js/include_opener.js +++ b/interface/main/tabs/js/include_opener.js @@ -25,24 +25,8 @@ if (!opener) { window.close = function (call, args) { var frameName = window.name; - var wframe = opener; - if (!top.tab_mode) { - for (; wframe.name !== 'RTop' && wframe.name !== 'RBot'; wframe = wframe.parent) { - if (wframe.parent === wframe) { - wframe = window; - } - } - for (let i = 0; wframe.document.body.localName !== 'body' && i < 4; wframe = wframe[i++]) { - if (i === 3) { - console.log("Opener: unable to find modal's frame"); - return false; - } - } - dialogModal = wframe.$('div#' + frameName); - } else { - var dialogModal = top.$('div#' + frameName); - wframe = top; - } + var wframe = top; + var dialogModal = top.$('div#' + frameName); var removeFrame = dialogModal.find("iframe[name='" + frameName + "']"); if (removeFrame.length > 0) { @@ -61,24 +45,8 @@ window.close = var dlgclose = function (call, args) { var frameName = window.name; - var wframe = opener; - if (!top.tab_mode) { - for (; wframe.name !== 'RTop' && wframe.name !== 'RBot'; wframe = wframe.parent) { - if (wframe.parent === wframe) { - wframe = window; - } - } - for (let i = 0; wframe.document.body.localName !== 'body' && i < 4; wframe = wframe[i++]) { - if (i === 3) { - console.log("Opener: unable to find modal's frame"); - return false; - } - } - dialogModal = wframe.$('div#' + frameName); - } else { - var dialogModal = top.$('div#' + frameName); - wframe = top; - } + var wframe = top; + var dialogModal = top.$('div#' + frameName); var removeFrame = dialogModal.find("iframe[name='" + frameName + "']"); if (removeFrame.length > 0) { diff --git a/interface/main/tabs/js/tabs_view_model.js b/interface/main/tabs/js/tabs_view_model.js index a5d09753c..b1cd4af3c 100644 --- a/interface/main/tabs/js/tabs_view_model.js +++ b/interface/main/tabs/js/tabs_view_model.js @@ -299,7 +299,6 @@ function menuActionClick(data,evt) } // Fixups for loading a new encounter form, as these are now in tabs. - // See loadNewForm() in left_nav.php for comparable logic in the non-tabs case. var dataurl = data.url(); var matches = dataurl.match(/load_form.php\?formname=(\w+)/); if (matches) { diff --git a/interface/main/tabs/main.php b/interface/main/tabs/main.php index 4f7b37b87..37696b04b 100644 --- a/interface/main/tabs/main.php +++ b/interface/main/tabs/main.php @@ -71,14 +71,6 @@ window.opener = null; // and is checked by handlers of beforeunload events. var timed_out = false; -// Include this variable for backward compatibility -var loadedFrameCount = 0; -var tab_mode=true; -function allFramesLoaded() { -// Stub function for backward compatibility with frame race condition mechanism - return true; -} - function goRepeaterServices(){ // Ensure send the skip_timeout_reset parameter to not count this as a manual entry in the // timing out mechanism in OpenEMR. diff --git a/interface/orders/single_order_results.inc.php b/interface/orders/single_order_results.inc.php index c5a2a123f..7bbe2df71 100644 --- a/interface/orders/single_order_results.inc.php +++ b/interface/orders/single_order_results.inc.php @@ -435,32 +435,16 @@ function generate_order_report($orderid, $input_form = false, $genstyles = true, @@ -605,18 +590,12 @@ function toencounter(enc, datestr, topframe) {