3 /* Copyright (C) 2006-2012 Rod Roark <rod@sunsetsystems.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
11 // This provides the left navigation frame.
12 // Following are notes as to what else was changed for this feature:
14 // * interface/main/main_screen.php: the top-level frameset.
15 // * interface/main/finder/patient_select.php: loads stuff when a new patient
17 // * interface/patient_file/summary/demographics.php: this is the first frame
18 // loaded when a new patient is chosen, and in turn sets the current pid and
19 // then loads the initial bottom frame.
20 // * interface/patient_file/summary/demographics_full.php: added support for
21 // setting a new pid, needed for going to demographics from billing.
22 // * interface/patient_file/summary/demographics_save.php: redisplay
23 // demographics.php and not the frameset.
24 // * interface/patient_file/summary/summary_bottom.php: new frameset for the
25 // summary, prescriptions and notes for a selected patient, cloned from
26 // patient_summary.php.
27 // * interface/patient_file/encounter/encounter_bottom.php: new frameset for
28 // the selected encounter, mosting coding/billing stuff, cloned from
29 // patient_encounter.php. This will also self-load the superbill pages
31 // * interface/usergroup/user_info.php: removed Back link.
32 // * interface/usergroup/admin_frameset.php: new frameset for Admin pages,
33 // cloned from usergroup.php.
34 // * interface/main/onotes/office_comments.php: removed Back link target.
35 // * interface/main/onotes/office_comments_full.php: changed Back link.
36 // * interface/billing/billing_report.php: removed Back link; added logic
37 // to properly go to demographics or to an encounter when requested.
38 // * interface/new/new.php: removed Back link and revised form target.
39 // * interface/new/new_patient_save.php: modified to load the demographics
40 // page to the current frame instead of loading a new frameset.
41 // * interface/patient_file/history/history.php: target change.
42 // * interface/patient_file/history/history_full.php: target changes.
43 // * interface/patient_file/history/history_save.php: target change.
44 // * interface/patient_file/history/encounters.php: link/target changes.
45 // * interface/patient_file/encounter/encounter_top.php: another new frameset
46 // cloned from patient_encounter.php.
47 // * interface/patient_file/encounter/forms.php: link target removal.
48 // * interface/patient_file/encounter/new_form.php: target change.
49 // * interface/forms/newpatient/new.php, view.php, save.php: link/target
51 // * interface/patient_file/summary/immunizations.php: removed back link.
52 // * interface/patient_file/summary/pnotes.php: changed link targets.
53 // * interface/patient_file/summary/pnotes_full.php: changed back link and
54 // added set_pid logic.
55 // * interface/patient_file/transaction/transactions.php: various changes.
56 // * interface/patient_file/transaction/add_transaction.php: new return js.
57 // * interface/patient_file/encounter/superbill_codes.php: target and link
59 // * interface/patient_file/encounter/superbill_custom_full.php: target and
61 // * interface/patient_file/encounter/diagnosis.php: target changes.
62 // * interface/patient_file/encounter/diagnosis_full.php: target and link
64 // * interface/main/authorizations/authorizations.php: link and target changes.
65 // * library/api.inc: url change.
66 // * interface/patient_file/summary/rx_frameset.php: new frameset.
67 // * interface/patient_file/summary/rx_left.php: new for prescriptions.
68 // * all encounter forms: remove all instances of "target=Main" and change
69 // all instances of "patient_encounter.php" to "encounter_top.php".
71 // Our find_patient form, when submitted, invokes patient_select.php in the
72 // upper frame. When the patient is selected, demographics.php is invoked
73 // with the set_pid parameter, which establishes the new session pid and also
74 // calls the setPatient() function (below). In this case demographics.php
75 // will also load the summary frameset into the bottom frame, invoking our
76 // loadFrame() function.
78 // Similarly, we have the concept of selecting an encounter from the
79 // Encounters list, and then having that "stick" until some other encounter
80 // or a new encounter is chosen. We also have a navigation item for creating
81 // a new encounter. interface/patient_file/encounter/encounter_top.php
82 // supports set_encounter to establish an encounter.
84 // TBD: Include active_pid and/or active_encounter in relevant submitted
85 // form data, and add logic to the save routines to make sure they match
86 // the corresponding session values.
88 require_once("../globals.php");
89 require_once($GLOBALS['fileroot']."/library/acl.inc");
90 require_once($GLOBALS['fileroot']."/custom/code_types.inc.php");
91 require_once($GLOBALS['fileroot']."/library/patient.inc");
92 require_once($GLOBALS['fileroot']."/library/lists.inc");
93 require_once $GLOBALS['srcdir'].'/ESign/Api.php';
94 require_once $GLOBALS['srcdir'].'/user.inc';
96 // Fetch user preferences saved from prior session
97 $uspfx = substr(__FILE__
, strlen($GLOBALS['fileroot']."/")) . '.';
98 $cb_top_chk = prevSetting($uspfx, 'cb_top', 'frame0_chk', 'checked');
99 $cb_bot_chk = prevSetting($uspfx, 'cb_bot', 'frame1_chk', 'checked');
100 $usrval = json_encode( array ( $cb_top_chk, $cb_bot_chk ) );
102 // This array defines the list of primary documents that may be
103 // chosen. Each element value is an array of 3 values:
105 // * Name to appear in the navigation table
106 // * Usage: 0 = global, 1 = patient-specific, 2 = encounter-specific
107 // * The URL relative to the interface directory
110 $primary_docs = array(
111 'cal' => array(xl('Calendar') , 0, 'main/main_info.php'),
112 'pfb' => array(xl('Patient Flow Board') , 0, '../interface/patient_tracker/patient_tracker.php?skip_timeout_reset=1'),
113 'app' => array(xl('Portal Activity') , 0, '../myportal/index.php'),
114 'msg' => array(xl('Messages') , 0, 'main/messages/messages.php?form_active=1'),
115 'pwd' => array(xl('Password') , 0, 'usergroup/user_info.php'),
116 'prf' => array(xl('Preferences') , 0, 'super/edit_globals.php?mode=user'),
117 'adm' => array(xl('Admin') , 0, 'usergroup/admin_frameset.php'),
118 'rep' => array(xl('Reports') , 0, 'reports/index.php'),
119 'ono' => array(xl('Ofc Notes') , 0, 'main/onotes/office_comments.php'),
120 'fax' => array(xl('Fax/Scan') , 0, 'fax/faxq.php'),
121 'adb' => array(xl('Addr Bk') , 0, 'usergroup/addrbook_list.php'),
122 'orl' => array(xl('Proc Prov') , 0, 'orders/procedure_provider_list.php'),
123 'ort' => array(xl('Proc Cat') , 0, 'orders/types.php'),
124 'orc' => array(xl('Proc Load') , 0, 'orders/load_compendium.php'),
125 'orb' => array(xl('Proc Bat') , 0, 'orders/orders_results.php?batch=1'),
126 'ore' => array(xl('E-Reports') , 0, 'orders/list_reports.php'),
127 'ppo' => array(xl('CMS Portal'), 0, 'cmsportal/list_requests.php'),
128 'cht' => array(xl('Chart Trk') , 0, '../custom/chart_tracker.php'),
129 'imp' => array(xl('Import') , 0, '../custom/import.php'),
130 'bil' => array(xl('Billing') , 0, 'billing/billing_report.php'),
131 'sup' => array(xl('Superbill') , 0, 'patient_file/encounter/superbill_custom_full.php'),
132 'aun' => array(xl('Authorizations'), 0, 'main/authorizations/authorizations.php'),
133 'new' => array(xl('New Pt') , 0, 'new/new.php'),
134 'ped' => array(xl('Patient Education'), 0, 'reports/patient_edu_web_lookup.php'),
135 'lab' => array(xl('Check Lab Results') , 0, 'orders/lab_exchange.php'),
136 'dem' => array(xl('Patient') , 1, "patient_file/summary/demographics.php"),
137 'his' => array(xl('History') , 1, 'patient_file/history/history.php'),
138 'ens' => array(xl('Visit History'), 1, 'patient_file/history/encounters.php'),
139 'nen' => array(xl('Create Visit'), 1, 'forms/newpatient/new.php?autoloaded=1&calenc='),
140 'pre' => array(xl('Rx') , 1, 'patient_file/summary/rx_frameset.php'),
141 'iss' => array(xl('Issues') , 1, 'patient_file/summary/stats_full.php?active=all'),
142 'imm' => array(xl('Immunize') , 1, 'patient_file/summary/immunizations.php'),
143 'doc' => array(xl('Documents') , 1, '../controller.php?document&list&patient_id={PID}'),
144 'orp' => array(xl('Proc Pending Rev'), 1, 'orders/orders_results.php?review=1'),
145 'orr' => array(xl('Proc Res') , 1, 'orders/orders_results.php'),
146 'lda' => array(xl('Lab overview') , 1, 'patient_file/summary/labdata.php'),
147 'tan' => array(xl('Configure Tracks') , 0, 'forms/track_anything/create.php'),
148 'prp' => array(xl('Pt Report') , 1, 'patient_file/report/patient_report.php'),
149 'prq' => array(xl('Pt Rec Request') , 1, 'patient_file/transaction/record_request.php'),
150 'pno' => array(xl('Pt Notes') , 1, 'patient_file/summary/pnotes.php'),
151 'tra' => array(xl('Transact') , 1, 'patient_file/transaction/transactions.php'),
152 'sum' => array(xl('Summary') , 1, 'patient_file/summary/summary_bottom.php'),
153 'enc' => array(xl('Encounter') , 2, 'patient_file/encounter/encounter_top.php'),
154 'erx' => array(xl('e-Rx') , 1, 'eRx.php'),
155 'err' => array(xl('e-Rx Renewal') , 1, 'eRx.php?page=status'),
156 'ere' => array(xl('e-Rx EPCS') , 1, 'eRx.php?page=epcs-admin'),
157 'pay' => array(xl('Payment') , 1, '../patient_file/front_payment.php'),
158 'edi' => array(xl('EDI History') , 0, 'billing/edih_view.php'),
159 'eob' => array(xl('Posting') , 0, 'billing/sl_eob_search.php'),
160 'dld' => array(xl('Display Documents'), 0, 'main/display_documents.php')
162 $primary_docs['npa']=array(xl('Batch Payments') , 0, 'billing/new_payment.php');
163 if ($GLOBALS['use_charges_panel'] ||
$GLOBALS['menu_styling_vertical'] == 0) {
164 $primary_docs['cod'] = array(xl('Charges'), 2, 'patient_file/encounter/encounter_bottom.php');
167 $esignApi = new Api();
168 // This section decides which navigation items will not appear.
170 $disallowed = array();
171 $disallowed['edi'] = !($GLOBALS['enable_edihistory_in_left_menu'] ||
acl_check('acct', 'eob'));
172 $disallowed['adm'] = !(acl_check('admin', 'calendar') ||
173 acl_check('admin', 'database') ||
acl_check('admin', 'forms') ||
174 acl_check('admin', 'practice') ||
acl_check('admin', 'users') ||
175 acl_check('admin', 'acl') ||
acl_check('admin', 'super') ||
176 acl_check('admin', 'superbill') ||
acl_check('admin', 'drugs'));
178 $disallowed['bil'] = !(acl_check('acct', 'rep') ||
acl_check('acct', 'eob') ||
179 acl_check('acct', 'bill'));
181 $disallowed['new'] = !(acl_check('patients','demo','',array('write','addonly') ));
183 $disallowed['fax'] = !($GLOBALS['enable_hylafax'] ||
$GLOBALS['enable_scanner']);
185 $disallowed['iss'] = !((acl_check('encounters','notes','','write') ||
186 acl_check('encounters','notes_a','','write') ) &&
187 acl_check('patients','med','','write') );
189 $disallowed['imp'] = $disallowed['new'] ||
190 !is_readable("$webserver_root/custom/import.php");
192 $disallowed['cht'] = !is_readable("$webserver_root/custom/chart_tracker.php");
194 $disallowed['pre'] = !(acl_check('patients', 'med'));
195 $disallowed['eob'] = !(acl_check('acct', 'eob'));
197 // Helper functions for treeview generation.
198 function genTreeLink($frame, $name, $title, $mono=false) {
199 global $primary_docs, $disallowed;
200 if (empty($disallowed[$name])) {
201 $id = $name . $primary_docs[$name][1];
202 echo "<li><a href='' id='$id' onclick=\"";
204 if ($frame == 'RTop')
205 echo "forceSpec(true,false);";
207 echo "forceSpec(false,true);";
209 echo "return loadFrame2('$id','$frame','" .
210 $primary_docs[$name][2] . "')\">" . $title . ($name == 'msg' ?
' <span id="reminderCountSpan" class="bold"></span>' : '')."</a></li>";
213 function genMiscLink($frame, $name, $level, $title, $url, $mono=false) {
215 if (empty($disallowed[$name])) {
216 $id = $name . $level;
217 echo "<li><a href='' id='$id' onclick=\"";
219 if ($frame == 'RTop')
220 echo "forceSpec(true,false);";
222 echo "forceSpec(false,true);";
224 echo "return loadFrame2('$id','$frame','" .
225 $url . "')\">" . $title . "</a></li>";
228 function genMiscLink2($frame, $name, $level, $title, $url, $mono=false,$mouseovertext="") {
230 if (empty($disallowed[$name])) {
232 $id = $name . $level;
233 echo "<li><a href='' id='$id' title='$mouseovertext' onclick=\"";
235 if ($frame == 'RTop')
236 echo "forceSpec(true,false);";
238 echo "forceSpec(false,true);";
240 echo "return loadFrame3('$id','$frame','" .
241 $url . "')\">" . $title . "</a></li>";
244 function genPopLink($title, $url, $linkid='') {
245 echo "<li><a href='' ";
246 if ($linkid) echo "id='$linkid' ";
247 echo "onclick=\"return repPopup('$url')\"" .
248 ">" . $title . "</a></li>";
250 function genDualLink($topname, $botname, $title) {
251 global $primary_docs, $disallowed;
252 if (empty($disallowed[$topname]) && empty($disallowed[$botname])) {
253 $topid = $topname . $primary_docs[$topname][1];
254 $botid = $botname . $primary_docs[$botname][1];
255 echo "<li><a href='' id='$topid' " .
256 "onclick=\"return loadFrameDual('$topid','$botid','" .
257 $primary_docs[$topname][2] . "','" .
258 $primary_docs[$botname][2] . "')\">" . $title . "</a></li>";
262 function genPopupsList($style='') {
263 global $disallowed, $webserver_root;
265 <select name
='popups' onchange
='selpopup(this)' style
='background-color:transparent;font-size:9pt;<?php echo $style; ?>'>
266 <option value
=''><?php
xl('Popups','e'); ?
></option
>
267 <?php
if (!$disallowed['iss']) { ?
>
268 <option value
='../patient_file/problem_encounter.php'><?php
xl('Issues','e'); ?
></option
>
270 <?php
if (!$GLOBALS['ippf_specific']) { ?
>
271 <option value
='../../custom/export_xml.php'><?php
xl('Export','e'); ?
></option
>
272 <option value
='../../custom/import_xml.php'><?php
xl('Import','e'); ?
></option
>
274 if (!$GLOBALS['disable_calendar']) { ?
>
275 <option value
='../reports/appointments_report.php?patient=<?php if(isset($pid)) {echo $pid;} ?>'><?php
xl('Appts','e'); ?
></option
>
277 <option value
='../patient_file/printed_fee_sheet.php?fill=1'><?php
xl('Superbill','e'); ?
></option
>
278 <option value
='../patient_file/front_payment.php'><?php
xl('Payment','e'); ?
></option
>
279 <?php
if ($GLOBALS['inhouse_pharmacy']) { ?
>
280 <option value
='../patient_file/pos_checkout.php'><?php
xl('Checkout','e'); ?
></option
>
282 <?php
if (is_dir($GLOBALS['OE_SITE_DIR'] . "/letter_templates")) { ?
>
283 <option value
='../patient_file/letter.php'><?php
xl('Letter','e'); ?
></option
>
285 <?php
if ($GLOBALS['chart_label_type'] != '0') { ?
>
286 <option value
='../patient_file/label.php'><?php
xl('Chart Label','e'); ?
></option
>
288 <?php
if ($GLOBALS['barcode_label_type'] != '0') { ?
>
289 <option value
='../patient_file/barcode_label.php'><?php
xl('Barcode Label','e'); ?
></option
>
291 <?php
if ($GLOBALS['addr_label_type']) { ?
>
292 <option value
='../patient_file/addr_label.php'><?php
xl('Address Label','e'); ?
></option
>
298 function genFindBlock() {
300 <table cellpadding
='0' cellspacing
='0' border
='0'>
302 <td
class='smalltext'><?php
xl('Find','e') ?
>: 
;</td
>
303 <td
class='smalltext' colspan
='2'>
304 <input type
="entry" size
="7" name
="patient" class='inputtext' style
='width:65px;' />
308 <td
class='smalltext'><?php
xl('by','e') ?
>:</td
>
309 <td
class='smalltext'>
310 <a href
="javascript:findPatient('Last');" class="navitem"><?php
xl('Name','e'); ?
></a
>
312 <td
class='smalltext' align
='right'>
313 <a href
="javascript:findPatient('ID');" class="navitem"><?php
xl('ID','e'); ?
></a
>
317 <td
class='smalltext'> 
;</td
>
318 <td
class='smalltext'>
319 <a href
="javascript:findPatient('SSN');" class="navitem"><?php
xl('SSN','e'); ?
></a
>
321 <td
class='smalltext' align
='right'>
322 <a href
="javascript:findPatient('DOB');" class="navitem"><?php
xl('DOB','e'); ?
></a
>
326 <td
class='smalltext'> 
;</td
>
327 <td
class='smalltext'>
328 <a href
="javascript:findPatient('Any');" class="navitem"><?php
xl('Any', 'e'); ?
></a
>
330 <td
class='smalltext' align
='right'>
331 <a href
="javascript:initFilter();" class="navitem"><?php
xl('Filter', 'e'); ?
></a
>
336 } // End function genFindBlock()
341 <title
>Navigation
</title
>
343 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
344 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'];?>/font-awesome-4-6-3/css/font-awesome.css" type
="text/css">
345 <style type
="text/css">
349 padding
: 5px
3px
5px
3px
;
352 font
-family
:sans
-serif
;
356 a
.navitem
, a
.navitem
:visited
{
358 font
-family
:sans
-serif
;
369 border
-color
: #000000;
370 background
-color
:transparent
;
374 background
-color
:transparent
;
376 #navigation-slide ul {
377 background
-color
:transparent
;
387 vertical
-align
:middle
;
391 <link rel
="stylesheet" href
="../../library/js/jquery.treeview-1.4.1/jquery.treeview.css" />
392 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-6-4/index.js"></script
>
393 <script type
="text/javascript" src
="../../library/js/jquery.treeview-1.4.1/jquery.treeview.js" ></script
>
395 <script type
="text/javascript" src
="../../library/dialog.js?v=<?php echo $v_js_includes; ?>"></script
>
397 <script language
='JavaScript'>
399 var usrval
= jQuery
.parseJSON('<?php echo $usrval ?>');
401 // tajemo work by CB 2012/01/31 12:32:57 PM dated reminders counter
402 function getReminderCount(){
403 top
.restoreSession();
404 // Send the skip_timeout_reset parameter to not count this as a manual entry in the
405 // timing out mechanism in OpenEMR.
406 $
.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
407 { skip_timeout_reset
: "1" },
409 $
("#reminderCountSpan").html(data
);
410 // run updater every 60 seconds
411 var repeater
= setTimeout("getReminderCount()", 60000);
413 //piggy-back on this repeater to run other background-services
414 //this is a silent task manager that returns no output
415 $
.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/execute_background_services.php",
416 { skip_timeout_reset
: "1", ajax
: "1" });
419 $
(document
).ready(function (){
420 getReminderCount();//
421 parent
.loadedFrameCount +
= 1;
422 for (var i
= 0, len
= usrval
.length
; i
< len
; i++
) {
423 if (usrval
[i
] != "checked") toggleFrame(i+
1);
426 // end of tajemo work dated reminders counter
428 // Master values for current pid and encounter.
430 var active_encounter
= 0;
431 var encounter_locked
= false;
433 // Current selections in the top and bottom frames.
437 // Expand and/or collapse frames in response to checkbox clicks.
438 // fnum indicates which checkbox was clicked (1=left, 2=right).
439 function toggleFrame(fnum
) {
440 var f
= document
.forms
[0];
441 var fset
= top
.document
.getElementById('fsright');
442 if (!f
.cb_top
.checked
&& !f
.cb_bot
.checked
) {
443 if (fnum
== 1) f
.cb_bot
.checked
= true;
444 else f
.cb_top
.checked
= true;
446 var rows
= f
.cb_top
.checked ?
'*' : '0';
447 rows +
= f
.cb_bot
.checked ?
',*' : ',0';
449 save_setting ([(f
.cb_top
.checked ?
'checked' : ' '), (f
.cb_bot
.checked ?
'checked' : ' ')]);
452 // Load the specified url into the specified frame (RTop or RBot).
453 // The URL provided must be relative to interface.
454 function loadFrame(fname
, frame
, url
) {
455 top
.restoreSession();
456 var i
= url
.indexOf('{PID}');
457 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
458 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
459 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
462 // Load the specified url into a frame to be determined, with the specified
463 // frame as the default; the url must be relative to interface.
464 function loadFrame2(fname
, frame
, url
) {
465 var usage
= fname
.substring(3);
466 if (active_pid
== 0 && usage
> '0') {
467 alert('<?php xl('You must first select
or add a patient
.','e
') ?>');
470 if (active_encounter
== 0 && usage
> '1') {
471 alert('<?php xl('You must first select
or create an encounter
.','e
') ?>');
474 if (encounter_locked
&& usage
> '1') {
475 alert('<?php echo xls('This encounter is locked
. No
new forms can be added
.') ?>');
478 var f
= document
.forms
[0];
479 top
.restoreSession();
480 var i
= url
.indexOf('{PID}');
481 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
484 var fi
= f
.sel_frame
.selectedIndex
;
485 if (fi
== 1) frame
= 'RTop'; else if (fi
== 2) frame
= 'RBot';
487 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
488 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
489 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
493 function loadFrame3(fname
, frame
, url
) {
494 var f
= document
.forms
[0];
495 top
.restoreSession();
496 var i
= url
.indexOf('{PID}');
497 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
500 var fi
= f
.sel_frame
.selectedIndex
;
501 if (fi
== 1) frame
= 'RTop'; else if (fi
== 2) frame
= 'RBot';
503 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
504 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
505 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
509 // Make sure the the top and bottom frames are open or closed, as specified.
510 function forceSpec(istop
, isbot
) {
511 var f
= document
.forms
[0];
512 if (f
.cb_top
.checked
!= istop
) {
513 f
.cb_top
.checked
= istop
;
516 if (f
.cb_bot
.checked
!= isbot
) {
517 f
.cb_bot
.checked
= isbot
;
522 // Make sure both frames are open.
523 function forceDual() {
524 forceSpec(true, true);
527 // Load the specified url into a frame to be determined, with the specified
528 // frame as the default; the url must be relative to interface.
529 function loadFrameDual(tname
, bname
, topurl
, boturl
) {
530 var topusage
= tname
.substring(3);
531 var botusage
= bname
.substring(3);
532 if (active_pid
== 0 && (topusage
> '0' || botusage
> '0')) {
533 alert('<?php xl('You must first select
or add a patient
.','e
') ?>');
536 if (active_encounter
== 0 && (topusage
> '1' || botusage
> '1')) {
537 alert('<?php xl('You must first select
or create an encounter
.','e
') ?>');
540 if (encounter_locked
&& (topusage
> '1' || botusage
> '1')) {
541 alert('<?php echo xls('This encounter is locked
. No
new forms can be added
.') ?>');
544 var f
= document
.forms
[0];
546 top
.restoreSession();
547 var i
= topurl
.indexOf('{PID}');
548 if (i
>= 0) topurl
= topurl
.substring(0,i
) + active_pid + topurl
.substring(i+
5);
549 i
= boturl
.indexOf('{PID}');
550 if (i
>= 0) boturl
= boturl
.substring(0,i
) + active_pid + boturl
.substring(i+
5);
551 top
.frames
.RTop
.location
= '<?php echo "$web_root/interface/" ?>' + topurl
;
552 top
.frames
.RBot
.location
= '<?php echo "$web_root/interface/" ?>' + boturl
;
558 // Set disabled/enabled state of radio buttons and associated labels
559 // depending on whether there is an active patient or encounter.
560 function syncRadios() {
561 var f
= document
.forms
[0];
562 encounter_locked
= isEncounterLocked(active_encounter
);
563 var nlinks
= document
.links
.length
;
564 for (var i
= 0; i
< nlinks
; ++i
) {
565 var lnk
= document
.links
[i
];
566 if (lnk
.id
.length
!= 4) continue;
567 var usage
= lnk
.id
.substring(3);
568 if (usage
== '1' || usage
== '2') {
570 if (active_pid
== 0) da
= true;
571 if (active_encounter
== 0 && usage
> '1') da
= true;
572 if (encounter_locked
&& usage
> '1') da
= true;
574 if ($GLOBALS['menu_styling_vertical'] == 0){
575 $color = "'#0000ff'";
576 }else{ // ($GLOBALS['menu_styling_vertical'] == 1)
577 $color = "'#000000'";
580 lnk
.style
.color
= da ?
'#888888' : <?php
echo $color; ?
>;
583 f
.popups
.disabled
= (active_pid
== 0);
587 top
.frames
['RTop'].location
='<?php echo $GLOBALS['default_top_pane
']?>';
588 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';
591 //Function to clear active patient and encounter in the server side
592 function clearactive() {
593 top
.restoreSession();
594 //Ajax call to clear active patient in session
597 url
: "<?php echo $GLOBALS['webroot'] ?>/library/ajax/unset_session_ajax.php",
598 data
: { func
: "unset_pid"},
599 success
:function( msg
) {
601 top
.frames
['RTop'].location
='<?php echo $GLOBALS['default_top_pane
']?>';
602 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';
606 $
(parent
.Title
.document
.getElementById('clear_active')).hide();
608 // Reference to the search.php window.
611 // Open the search.php window.
612 function initFilter() {
613 my_window
= window
.open("../../custom/search.php", "mywindow","status=1");
616 // This is called by the search.php (Filter) window.
617 function processFilter(fieldString
, serviceCode
) {
618 var f
= document
.forms
[0];
619 document
.getElementById('searchFields').value
= fieldString
;
620 f
.search_service_code
.value
= serviceCode
;
621 findPatient("Filter");
622 f
.search_service_code
.value
= '';
626 // Process the click to find a patient by name, id, ssn or dob.
627 function findPatient(findby
) {
628 var f
= document
.forms
[0];
629 if (! f
.cb_top
.checked
) {
630 f
.cb_top
.checked
= true;
633 f
.findBy
.value
= findby
;
634 top
.restoreSession();
635 document
.find_patient
.submit();
638 // Helper function to set the contents of a div.
639 function setSomeContent(id
, content
, doc
) {
640 if (doc
.getElementById
) {
641 var x
= doc
.getElementById(id
);
643 x
.innerHTML
= content
;
647 x
.innerHTML
= content
;
650 function setDivContent(id
, content
) {
651 setSomeContent(id
, content
, document
);
653 function setTitleContent(id
, content
) {
654 setSomeContent(id
, content
, parent
.Title
.document
);
657 // This is called automatically when a new patient is set, to make sure
658 // there are no patient-specific documents showing stale data. If a frame
659 // was just loaded with data for the correct patient, its name is passed so
660 // that it will not be zapped. At this point the new server-side pid is not
661 // assumed to be set, so this function will only load global data.
662 function reloadPatient(frname
) {
663 var f
= document
.forms
[0];
664 if (topName
.length
> 3 && topName
.substring(3) > '0' && frname
!= 'RTop') {
665 loadFrame('cal0','RTop', '<?php echo $primary_docs['cal
'][2]; ?>');
667 if (botName
.length
> 3 && botName
.substring(3) > '0' && frname
!= 'RBot') {
668 loadFrame('ens0','RBot', '<?php echo $primary_docs['ens
'][2]; ?>');
672 // Reload encounter-specific frames, excluding a specified frame. At this
673 // point the new server-side encounter ID may not be set and loading the same
674 // document for the new encounter will not work, so load patient info instead.
675 function reloadEncounter(frname
) {
676 var f
= document
.forms
[0];
677 if (topName
.length
> 3 && topName
.substring(3) > '1' && frname
!= 'RTop') {
678 loadFrame('dem1','RTop', '<?php echo $primary_docs['dem
'][2]; ?>');
680 if (botName
.length
> 3 && botName
.substring(3) > '1' && frname
!= 'RBot') {
681 loadFrame('ens1','RBot', '<?php echo $primary_docs['ens
'][2]; ?>');
686 // Commented out this code block are part of the removal of the athletic team code TLH
688 // Clear and reload issue-related menu items for active_pid.
689 // Currently this only applies to athletic teams, but might be implemented
690 // in the general menu at some future time.
692 //function reloadIssues() {
694 //if ($GLOBALS['athletic_team']) {
695 // Generates a menu item for each active issue that this patient
696 // has of each issue type. Each one looks like this:
697 // Onset-Date [Add] Issue-Title
698 // where the first part is a link to open the issue dialog,
699 // [Add] is a link that auto-creates and opens a new encounter, and
700 // Issue-Title is a link that shows related encounters.
701 //foreach ($ISSUE_TYPES as $key => $value) {
703 //$('#icontainer_<?php echo $key ?>').empty();
704 //if (active_pid != 0) {
705 // $('#icontainer_<?php echo $key ?>').append("<li>" +
706 // "<a href='' id='xxx1' onclick='return repPopup(" +
707 // "\"../patient_file/summary/add_edit_issue.php?thistype=" +
708 // "<?php echo $key; ?>\")' " +
709 // "title='<?php echo xl('Create new issue'); ?>'>" +
710 // "<?php echo xl('New') . " " . $value[1]; ?></a></li>");
711 // top.restoreSession();
712 // $.getScript('../../library/ajax/left_nav_issues_ajax.php?type=<?php echo $key; ?>');
718 //} // end function reloadIssues
720 // This is referenced in left_nav_issues_ajax.php and is called when [Add]
721 // is clicked for an issue menu item to add a new encounter for the issue.
722 // So far this only applies to the Athletic Team version of the menu.
724 //function addEncNotes(issue) {
726 // top.restoreSession();
727 // $.getScript('../../library/ajax/left_nav_encounter_ajax.php?createvisit=1&issue=' + issue);
729 // The above AJAX call was to create the encounter right away, but we later
730 // (2012-07-03) decided it's better to present the New Encounter form instead.
731 // Note the issue ID is passed so it will be pre-selected in that form.
732 //loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=&issue=' + issue);
737 // Commented out the above code block are part of the removal of the athletic team code TLH
741 // Call this to announce that the patient has changed. You must call this
742 // if you change the session PID, so that the navigation frame will show the
743 // correct patient and so that the other frame will be reloaded if it contains
744 // patient-specific information from the previous patient. frname is the name
745 // of the frame that the call came from, so we know to only reload content
746 // from the *other* frame if it is patient-specific.
747 function setPatient(pname
, pid
, pubpid
, frname
, str_dob
) {
748 var str
= '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentPatientFromTitle()" title="PID = ' + pid +
'"><b>' + pname +
' (' + pubpid +
')<br /></b></a>';
749 setDivContent('current_patient', str
);
750 setTitleContent('current_patient', str + str_dob
);
751 if (pid
== active_pid
) return;
752 setDivContent('current_encounter', '<b><?php xl('None
','e
'); ?></b>');
754 active_encounter
= 0;
755 encounter_locked
= false;
756 if (frname
) reloadPatient(frname
);
758 $
(parent
.Title
.document
.getElementById('current_patient_block')).show();
759 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
760 $
(encounter_block
).hide();
762 // zero out the encounter frame, replace it with the encounter list frame
763 var f
= document
.forms
[0];
764 if ( f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
765 var encounter_frame
= getEncounterTargetFrame('enc');
766 if ( encounter_frame
!= undefined
) {
767 loadFrame('ens0',encounter_frame
, '<?php echo $primary_docs['ens
'][2]; ?>');
771 $
(parent
.Title
.document
.getElementById('clear_active')).show();//To display Clear Active Patient button on selecting a patient
773 function setPatientEncounter(EncounterIdArray
,EncounterDateArray
,CalendarCategoryArray
) {
774 //This function lists all encounters of the patient.
775 //This function writes the drop down in the top frame.
776 //It is called when a new patient is create/selected from the search menu.
777 var str
= '<Select class="text" id="EncounterHistory" onchange="{top.restoreSession();toencounter(this.options[this.selectedIndex].value)}">';
778 str+
='<option value=""><?php echo htmlspecialchars( xl('Encounter History
'), ENT_QUOTES) ?></option>';
779 str+
='<option value="New Encounter"><?php echo htmlspecialchars( xl('New Encounter
'), ENT_QUOTES) ?></option>';
780 str+
='<option value="Past Encounter List"><?php echo htmlspecialchars( xl('Past Encounter
List'), ENT_QUOTES) ?></option>';
781 for(CountEncounter
=0;CountEncounter
<EncounterDateArray
.length
;CountEncounter++
)
783 str+
='<option value="'+EncounterIdArray
[CountEncounter
]+
'~'+EncounterDateArray
[CountEncounter
]+
'">'+EncounterDateArray
[CountEncounter
]+
'-'+CalendarCategoryArray
[CountEncounter
]+
'</option>';
786 $
(parent
.Title
.document
.getElementById('past_encounter_block')).show();
787 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
=str
;
790 function loadCurrentPatientFromTitle() {
791 top
.restoreSession();
792 top
.frames
['RTop'].location
='../patient_file/summary/demographics.php';
795 function getEncounterTargetFrame( name
) {
796 var bias
= <?php
echo $primary_docs[ 'enc' ][ 1 ]?
>;
797 var f
= document
.forms
[0];
799 if (f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
806 if ( f
.cb_top
.checked
) {
808 } else if ( f
.cb_bot
.checked
) {
814 function isEncounterLocked( encounterId
) {
815 <?php
if ( $esignApi->lockEncounters() ) { ?
>
816 // If encounter locking is enabled, make a syncronous call (async=false) to check the
817 // DB to see if the encounter is locked.
818 // Call restore session, just in case
819 top
.restoreSession();
822 url
: '<?php echo $GLOBALS['webroot
']?>/interface/esign/index.php?module=encounter&method=esign_is_encounter_locked',
823 data
: { encounterId
: encounterId
},
824 success
: function( data
) {
825 encounter_locked
= data
;
830 return encounter_locked
;
832 // If encounter locking isn't enabled, just tell the left_nav that the encounter
837 // Call this to announce that the encounter has changed. You must call this
838 // if you change the session encounter, so that the navigation frame will
839 // show the correct encounter and so that the other frame will be reloaded if
840 // it contains encounter-specific information from the previous encounter.
841 // frname is the name of the frame that the call came from, so we know to only
842 // reload encounter-specific content from the *other* frame.
843 function setEncounter(edate
, eid
, frname
) {
844 if (eid
== active_encounter
) return;
845 if (!eid
) edate
= '<?php xl('None
','e
'); ?>';
846 var str
= '<b>' + edate +
'</b>';
847 setDivContent('current_encounter', str
);
848 active_encounter
= eid
;
849 encounter_locked
=isEncounterLocked(active_encounter
);
850 reloadEncounter(frname
);
852 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
853 var encounter
= $
(parent
.Title
.document
.getElementById('current_encounter'));
854 var estr
= '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentEncounterFromTitle()"><b>' + edate +
' (' + eid +
')</b></a>';
855 encounter
.html( estr
);
856 encounter_block
.show();
859 function loadCurrentEncounterFromTitle() {
860 top
.restoreSession();
861 top
.frames
[ parent
.left_nav
.getEncounterTargetFrame('enc') ].location
='../patient_file/encounter/encounter_top.php';
864 // You must call this if you delete the active patient (or if for any other
865 // reason you "close" the active patient without opening a new one), so that
866 // the appearance of the navigation frame will be correct and so that any
867 // stale content will be reloaded.
868 function clearPatient() {
869 if (active_pid
== 0) return;
870 var f
= document
.forms
[0];
872 active_encounter
= 0;
873 encounter_locked
= false;
874 setDivContent('current_patient', '<b><?php xl('None
','e
'); ?></b>');
875 $
(parent
.Title
.document
.getElementById('current_patient_block')).hide();
876 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
='';
877 $
(parent
.Title
.document
.getElementById('current_encounter_block')).hide();
882 // You must call this if you delete the active encounter (or if for any other
883 // reason you "close" the active encounter without opening a new one), so that
884 // the appearance of the navigation frame will be correct and so that any
885 // stale content will be reloaded.
886 function clearEncounter() {
887 if (active_encounter
== 0) return;
888 top
.window
.parent
.Title
.document
.getElementById('current_encounter').innerHTML
="<b><?php echo htmlspecialchars( xl('None'), ENT_QUOTES) ?></b>";
889 active_encounter
= 0;
890 encounter_locked
= false;
894 function removeOptionSelected(EncounterId
)
895 {//Removes an item from the Encounter drop down.
896 var elSel
= top
.window
.parent
.Title
.document
.getElementById('EncounterHistory');
898 for (i
= elSel
.length
- 1; i
>=2; i
--) {
899 EncounterHistoryValue
=elSel
.options
[i
].value
;
900 EncounterHistoryValueArray
=EncounterHistoryValue
.split('~');
901 if (EncounterHistoryValueArray
[0]==EncounterId
) {
907 // You can call this to make sure the session pid is what we expect.
908 function pidSanityCheck(pid
) {
909 if (pid
!= active_pid
) {
910 alert('Session patient ID is ' + pid +
', expecting ' + active_pid +
911 '. This session is unstable and should be abandoned. Do not use ' +
912 'OpenEMR in multiple browser windows!');
918 // You can call this to make sure the session encounter is what we expect.
919 function encounterSanityCheck(eid
) {
920 if (eid
!= active_encounter
) {
921 alert('Session encounter ID is ' + eid +
', expecting ' + active_encounter +
922 '. This session is unstable and should be abandoned. Do not use ' +
923 'OpenEMR in multiple browser windows!');
930 function repPopup(aurl
) {
931 top
.restoreSession();
932 window
.open('<?php echo "$web_root/interface/reports/" ?>' + aurl
, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
936 // This is invoked to pop up some window when a popup item is selected.
937 function selpopup(selobj
) {
938 var i
= selobj
.selectedIndex
;
939 var opt
= selobj
.options
[i
];
943 if (opt
.text
== 'Export' || opt
.text
== 'Import') {
947 dlgopen(opt
.value
, '_blank', width
, height
);
949 selobj
.selectedIndex
= 0;
951 // Treeview activation stuff:
952 $
(document
).ready(function(){
953 if(1 == <?php
echo $GLOBALS['menu_styling_vertical'] ?
>){
954 $
("#navigation-slide > li > a.collapsed + ul").slideToggle("medium");
955 $
("#navigation-slide > li > ul > li > a.collapsed_lv2 + ul").slideToggle("medium");
956 $
("#navigation-slide > li > a.expanded").click(function() {
957 $
("#navigation-slide > li > a.expanded").not(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
958 $
(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
960 $
("#navigation-slide > li > a.collapsed").click(function() {
961 $
("#navigation-slide > li > a.expanded").not(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
962 $
(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
964 $
("#navigation-slide > li > ul > li > a.expanded_lv2").click(function() {
965 $
("#navigation-slide > li > a.expanded").next("ul").find("li > a.expanded_lv2").not(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
966 $
(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
968 $
("#navigation-slide > li > ul > li > a.collapsed_lv2").click(function() {
969 $
("#navigation-slide > li > a.expanded").next("ul").find("li > a.expanded_lv2").not(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
970 $
(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
972 $
("#navigation-slide > li > a#cal0").prepend('<i class="fa fa-fw fa-calendar"></i> ');
973 $
("#navigation-slide > li > a#pfb0").prepend('<i class="fa fa-fw fa-list-alt"></i> ');
974 $
("#navigation-slide > li > a#msg0").prepend('<i class="fa fa-fw fa-envelope-o"></i> ');
975 $
("#navigation-slide > li > a#app0").prepend('<i class="fa fa-fw fa-user"></i> ');
976 $
("#navigation-slide > li > a#ppo0").prepend('<i class="fa fa-fw fa-user"></i> ');
977 $
("#navigation-slide > li > a#repimg").prepend('<i class="fa fa-fw fa-area-chart"></i> ');
978 $
("#navigation-slide > li > a#feeimg").prepend('<i class="fa fa-fw fa-dollar"></i> ');
979 $
("#navigation-slide > li > a#adm0").prepend('<i class="fa fa-fw fa-list-ol"></i> ');
980 $
("#navigation-slide > li > a#invimg").prepend('<i class="fa fa-fw fa-list-ol"></i> ');
981 $
("#navigation-slide > li > a#admimg").prepend('<i class="fa fa-fw fa-cogs"></i> ');
982 $
("#navigation-slide > li > a#misimg").prepend('<i class="fa fa-fw fa-cog"></i> ');
983 $
("#navigation-slide > li > a#proimg").prepend('<i class="fa fa-fw fa-stethoscope"></i> ');
984 $
("#navigation-slide > li > a#modimg").prepend('<i class="fa fa-fw fa-puzzle-piece"></i> ');
985 $
("#navigation-slide > li").each(function(index
) {
986 if($
(" > ul > li", this
).size() == 0){
987 $
(" > a", this
).addClass("collapsed");
990 } else { // $GLOBALS['menu_styling_vertical'] == 0
992 //Remove the links (used by the sliding menu) that will break treeview
993 $
('a.collapsed').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
994 $
('a.collapsed_lv2').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
995 $
('a.expanded').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
996 $
('a.expanded_lv2').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
999 $
("#navigation").treeview({
1003 toggle
: function() {
1004 window
.console
&& console
.log("%o was toggled", this
);
1014 <body
class="body_nav main-left">
1016 <form method
='post' name
='find_patient' target
='RTop'
1017 action
='<?php echo $rootdir ?>/main/finder/patient_select.php'>
1020 <select name
='sel_frame' style
='background-color:transparent;font-size:9pt;width:100;'>
1021 <option value
='0'><?php
xl('Default','e'); ?
></option
>
1022 <option value
='1'><?php
xl('Top','e'); ?
></option
>
1023 <option value
='2'><?php
xl('Bottom','e'); ?
></option
>
1027 <table cellpadding
='0' cellspacing
='0' border
='0' width
='100%'>
1029 <td
class='smalltext' nowrap
>
1030 <input type
='checkbox' name
='cb_top' onclick
='toggleFrame(1)' <?php
echo $cb_top_chk ?
> />
1031 <b
><?php
xl('Top','e') ?
></b
>
1033 <td
class='smalltext' align
='right' nowrap
>
1034 <b
><?php
xl('Bot','e') ?
></b
>
1035 <input type
='checkbox' name
='cb_bot' onclick
='toggleFrame(2)' <?php
echo $cb_bot_chk ?
> />
1040 <?php
if ( $GLOBALS['menu_styling_vertical'] == 1) { ?
>
1041 <ul id
="navigation-slide">
1042 <?php
} else { // ($GLOBALS['menu_styling_vertical'] == 0) ?>
1043 <ul id
="navigation">
1046 <?php
if (!$GLOBALS['disable_calendar'] && !$GLOBALS['ippf_specific']) genTreeLink('RTop','cal',xl('Calendar')); ?
>
1047 <?php
if (!$GLOBALS['disable_pat_trkr'] && !$GLOBALS['disable_calendar']) genTreeLink('RTop','pfb',xl('Flow Board')); ?
>
1048 <?php
genTreeLink('RBot','msg',xl('Messages')); ?
>
1049 <?php
if($GLOBALS['portal_offsite_enable'] && $GLOBALS['portal_offsite_address'] && acl_check('patientportal','portal')) genTreeLink('RTop','app',xl('Portal Activity')); ?
>
1051 if ($GLOBALS['gbl_portal_cms_enable'] && acl_check('patientportal','portal')) {
1052 // genTreeLink('RTop','ppo',xl('WordPress Portal'));
1053 genPopLink(xl('CMS Portal'),'../cmsportal/list_requests.php','ppo0');
1057 <li
class="open"><a
class="expanded" id
="patimg" ><i
class="fa fa-fw fa-user"></i
> 
;<span
><?php
xl('Patient/Client','e') ?
></span
></a
>
1059 <?php
genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?
>
1060 <?php
genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ?
xl('New/Search') : xl('New'))); ?
>
1061 <?php
genTreeLink('RTop','dem',xl('Summary')); ?
>
1062 <li
class="open"><a
class="expanded_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1064 <?php
if ($GLOBALS['ippf_specific'] && !$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar')); ?
>
1065 <?php
genTreeLink('RBot','nen',xl('Create Visit')); ?
>
1066 <?php
genTreeLink('RBot','enc',xl('Current')); ?
>
1067 <?php
genTreeLink('RBot','ens',xl('Visit History')); ?
>
1071 <li
><a
class="collapsed_lv2"><span
><?php
xl('Records','e') ?
></span
></a
>
1073 <?php
genTreeLink('RTop','prq',xl('Patient Record Request')); ?
>
1077 <?php
if ($GLOBALS['gbl_nav_visit_forms']) { ?
>
1078 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visit Forms','e') ?
></span
></a
>
1081 // Generate the items for visit forms, both traditional and LBF.
1084 $lres = sqlStatement("SELECT * FROM list_options " .
1085 "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title");
1086 while ($lrow = sqlFetchArray($lres)) {
1087 $option_id = $lrow['option_id']; // should start with LBF
1088 $title = $lrow['title'];
1089 // Check ACO attribute, if any, of this LBF.
1090 $jobj = json_decode($lrow['notes'], true);
1091 if (!empty($jobj['aco'])) {
1092 $tmp = explode('|', $jobj['aco']);
1093 if (!acl_check($tmp[0], $tmp[1])) continue;
1095 genMiscLink('RBot','cod','2',xl_form_title($title),
1096 "patient_file/encounter/load_form.php?formname=$option_id");
1098 include_once("$srcdir/registry.inc");
1099 $reg = getRegistered();
1101 foreach ($reg as $entry) {
1102 $option_id = $entry['directory'];
1103 $title = trim($entry['nickname']);
1104 if ($option_id == 'fee_sheet' ) continue;
1105 if ($option_id == 'newpatient') continue;
1106 if (empty($title)) $title = $entry['name'];
1107 genMiscLink('RBot','cod','2',xl_form_title($title),
1108 "patient_file/encounter/load_form.php?formname=" .
1109 urlencode($option_id));
1115 <li
class="collapsed" ><a
class="collapsed_lv2"><span
><?php
echo xlt('Import') ?
></span
></a
>
1117 <?php
genMiscLink('RTop','ccr','0',xlt('Upload'),'patient_file/ccr_import.php'); ?
>
1118 <?php
genMiscLink('RTop','apr','0',xlt('Pending Approval'),'patient_file/ccr_pending_approval.php'); ?
>
1121 <?php
} // end if gbl_nav_visit_forms ?>
1125 <?php
// TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1126 <?php
if(!isset($GLOBALS['enable_fees_in_left_menu']) ||
$GLOBALS['enable_fees_in_left_menu'] == 1){ ?
>
1127 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('Fees','e') ?
></span
></a
>
1129 <?php
genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?
>
1130 <?php
if ($GLOBALS['use_charges_panel']) genTreeLink('RBot','cod',xl('Charges')); ?
>
1131 <?php
genMiscLink('RBot','pay','1',xl('Payment'),'patient_file/front_payment.php'); ?
>
1132 <?php
genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?
>
1133 <?php
if (! $GLOBALS['simplified_demographics']) genTreeLink('RTop','bil',xl('Billing')); ?
>
1134 <?php
if ($GLOBALS['enable_batch_payment']) genTreeLink('RTop','npa',xl('Batch Payments'),false,2);?
>
1135 <?php
if ($GLOBALS['enable_posting']) genMiscLink('RTop','eob','0',xl('Posting'), 'billing/sl_eob_search.php'); ?
>
1136 <?php
if ($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob')) genTreeLink('RTop','edi',xl('EDI History'),false,2);?
>
1140 <?php
if (acl_check('menus', 'modle')) {?
>
1141 <li
><a
class="collapsed" id
="modimg" ><span
><?php
echo xlt('Modules') ?
></span
></a
>
1143 <?php
genMiscLink('RTop','adm','0',xl('Manage Modules'),'modules/zend_modules/public/Installer'); ?
>
1144 <?php
//genTreeLink('RTop','ort',xl('Settings')); ?>
1147 $module_query = sqlStatement("select mod_directory,mod_name,mod_nick_name,mod_relative_link,type from modules where mod_active = 1 AND sql_run= 1 order by mod_ui_order asc");
1148 if (sqlNumRows($module_query)) {
1149 while ($modulerow = sqlFetchArray($module_query)) {
1150 $acl_section = strtolower($modulerow['mod_directory']);
1151 $disallowed[$acl_section] = zh_acl_check($_SESSION['authUserID'],$acl_section) ?
"" : "1";
1154 if($modulerow['type'] == 0) {
1155 $modulePath = $GLOBALS['customModDir'];
1160 $modulePath = $GLOBALS['zendModDir'];
1163 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$added;
1164 $mod_nick_name = $modulerow['mod_nick_name'] ?
$modulerow['mod_nick_name'] : $modulerow['mod_name'];
1166 <?php
genMiscLink2('RTop',$acl_section,'0',xlt($mod_nick_name),$relative_link);?
>
1172 <?php
// if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?>
1173 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?
>
1174 <li
><a
class="collapsed" id
="invimg" ><span
><?php
xl('Inventory','e') ?
></span
></a
>
1176 <?php
genMiscLink('RTop','adm','0',xl('Management'),'drugs/drug_inventory.php'); ?
>
1177 <?php
genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?
>
1181 <li
><a
class="collapsed" id
="proimg" ><span
><?php
xl('Procedures','e') ?
></span
></a
>
1183 <?php
genTreeLink('RTop','orl',xl('Providers')); ?
>
1184 <?php
genTreeLink('RTop','ort',xl('Configuration')); ?
>
1185 <?php
genTreeLink('RTop','orc',xl('Load Compendium')); ?
>
1186 <?php
genTreeLink('RTop','orp',xl('Pending Review')); ?
>
1187 <?php
genTreeLink('RTop','orr',xl('Patient Results')); ?
>
1188 <?php
genTreeLink('RTop','lda',xl('Lab Overview')); ?
>
1189 <?php
genTreeLink('RTop','orb',xl('Batch Results')); ?
>
1190 <?php
genTreeLink('RTop','ore',xl('Electronic Reports')); ?
>
1191 <?php
genTreeLink('RTop','dld',xl('Lab Documents'));?
>
1195 if($GLOBALS['erx_enable']) {
1196 $newcrop_user_role = sqlQuery("SELECT newcrop_user_role FROM users WHERE username = '".$_SESSION['authUser']."'");
1197 if($newcrop_user_role['newcrop_user_role']) {
1199 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('New Crop','e') ?
></span
></a
>
1201 <li
><a
class="collapsed_lv2"><span
><?php
xl('Status','e') ?
></span
></a
>
1203 <?php
genTreeLink('RTop','erx',xl('e-Rx')); ?
>
1204 <?php
genMiscLink('RTop','err','0',xl('e-Rx Renewal'),'eRx.php?page=status'); ?
>
1205 <?php
if($newcrop_user_role['newcrop_user_role'] === 'erxadmin') genMiscLink('RTop','ere','0',xl('e-Rx EPCS'),'eRx.php?page=epcs-admin'); ?
>
1214 <?php
if (!$disallowed['adm']) { ?
>
1215 <li
><a
class="collapsed" id
="admimg" ><span
><?php
xl('Administration','e') ?
></span
></a
>
1217 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?
>
1218 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?
>
1219 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?
>
1220 <?php
if (acl_check('admin', 'practice' )) genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1222 // Changed the target URL from practice settings -> Practice Settings - Pharmacy... Dec 09,09 .. Visolve ... This replaces empty frame with Pharmacy window
1223 if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings&pharmacy&action=list'); ?
>
1224 <?php
if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?
>
1225 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?
>
1226 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?
>
1227 <?php
if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?
>
1228 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?
>
1229 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?
>
1230 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Rules'),'super/rules/index.php?action=browse!list'); ?
>
1231 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Alerts'),'super/rules/index.php?action=alerts!listactmgr'); ?
>
1232 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Patient Reminders'),'patient_file/reminder/patient_reminders.php?mode=admin&patient_id='); ?
>
1233 <?php
if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?
>
1234 <?php
if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('Re Identification'),'de_identification_forms/re_identification_input_screen.php'); ?
>
1235 <?php
if (acl_check('admin', 'super') && !empty($GLOBALS['code_types']['IPPF'])) genMiscLink('RTop','adm','0',xl('Export'),'main/ippf_export.php'); ?
>
1236 <li
><a
class="collapsed_lv2"><span
><?php
xl('Other','e') ?
></span
></a
>
1238 <?php
if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?
>
1239 <?php
if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?
>
1240 <?php
if (acl_check('admin', 'calendar') && !$GLOBALS['disable_calendar']) genMiscLink('RTop','adm','0',xl('Calendar'),'main/calendar/index.php?module=PostCalendar&type=admin&func=modifyconfig'); ?
>
1241 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?
>
1243 if($newcrop_user_role['newcrop_user_role'] ||
$GLOBALS['erx_enable']) {
1244 if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('eRx Logs'),'logview/erx_logview.php');
1247 <?php
if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?
>
1248 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?
>
1249 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Native Data Loads'),'../interface/super/load_codes.php'); ?
>
1250 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('External Data Loads'),'../interface/code_systems/dataloads_ajax.php'); ?
>
1251 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Merge Patients'),'patient_file/merge_patients.php'); ?
>
1252 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Import Holidays'),'../interface/main/holidays/import_holidays.php'); ?
>
1253 <?php
if ($GLOBALS['enable_auditlog_encryption']) genMiscLink('RTop','rep','0',xl('Audit Log Tamper'),'reports/audit_log_tamper_report.php'); ?
>
1259 <li
><a
class="collapsed" id
="repimg" ><span
><?php
xl('Reports','e') ?
></span
></a
>
1262 $module_query = sqlStatement("SELECT msh.*,ms.menu_name,ms.path,m.mod_ui_name,m.type FROM modules_hooks_settings AS msh LEFT OUTER JOIN modules_settings AS ms ON
1263 obj_name=enabled_hooks AND ms.mod_id=msh.mod_id LEFT OUTER JOIN modules AS m ON m.mod_id=ms.mod_id
1264 WHERE fld_type=3 AND mod_active=1 AND sql_run=1 AND attached_to='reports' ORDER BY mod_id");
1265 if (sqlNumRows($module_query)) {
1268 while ($modulerow = sqlFetchArray($module_query)) {
1271 if($modulerow['type'] == 0) {
1272 $modulePath = $GLOBALS['customModDir'];
1277 $modulePath = $GLOBALS['zendModDir'];
1280 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$modulerow['path'];
1281 $mod_nick_name = $modulerow['menu_name'] ?
$modulerow['menu_name'] : 'NoName';
1283 if($jid==0 ||
($modid!=$modulerow['mod_id'])){
1287 <li
><a
class="collapsed_lv2"><span
><?php
echo xlt($modulerow['mod_ui_name']); ?
></span
></a
>
1292 $modid = $modulerow['mod_id'];
1293 genMiscLink('RTop','adm','0',xlt($mod_nick_name),$relative_link);
1297 <li
><a
class="collapsed_lv2"><span
><?php
xl('Clients','e') ?
></span
></a
>
1299 <?php
genMiscLink('RTop','rep','0',xl('List'),'reports/patient_list.php'); ?
>
1300 <?php
if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genMiscLink('RTop','rep','0',xl('Rx'),'reports/prescriptions_report.php'); ?
>
1301 <?php
if (acl_check('patients', 'med')) genMiscLink('RTop','rep','0',xl('Patient List Creation'),'reports/patient_list_creation.php'); ?
>
1302 <?php
if (acl_check('patients', 'med')) genMiscLink('RTop','rep','0',xl('Clinical'),'reports/clinical_reports.php'); ?
>
1303 <?php
genMiscLink('RTop','rep','0',xl('Referrals'),'reports/referrals_report.php'); ?
>
1304 <?php
genMiscLink('RTop','rep','0',xl('Immunization Registry'),'reports/immunization_report.php'); ?
>
1307 <li
><a
class="collapsed_lv2"><span
><?php
xl('Clinic','e') ?
></span
></a
>
1309 <?php
if ($GLOBALS['enable_cdr'] ||
$GLOBALS['enable_cqm'] ||
$GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Report Results'),'reports/report_results.php'); ?
>
1310 <?php
if ($GLOBALS['enable_cdr']) genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?
>
1311 <?php
if ($GLOBALS['enable_cqm']) genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?
>
1312 <?php
if ($GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?
>
1313 <?php
if ($GLOBALS['enable_amc_tracking']) genMiscLink('RTop','rep','0',xl('AMC Tracking'),'reports/amc_tracking.php'); ?
>
1314 <?php
if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_alert_log'] ) genMiscLink('RTop','rep','0',xl('Alerts Log'),'reports/cdr_log.php'); ?
>
1317 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1319 <?php
genMiscLink('RTop','rep','0',xl('Daily Report'),'reports/daily_summary_report.php'); ?
>
1320 <?php
if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appointments'),'reports/appointments_report.php'); ?
>
1321 <?php
if (!$GLOBALS['disable_pat_trkr'] && !$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Patient Flow Board'),'reports/patient_flow_board_report.php'); ?
>
1322 <?php
genMiscLink('RTop','rep','0',xl('Encounters'),'reports/encounters_report.php'); ?
>
1323 <?php
if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appt-Enc'),'reports/appt_encounter_report.php'); ?
>
1324 <?php
if (empty($GLOBALS['code_types']['IPPF'])) { ?
>
1325 <?php
genMiscLink('RTop','rep','0',xl('Superbill'),'reports/custom_report_range.php'); ?
>
1327 <?php
genMiscLink('RTop','rep','0',xl('Eligibility'),'reports/edi_270.php'); ?
>
1328 <?php
genMiscLink('RTop','rep','0',xl('Eligibility Response'),'reports/edi_271.php'); ?
>
1331 <?php
if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Chart Activity'),'reports/chart_location_activity.php'); ?
>
1332 <?php
if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Charts Out'),'reports/charts_checked_out.php'); ?
>
1333 <?php
genMiscLink('RTop','rep','0',xl('Services'), 'reports/services_by_category.php'); ?
>
1334 <?php
genMiscLink('RTop','rep','0',xl('Syndromic Surveillance'),'reports/non_reported.php'); ?
>
1337 <?php
if (acl_check('acct', 'rep_a')) { ?
>
1338 <li
><a
class="collapsed_lv2"><span
><?php
xl('Financial','e') ?
></span
></a
>
1340 <?php
genMiscLink('RTop','rep','0',xl('Sales'),'reports/sales_by_item.php'); ?
>
1341 <?php
genMiscLink('RTop','rep','0',xl('Cash Rec'), 'billing/sl_receipts_report.php'); ?
>
1342 <?php
genMiscLink('RTop','rep','0',xl('Front Rec'), 'reports/front_receipts_report.php'); ?
>
1343 <?php
genMiscLink('RTop','rep','0',xl('Pmt Method'), 'reports/receipts_by_method_report.php'); ?
>
1344 <?php
genMiscLink('RTop','rep','0',xl('Collections'), 'reports/collections_report.php'); ?
>
1345 <?php
genMiscLink('RTop','rep','0',xl('Pat Ledger'),'reports/pat_ledger.php?form=0'); ?
>
1346 <?php
genMiscLink('RTop','rep','0',xl('Financial Summary by Service Code'),'reports/svc_code_financial_report.php'); ?
>
1350 <?php
if ($GLOBALS['inhouse_pharmacy']) { ?
>
1351 <li
><a
class="collapsed_lv2"><span
><?php
xl('Inventory','e') ?
></span
></a
>
1353 <?php
genMiscLink('RTop','rep','0',xl('List'),'reports/inventory_list.php'); ?
>
1354 <?php
genMiscLink('RTop','rep','0',xl('Activity'),'reports/inventory_activity.php'); ?
>
1355 <?php
genMiscLink('RTop','rep','0',xl('Transactions'),'reports/inventory_transactions.php'); ?
>
1359 <li
><a
class="collapsed_lv2"><span
><?php
xl('Procedures','e') ?
></span
></a
>
1361 <?php
genPopLink(xl('Pending Res'),'../orders/pending_orders.php'); ?
>
1362 <?php
if (!empty($GLOBALS['code_types']['IPPF'])) genPopLink(xl('Pending F/U'),'../orders/pending_followup.php'); ?
>
1363 <?php
genPopLink(xl('Statistics'),'../orders/procedure_stats.php'); ?
>
1366 <?php
if (! $GLOBALS['simplified_demographics']) { ?
>
1367 <li
><a
class="collapsed_lv2"><span
><?php
xl('Insurance','e') ?
></span
></a
>
1369 <?php
genMiscLink('RTop','rep','0',xl('Distribution'),'reports/insurance_allocation_report.php'); ?
>
1370 <?php
genMiscLink('RTop','rep','0',xl('Indigents'),'billing/indigent_patients_report.php'); ?
>
1371 <?php
genMiscLink('RTop','rep','0',xl('Unique SP'),'reports/unique_seen_patients_report.php'); ?
>
1375 <?php
if (!empty($GLOBALS['code_types']['IPPF'])) { ?
>
1376 <li
><a
class="collapsed_lv2"><span
><?php
xl('Statistics','e') ?
></span
></a
>
1378 <?php
genPopLink(xl('IPPF Stats'),'ippf_statistics.php?t=i'); ?
>
1379 <?php
genPopLink(xl('GCAC Stats'),'ippf_statistics.php?t=g'); ?
>
1380 <?php
genPopLink(xl('MA Stats'),'ippf_statistics.php?t=m'); ?
>
1381 <?php
genPopLink(xl('CYP'),'ippf_cyp_report.php'); ?
>
1382 <?php
genPopLink(xl('Daily Record'),'ippf_daily.php'); ?
>
1385 <?php
} // end ippf-specific ?>
1386 <li
><a
class="collapsed_lv2"><span
><?php
xl('Blank Forms','e') ?
></span
></a
>
1388 <?php
genPopLink(xl('Demographics'),'../patient_file/summary/demographics_print.php'); ?
>
1389 <?php
genPopLink(xl('Superbill/Fee Sheet'),'../patient_file/printed_fee_sheet.php'); ?
>
1390 <?php
genPopLink(xl('Referral'),'../patient_file/transaction/print_referral.php'); ?
>
1392 $lres = sqlStatement("SELECT * FROM list_options " .
1393 "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title");
1394 while ($lrow = sqlFetchArray($lres)) {
1395 $option_id = $lrow['option_id']; // should start with LBF
1396 $title = $lrow['title'];
1397 // Check ACO attribute, if any, of this LBF.
1398 $jobj = json_decode($lrow['notes'], true);
1399 if (!empty($jobj['aco'])) {
1400 $tmp = explode('|', $jobj['aco']);
1401 if (!acl_check($tmp[0], $tmp[1])) continue;
1403 genPopLink($title, "../forms/LBF/printable.php?formname=$option_id");
1408 <?php
if (acl_check('admin','super')) { ?
>
1409 <li
><a
class="collapsed_lv2"><span
><?php
echo xlt('Services') ?
></span
></a
>
1411 <?php
genMiscLink('RTop','rep','0',xl('Background Services'),'reports/background_services.php'); ?
>
1412 <?php
genMiscLink('RTop','rep','0',xl('Direct Message Log'),'reports/direct_message_log.php'); ?
>
1417 <?php
// genTreeLink('RTop','rep','Other'); ?>
1420 <li
><a
class="collapsed" id
="misimg" ><span
><?php
xl('Miscellaneous','e') ?
></span
></a
>
1422 <?php
genTreeLink('RTop','ped',xl('Patient Education')); ?
>
1423 <?php
genTreeLink('RBot','aun',xl('Authorizations')); ?
>
1424 <?php
genTreeLink('RTop','fax',xl('Fax/Scan')); ?
>
1425 <?php
genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1426 <?php
genTreeLink('RTop','ort',xl('Order Catalog')); ?
>
1427 <?php
if (!$GLOBALS['disable_chart_tracker']) genTreeLink('RTop','cht',xl('Chart Tracker')); ?
>
1428 <?php
genTreeLink('RTop','ono',xl('Ofc Notes')); ?
>
1429 <?php
genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?
>
1430 <?php
$myrow = sqlQuery("SELECT state FROM registry WHERE directory = 'track_anything'");
1431 if($myrow['state']=='1') { genTreeLink('RTop','tan',xl('Configure Tracks')); } ?
>
1432 <?php
genTreeLink('RTop','pwd',xl('Password')); ?
>
1433 <?php
genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?
>
1434 <?php
if(acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=00'); ?
>
1435 <?php
if (acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('Document Templates'),'super/manage_document_templates.php'); ?
>
1443 <div id
='current_patient' style
= 'display:none'>
1444 <b
><?php
xl('None','e'); ?
></b
>
1447 <div id
='current_encounter' style
= 'display:none'>
1448 <b
><?php
xl('None','e'); ?
></b
>
1457 <input type
='hidden' name
='findBy' value
='Last' />
1458 <input type
="hidden" name
="searchFields" id
="searchFields"/>
1459 <input type
="hidden" name
="search_service_code" value
='' />
1463 <script language
='JavaScript'>
1466 function save_setting (cb_frames
) {
1467 for (var i
= 0, len
= cb_frames
.length
; i
< len
; i++
) {
1469 var fref
= '<?php echo $uspfx ?>frame' + i +
'_chk';
1470 var ureq
= $
.post( "<?php echo $GLOBALS['webroot'] ?>/library/ajax/user_settings.php",
1471 { lab
: fref
, val
: cb_frames
[i
] })
1472 .done(function(data
) {
1473 // alert( "Data Loaded: " + data );
1475 .fail(function(xhr
, textStatus
, errorThrown
) {
1476 alert("Error:"+xhr
.responseText+
"\n"+textStatus+
"\n"+errorThrown
);
1478 .always(function() {
1479 // alert( "finished" );
1483 alert (err
.message
);