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, 3 = therapy group-specific, 4 = therapy group 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 if($GLOBALS['enable_group_therapy']){
168 $primary_docs['gng'] = array(xl('New') , 0, 'therapy_groups/index.php?method=addGroup');
169 $primary_docs['gdg'] = array(xl('Group Details') , 3, '/therapy_groups/index.php?method=groupDetails&group_id=from_session');
170 $primary_docs['gcv'] = array(xl('Create Visit'), 3, 'forms/newGroupEncounter/new.php?autoloaded=1&calenc=');
171 $primary_docs['gce'] = array(xl('Current') , 4, 'patient_file/encounter/encounter_top.php');
172 $primary_docs['gvh'] = array(xl('Visit History'), 3, 'patient_file/history/encounters.php');
175 $esignApi = new Api();
176 // This section decides which navigation items will not appear.
178 $disallowed = array();
179 $disallowed['edi'] = !($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob'));
180 $disallowed['adm'] = !(acl_check('admin', 'calendar') ||
181 acl_check('admin', 'database') ||
acl_check('admin', 'forms') ||
182 acl_check('admin', 'practice') ||
acl_check('admin', 'users') ||
183 acl_check('admin', 'acl') ||
acl_check('admin', 'super') ||
184 acl_check('admin', 'superbill') ||
acl_check('admin', 'drugs'));
186 $disallowed['bil'] = !(acl_check('acct', 'eob') ||
acl_check('acct', 'bill'));
188 $disallowed['new'] = !(acl_check('patients','demo','',array('write','addonly') ));
190 $disallowed['fax'] = !(($GLOBALS['enable_hylafax'] ||
$GLOBALS['enable_scanner']) && acl_check('patients', 'docs'));
192 $disallowed['iss'] = !((acl_check('encounters','notes','','write') ||
193 acl_check('encounters','notes_a','','write') ) &&
194 acl_check('patients','med','','write') );
196 $disallowed['imp'] = $disallowed['new'] ||
!is_readable("$webserver_root/custom/import.php");
198 $disallowed['cht'] = !is_readable("$webserver_root/custom/chart_tracker.php");
200 $disallowed['pre'] = !(acl_check('patients', 'med'));
201 $disallowed['eob'] = !(acl_check('acct', 'eob'));
203 // Helper functions for treeview generation.
204 function genTreeLink($frame, $name, $title, $mono=false) {
205 global $primary_docs, $disallowed;
206 if (empty($disallowed[$name])) {
207 $id = $name . $primary_docs[$name][1];
208 echo "<li><a href='' id='$id' onclick=\"";
210 if ($frame == 'RTop')
211 echo "forceSpec(true,false);";
213 echo "forceSpec(false,true);";
215 echo "return loadFrame2('$id','$frame','" .
216 $primary_docs[$name][2] . "')\">" . $title . ($name == 'msg' ?
' <span id="reminderCountSpan" class="bold"></span>' : '')."</a></li>";
219 function genMiscLink($frame, $name, $level, $title, $url, $mono=false) {
221 if (empty($disallowed[$name])) {
222 $id = $name . $level;
223 echo "<li><a href='' id='$id' onclick=\"";
225 if ($frame == 'RTop')
226 echo "forceSpec(true,false);";
228 echo "forceSpec(false,true);";
230 echo "return loadFrame2('$id','$frame','" .
231 $url . "')\">" . $title . "</a></li>";
234 function genMiscLink2($frame, $name, $level, $title, $url, $mono=false,$mouseovertext="") {
236 if (empty($disallowed[$name])) {
238 $id = $name . $level;
239 echo "<li><a href='' id='$id' title='$mouseovertext' onclick=\"";
241 if ($frame == 'RTop')
242 echo "forceSpec(true,false);";
244 echo "forceSpec(false,true);";
246 echo "return loadFrame3('$id','$frame','" .
247 $url . "')\">" . $title . "</a></li>";
250 function genPopLink($title, $url, $linkid='') {
251 echo "<li><a href='' ";
252 if ($linkid) echo "id='$linkid' ";
253 echo "onclick=\"return repPopup('$url')\"" .
254 ">" . $title . "</a></li>";
256 function genDualLink($topname, $botname, $title) {
257 global $primary_docs, $disallowed;
258 if (empty($disallowed[$topname]) && empty($disallowed[$botname])) {
259 $topid = $topname . $primary_docs[$topname][1];
260 $botid = $botname . $primary_docs[$botname][1];
261 echo "<li><a href='' id='$topid' " .
262 "onclick=\"return loadFrameDual('$topid','$botid','" .
263 $primary_docs[$topname][2] . "','" .
264 $primary_docs[$botname][2] . "')\">" . $title . "</a></li>";
268 function genPopupsList($style='') {
269 global $disallowed, $webserver_root;
271 <select name
='popups' onchange
='selpopup(this)' style
='background-color:transparent;font-size:9pt;<?php echo $style; ?>'>
272 <option value
=''><?php
xl('Popups','e'); ?
></option
>
273 <?php
if (!$disallowed['iss']) { ?
>
274 <option value
='../patient_file/problem_encounter.php'><?php
xl('Issues','e'); ?
></option
>
276 <?php
if (!$GLOBALS['ippf_specific'] && acl_check('patients', 'demo')) { ?
>
277 <option value
='../../custom/export_xml.php'><?php
xl('Export','e'); ?
></option
>
278 <?php
if (acl_check('patients', 'demo', '', 'write')) { ?
>
279 <option value
='../../custom/import_xml.php'><?php
xl('Import','e'); ?
></option
>
281 if (!$GLOBALS['disable_calendar'] && acl_check('patients', 'appt')) { ?
>
282 <option value
='../reports/appointments_report.php?patient=<?php if(isset($pid)) {echo $pid;} ?>'><?php
xl('Appts','e'); ?
></option
>
284 <?php
if (acl_check('patients', 'med')) { ?
>
285 <option value
='../patient_file/printed_fee_sheet.php?fill=1'><?php
xl('Superbill','e'); ?
></option
>
287 <?php
if (acl_check('acct', 'bill', '', 'write')) { ?
>
288 <option value
='../patient_file/front_payment.php'><?php
xl('Payment','e'); ?
></option
>
290 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('acct', 'bill', '', 'write')) { ?
>
291 <option value
='../patient_file/pos_checkout.php'><?php
xl('Checkout','e'); ?
></option
>
293 <?php
if (is_dir($GLOBALS['OE_SITE_DIR'] . "/letter_templates") && acl_check('patients', 'med')) { ?
>
294 <option value
='../patient_file/letter.php'><?php
xl('Letter','e'); ?
></option
>
296 <?php
if ($GLOBALS['chart_label_type'] != '0' && acl_check('patients', 'demo')) { ?
>
297 <option value
='../patient_file/label.php'><?php
xl('Chart Label','e'); ?
></option
>
299 <?php
if ($GLOBALS['barcode_label_type'] != '0' && acl_check('patients', 'demo')) { ?
>
300 <option value
='../patient_file/barcode_label.php'><?php
xl('Barcode Label','e'); ?
></option
>
302 <?php
if ($GLOBALS['addr_label_type'] && acl_check('patients', 'demo')) { ?
>
303 <option value
='../patient_file/addr_label.php'><?php
xl('Address Label','e'); ?
></option
>
309 function genFindBlock() {
311 <table cellpadding
='0' cellspacing
='0' border
='0'>
313 <td
class='smalltext'><?php
xl('Find','e') ?
>: 
;</td
>
314 <td
class='smalltext' colspan
='2'>
315 <input type
="entry" size
="7" name
="patient" class='inputtext' style
='width:65px;' />
319 <td
class='smalltext'><?php
xl('by','e') ?
>:</td
>
320 <td
class='smalltext'>
321 <a href
="javascript:findPatient('Last');" class="navitem"><?php
xl('Name','e'); ?
></a
>
323 <td
class='smalltext' align
='right'>
324 <a href
="javascript:findPatient('ID');" class="navitem"><?php
xl('ID','e'); ?
></a
>
328 <td
class='smalltext'> 
;</td
>
329 <td
class='smalltext'>
330 <a href
="javascript:findPatient('SSN');" class="navitem"><?php
xl('SSN','e'); ?
></a
>
332 <td
class='smalltext' align
='right'>
333 <a href
="javascript:findPatient('DOB');" class="navitem"><?php
xl('DOB','e'); ?
></a
>
337 <td
class='smalltext'> 
;</td
>
338 <td
class='smalltext'>
339 <a href
="javascript:findPatient('Any');" class="navitem"><?php
xl('Any', 'e'); ?
></a
>
341 <td
class='smalltext' align
='right'>
342 <a href
="javascript:initFilter();" class="navitem"><?php
xl('Filter', 'e'); ?
></a
>
347 } // End function genFindBlock()
352 <title
>Navigation
</title
>
354 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
355 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'];?>/font-awesome-4-6-3/css/font-awesome.css" type
="text/css">
356 <style type
="text/css">
360 padding
: 5px
3px
5px
3px
;
363 font
-family
:sans
-serif
;
367 a
.navitem
, a
.navitem
:visited
{
369 font
-family
:sans
-serif
;
380 border
-color
: #000000;
381 background
-color
:transparent
;
385 background
-color
:transparent
;
387 #navigation-slide ul {
388 background
-color
:transparent
;
398 vertical
-align
:middle
;
402 <link rel
="stylesheet" href
="../../library/js/jquery.treeview-1.4.1/jquery.treeview.css" />
403 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-6-4/index.js"></script
>
404 <script type
="text/javascript" src
="../../library/js/jquery.treeview-1.4.1/jquery.treeview.js" ></script
>
406 <script type
="text/javascript" src
="../../library/dialog.js?v=<?php echo $v_js_includes; ?>"></script
>
408 <script language
='JavaScript'>
410 var usrval
= jQuery
.parseJSON('<?php echo $usrval ?>');
412 // tajemo work by CB 2012/01/31 12:32:57 PM dated reminders counter
413 function getReminderCount(){
414 top
.restoreSession();
415 // Send the skip_timeout_reset parameter to not count this as a manual entry in the
416 // timing out mechanism in OpenEMR.
417 $
.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
418 { skip_timeout_reset
: "1" },
420 $
("#reminderCountSpan").html(data
);
421 // run updater every 60 seconds
422 var repeater
= setTimeout("getReminderCount()", 60000);
424 //piggy-back on this repeater to run other background-services
425 //this is a silent task manager that returns no output
426 $
.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/execute_background_services.php",
427 { skip_timeout_reset
: "1", ajax
: "1" });
430 $
(document
).ready(function (){
431 getReminderCount();//
432 parent
.loadedFrameCount +
= 1;
433 for (var i
= 0, len
= usrval
.length
; i
< len
; i++
) {
434 if (usrval
[i
] != "checked") toggleFrame(i+
1);
437 // end of tajemo work dated reminders counter
439 // Master values for current pid and encounter.
441 var active_encounter
= 0;
442 var encounter_locked
= false;
446 // Current selections in the top and bottom frames.
450 // Expand and/or collapse frames in response to checkbox clicks.
451 // fnum indicates which checkbox was clicked (1=left, 2=right).
452 function toggleFrame(fnum
) {
453 var f
= document
.forms
[0];
454 var fset
= top
.document
.getElementById('fsright');
455 if (!f
.cb_top
.checked
&& !f
.cb_bot
.checked
) {
456 if (fnum
== 1) f
.cb_bot
.checked
= true;
457 else f
.cb_top
.checked
= true;
459 var rows
= f
.cb_top
.checked ?
'*' : '0';
460 rows +
= f
.cb_bot
.checked ?
',*' : ',0';
462 save_setting ([(f
.cb_top
.checked ?
'checked' : ' '), (f
.cb_bot
.checked ?
'checked' : ' ')]);
465 // Load the specified url into the specified frame (RTop or RBot).
466 // The URL provided must be relative to interface.
467 function loadFrame(fname
, frame
, url
) {
468 top
.restoreSession();
469 var i
= url
.indexOf('{PID}');
470 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
471 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
472 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
475 // Load the specified url into a frame to be determined, with the specified
476 // frame as the default; the url must be relative to interface.
477 function loadFrame2(fname
, frame
, url
) {
478 var usage
= fname
.substring(3);
479 if (active_pid
== 0 && active_gid
== 0 && (usage
> '0' && usage
< '5')){
480 <?php
if($GLOBALS['enable_group_therapy']) { ?
>
481 alert('<?php xl('You must first select
or add a patient
or therapy group
.','e
') ?>');
483 alert('<?php xl('You must first select
or add a patient
.','e
') ?>');
487 if (active_encounter
== 0 && (usage
> '1' && usage
< '3')) {
488 alert('<?php xl('You must first select
or create an encounter
.','e
') ?>');
491 if (encounter_locked
&& usage
> '1' && (usage
> '1' && usage
< '3')) {
492 alert('<?php echo xls('This encounter is locked
. No
new forms can be added
.') ?>');
495 var f
= document
.forms
[0];
496 top
.restoreSession();
497 var i
= url
.indexOf('{PID}');
498 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
501 var fi
= f
.sel_frame
.selectedIndex
;
502 if (fi
== 1) frame
= 'RTop'; else if (fi
== 2) frame
= 'RBot';
504 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
505 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
506 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
510 function loadFrame3(fname
, frame
, url
) {
511 var f
= document
.forms
[0];
512 top
.restoreSession();
513 var i
= url
.indexOf('{PID}');
514 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
517 var fi
= f
.sel_frame
.selectedIndex
;
518 if (fi
== 1) frame
= 'RTop'; else if (fi
== 2) frame
= 'RBot';
520 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
521 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
522 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
526 // Make sure the the top and bottom frames are open or closed, as specified.
527 function forceSpec(istop
, isbot
) {
528 var f
= document
.forms
[0];
529 if (f
.cb_top
.checked
!= istop
) {
530 f
.cb_top
.checked
= istop
;
533 if (f
.cb_bot
.checked
!= isbot
) {
534 f
.cb_bot
.checked
= isbot
;
539 // Make sure both frames are open.
540 function forceDual() {
541 forceSpec(true, true);
544 // Load the specified url into a frame to be determined, with the specified
545 // frame as the default; the url must be relative to interface.
546 function loadFrameDual(tname
, bname
, topurl
, boturl
) {
547 var topusage
= tname
.substring(3);
548 var botusage
= bname
.substring(3);
549 if (active_pid
== 0 && (topusage
> '0' || botusage
> '0')) {
550 alert('<?php xl('You must first select
or add a patient
.','e
') ?>');
553 if (active_encounter
== 0 && (topusage
> '1' || botusage
> '1')) {
554 alert('<?php xl('You must first select
or create an encounter
.','e
') ?>');
557 if (encounter_locked
&& (topusage
> '1' || botusage
> '1')) {
558 alert('<?php echo xls('This encounter is locked
. No
new forms can be added
.') ?>');
561 var f
= document
.forms
[0];
563 top
.restoreSession();
564 var i
= topurl
.indexOf('{PID}');
565 if (i
>= 0) topurl
= topurl
.substring(0,i
) + active_pid + topurl
.substring(i+
5);
566 i
= boturl
.indexOf('{PID}');
567 if (i
>= 0) boturl
= boturl
.substring(0,i
) + active_pid + boturl
.substring(i+
5);
568 top
.frames
.RTop
.location
= '<?php echo "$web_root/interface/" ?>' + topurl
;
569 top
.frames
.RBot
.location
= '<?php echo "$web_root/interface/" ?>' + boturl
;
575 // Set disabled/enabled state of radio buttons and associated labels
576 // depending on whether there is an active patient or encounter.
577 function syncRadios() {
578 var f
= document
.forms
[0];
579 encounter_locked
= isEncounterLocked(active_encounter
);
580 var nlinks
= document
.links
.length
;
581 for (var i
= 0; i
< nlinks
; ++i
) {
582 var lnk
= document
.links
[i
];
583 if (lnk
.id
.length
!= 4) continue;
584 var usage
= lnk
.id
.substring(3);
585 if (usage
== '1' || usage
== '2') {
587 if (active_pid
== 0) da
= true;
588 if (active_encounter
== 0 && usage
> '1') da
= true;
589 if (encounter_locked
&& usage
> '1') da
= true;
591 if ($GLOBALS['menu_styling_vertical'] == 0){
592 $color = "'#0000ff'";
593 }else{ // ($GLOBALS['menu_styling_vertical'] == 1)
594 $color = "'#000000'";
597 lnk
.style
.color
= da ?
'#888888' : <?php
echo $color; ?
>;
599 //for therapy groups menu
600 <?php
if($GLOBALS['enable_group_therapy']) { ?
>
601 if (usage
== '3' || usage
== '4') {
603 if (active_gid
== 0) da
= true;
604 if (active_encounter
== 0 && usage
> '3') da
= true;
605 if (encounter_locked
&& usage
> '3') da
= true;
607 if ($GLOBALS['menu_styling_vertical'] == 0){
608 $color = "'#0000ff'";
609 }else{ // ($GLOBALS['menu_styling_vertical'] == 1)
610 $color = "'#000000'";
613 lnk
.style
.color
= da ?
'#888888' : <?php
echo $color; ?
>;
618 f
.popups
.disabled
= (active_pid
== 0);
622 top
.frames
['RTop'].location
='<?php echo $GLOBALS['default_top_pane
']?>';
623 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';
626 //Function to clear active patient and encounter in the server side
627 function clearactive() {
628 top
.restoreSession();
629 //Ajax call to clear active patient in session
630 var method
= (active_pid
> 0) ?
'unset_pid' : 'unset_gid';
633 url
: "<?php echo $GLOBALS['webroot'] ?>/library/ajax/unset_session_ajax.php",
634 data
: { func
: method
},
635 success
:function( msg
) {
638 top
.frames
['RTop'].location
='<?php echo $GLOBALS['default_top_pane
']?>';
639 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';
643 $
(parent
.Title
.document
.getElementById('clear_active')).hide();
644 $
(parent
.Title
.document
.getElementById('clear_active_group')).hide();
646 // Reference to the search.php window.
649 // Open the search.php window.
650 function initFilter() {
651 my_window
= window
.open("../../custom/search.php", "mywindow","status=1");
654 // This is called by the search.php (Filter) window.
655 function processFilter(fieldString
, serviceCode
) {
656 var f
= document
.forms
[0];
657 document
.getElementById('searchFields').value
= fieldString
;
658 f
.search_service_code
.value
= serviceCode
;
659 findPatient("Filter");
660 f
.search_service_code
.value
= '';
664 // Process the click to find a patient by name, id, ssn or dob.
665 function findPatient(findby
) {
666 var f
= document
.forms
[0];
667 if (! f
.cb_top
.checked
) {
668 f
.cb_top
.checked
= true;
671 f
.findBy
.value
= findby
;
672 top
.restoreSession();
673 document
.find_patient
.submit();
676 // Helper function to set the contents of a div.
677 function setSomeContent(id
, content
, doc
) {
678 if (doc
.getElementById
) {
679 var x
= doc
.getElementById(id
);
681 x
.innerHTML
= content
;
685 x
.innerHTML
= content
;
688 function setDivContent(id
, content
) {
689 setSomeContent(id
, content
, document
);
691 function setTitleContent(id
, content
) {
692 setSomeContent(id
, content
, parent
.Title
.document
);
695 // This is called automatically when a new patient is set, to make sure
696 // there are no patient-specific documents showing stale data. If a frame
697 // was just loaded with data for the correct patient, its name is passed so
698 // that it will not be zapped. At this point the new server-side pid is not
699 // assumed to be set, so this function will only load global data.
700 function reloadPatient(frname
) {
701 var f
= document
.forms
[0];
702 if (topName
.length
> 3 && topName
.substring(3) > '0' && frname
!= 'RTop') {
703 loadFrame('cal0','RTop', '<?php echo $primary_docs['cal
'][2]; ?>');
705 if (botName
.length
> 3 && botName
.substring(3) > '0' && frname
!= 'RBot') {
706 loadFrame('ens0','RBot', '<?php echo $primary_docs['ens
'][2]; ?>');
710 // Reload encounter-specific frames, excluding a specified frame. At this
711 // point the new server-side encounter ID may not be set and loading the same
712 // document for the new encounter will not work, so load patient info instead.
713 function reloadEncounter(frname
) {
714 var f
= document
.forms
[0];
715 if (topName
.length
> 3 && topName
.substring(3) > '1' && frname
!= 'RTop') {
716 loadFrame('dem1','RTop', '<?php echo $primary_docs['dem
'][2]; ?>');
718 if (botName
.length
> 3 && botName
.substring(3) > '1' && frname
!= 'RBot') {
719 loadFrame('ens1','RBot', '<?php echo $primary_docs['ens
'][2]; ?>');
724 // Call this to announce that the patient has changed. You must call this
725 // if you change the session PID, so that the navigation frame will show the
726 // correct patient and so that the other frame will be reloaded if it contains
727 // patient-specific information from the previous patient. frname is the name
728 // of the frame that the call came from, so we know to only reload content
729 // from the *other* frame if it is patient-specific.
730 function setPatient(pname
, pid
, pubpid
, frname
, str_dob
) {
732 var str
= '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentPatientFromTitle()" title="PID = ' + pid +
'"><b>' + pname +
' (' + pubpid +
')<br /></b></a>';
733 setDivContent('current_patient', str
);
734 setTitleContent('current_patient', str + str_dob
);
735 if (pid
== active_pid
) return;
736 setDivContent('current_encounter', '<b><?php xl('None
','e
'); ?></b>');
738 active_encounter
= 0;
739 encounter_locked
= false;
740 if (frname
) reloadPatient(frname
);
742 $
(parent
.Title
.document
.getElementById('current_patient_block')).show();
743 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
744 $
(encounter_block
).hide();
746 // zero out the encounter frame, replace it with the encounter list frame
747 var f
= document
.forms
[0];
748 if ( f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
749 var encounter_frame
= getEncounterTargetFrame('enc');
750 if ( encounter_frame
!= undefined
) {
751 loadFrame('ens0',encounter_frame
, '<?php echo $primary_docs['ens
'][2]; ?>');
755 $
(parent
.Title
.document
.getElementById('clear_active')).show();//To display Clear Active Patient button on selecting a patient
756 $
(parent
.Title
.document
.getElementById('clear_active_group')).hide();//To hide Clear Active group button on selecting a patient
760 // Call this to announce that the therapy group has changed. You must call this
761 // if you change the session 'therapy_group', so that the navigation frame will show the
763 function setTherapyGroup(group_id
, group_name
) {
766 $
(parent
.Title
.document
.querySelector('#current_patient_block span.text')).hide();
767 setTitleContent('current_patient', '<span><?php echo xls('Therapy Group
-');?> <a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentGroupFromTitle(' + group_id +
')">' + group_name +
' (' + group_id +
')<a></span>' );
768 if (group_id
== active_gid
) return;
769 setDivContent('current_encounter', '<b><?php xl('None
','e
'); ?></b>');
770 active_gid
= group_id
;
771 active_encounter
= 0;
772 encounter_locked
= false;
774 $
(parent
.Title
.document
.getElementById('current_patient_block')).show();
775 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
776 $
(encounter_block
).hide();
778 // zero out the encounter frame, replace it with the encounter list frame
779 var f
= document
.forms
[0];
780 if ( f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
781 var encounter_frame
= getEncounterTargetFrame('enc');
782 if ( encounter_frame
!= undefined
) {
783 loadFrame('ens0',encounter_frame
, '<?php echo $primary_docs['ens
'][2]; ?>');
787 $
(parent
.Title
.document
.getElementById('clear_active_group')).show();//To display Clear Active group button on selecting a patient
788 $
(parent
.Title
.document
.getElementById('clear_active')).hide();//To hide Clear Active Patient button on selecting a patient
791 function setPatientEncounter(EncounterIdArray
,EncounterDateArray
,CalendarCategoryArray
) {
792 //This function lists all encounters of the patient.
793 //This function writes the drop down in the top frame.
794 //It is called when a new patient is create/selected from the search menu.
795 var str
= '<Select class="text" id="EncounterHistory" onchange="{top.restoreSession();toencounter(this.options[this.selectedIndex].value)}">';
796 str+
='<option value=""><?php echo htmlspecialchars( xl('Encounter History
'), ENT_QUOTES) ?></option>';
797 str+
='<option value="New Encounter"><?php echo htmlspecialchars( xl('New Encounter
'), ENT_QUOTES) ?></option>';
798 str+
='<option value="Past Encounter List"><?php echo htmlspecialchars( xl('Past Encounter
List'), ENT_QUOTES) ?></option>';
799 for(CountEncounter
=0;CountEncounter
<EncounterDateArray
.length
;CountEncounter++
)
801 str+
='<option value="'+EncounterIdArray
[CountEncounter
]+
'~'+EncounterDateArray
[CountEncounter
]+
'">'+EncounterDateArray
[CountEncounter
]+
'-'+CalendarCategoryArray
[CountEncounter
]+
'</option>';
804 $
(parent
.Title
.document
.getElementById('past_encounter_block')).show();
805 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
=str
;
808 function loadCurrentPatientFromTitle() {
809 top
.restoreSession();
810 top
.frames
['RTop'].location
='../patient_file/summary/demographics.php';
813 function loadCurrentGroupFromTitle(gid
) {
814 top
.restoreSession();
815 top
.frames
['RTop'].location
='../therapy_groups/index.php?method=groupDetails&group_id=' + gid
;
818 function getEncounterTargetFrame( name
) {
819 var bias
= <?php
echo $primary_docs[ 'enc' ][ 1 ]?
>;
820 var f
= document
.forms
[0];
822 if (f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
829 if ( f
.cb_top
.checked
) {
831 } else if ( f
.cb_bot
.checked
) {
838 function isEncounterLocked( encounterId
) {
839 <?php
if ( $esignApi->lockEncounters() ) { ?
>
840 // If encounter locking is enabled, make a syncronous call (async=false) to check the
841 // DB to see if the encounter is locked.
842 // Call restore session, just in case
843 top
.restoreSession();
846 url
: '<?php echo $GLOBALS['webroot
']?>/interface/esign/index.php?module=encounter&method=esign_is_encounter_locked',
847 data
: { encounterId
: encounterId
},
848 success
: function( data
) {
849 encounter_locked
= data
;
854 return encounter_locked
;
856 // If encounter locking isn't enabled, just tell the left_nav that the encounter
862 // Call this to announce that the encounter has changed. You must call this
863 // if you change the session encounter, so that the navigation frame will
864 // show the correct encounter and so that the other frame will be reloaded if
865 // it contains encounter-specific information from the previous encounter.
866 // frname is the name of the frame that the call came from, so we know to only
867 // reload encounter-specific content from the *other* frame.
868 function setEncounter(edate
, eid
, frname
) {
869 if (eid
== active_encounter
) return;
870 if (!eid
) edate
= '<?php xl('None
','e
'); ?>';
871 var str
= '<b>' + edate +
'</b>';
872 setDivContent('current_encounter', str
);
873 active_encounter
= eid
;
874 encounter_locked
=isEncounterLocked(active_encounter
);
875 reloadEncounter(frname
);
877 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
878 var encounter
= $
(parent
.Title
.document
.getElementById('current_encounter'));
879 var estr
= '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentEncounterFromTitle()"><b>' + edate +
' (' + eid +
')</b></a>';
880 encounter
.html( estr
);
881 encounter_block
.show();
884 function loadCurrentEncounterFromTitle() {
885 top
.restoreSession();
886 top
.frames
[ parent
.left_nav
.getEncounterTargetFrame('enc') ].location
='../patient_file/encounter/encounter_top.php';
889 // You must call this if you delete the active patient (or if for any other
890 // reason you "close" the active patient without opening a new one), so that
891 // the appearance of the navigation frame will be correct and so that any
892 // stale content will be reloaded.
893 function clearPatient() {
894 if (active_pid
== 0) return;
895 var f
= document
.forms
[0];
897 active_encounter
= 0;
898 encounter_locked
= false;
899 setDivContent('current_patient', '<b><?php xl('None
','e
'); ?></b>');
900 $
(parent
.Title
.document
.getElementById('current_patient_block')).hide();
901 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
='';
902 $
(parent
.Title
.document
.getElementById('current_encounter_block')).hide();
907 // You must call this if you delete the active therapy group so that
908 // the appearance of the navigation frame will be correct and so that any
909 // stale content will be reloaded.
910 function clearTherapyGroup() {
911 if (active_gid
== 0) return;
912 var f
= document
.forms
[0];
914 active_encounter
= 0;
915 encounter_locked
= false;
916 setDivContent('current_patient', '<b><?php xl('None
','e
'); ?></b>');
917 $
(parent
.Title
.document
.getElementById('current_patient_block')).hide();
918 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
='';
919 $
(parent
.Title
.document
.getElementById('current_encounter_block')).hide();
923 // You must call this if you delete the active encounter (or if for any other
924 // reason you "close" the active encounter without opening a new one), so that
925 // the appearance of the navigation frame will be correct and so that any
926 // stale content will be reloaded.
927 function clearEncounter() {
928 if (active_encounter
== 0) return;
929 top
.window
.parent
.Title
.document
.getElementById('current_encounter').innerHTML
="<b><?php echo htmlspecialchars( xl('None'), ENT_QUOTES) ?></b>";
930 active_encounter
= 0;
931 encounter_locked
= false;
936 function removeOptionSelected(EncounterId
)
937 {//Removes an item from the Encounter drop down.
938 var elSel
= top
.window
.parent
.Title
.document
.getElementById('EncounterHistory');
940 for (i
= elSel
.length
- 1; i
>=2; i
--) {
941 EncounterHistoryValue
=elSel
.options
[i
].value
;
942 EncounterHistoryValueArray
=EncounterHistoryValue
.split('~');
943 if (EncounterHistoryValueArray
[0]==EncounterId
) {
949 // You can call this to make sure the session pid is what we expect.
950 function pidSanityCheck(pid
) {
951 if (pid
!= active_pid
) {
952 alert('Session patient ID is ' + pid +
', expecting ' + active_pid +
953 '. This session is unstable and should be abandoned. Do not use ' +
954 'OpenEMR in multiple browser windows!');
960 // You can call this to make sure the session encounter is what we expect.
961 function encounterSanityCheck(eid
) {
962 if (eid
!= active_encounter
) {
963 alert('Session encounter ID is ' + eid +
', expecting ' + active_encounter +
964 '. This session is unstable and should be abandoned. Do not use ' +
965 'OpenEMR in multiple browser windows!');
972 function repPopup(aurl
) {
973 top
.restoreSession();
974 window
.open('<?php echo "$web_root/interface/reports/" ?>' + aurl
, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
978 // This is invoked to pop up some window when a popup item is selected.
979 function selpopup(selobj
) {
980 var i
= selobj
.selectedIndex
;
981 var opt
= selobj
.options
[i
];
985 if (opt
.text
== 'Export' || opt
.text
== 'Import') {
989 dlgopen(opt
.value
, '_blank', width
, height
);
991 selobj
.selectedIndex
= 0;
994 // Treeview activation stuff:
995 $
(document
).ready(function(){
996 if(1 == <?php
echo $GLOBALS['menu_styling_vertical'] ?
>){
997 $
("#navigation-slide > li > a.collapsed + ul").slideToggle("medium");
998 $
("#navigation-slide > li > ul > li > a.collapsed_lv2 + ul").slideToggle("medium");
999 $
("#navigation-slide > li > a.expanded").click(function() {
1000 $
("#navigation-slide > li > a.expanded").not(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1001 $
(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1003 $
("#navigation-slide > li > a.collapsed").click(function() {
1004 $
("#navigation-slide > li > a.expanded").not(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1005 $
(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1007 $
("#navigation-slide > li > ul > li > a.expanded_lv2").click(function() {
1008 $
("#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");
1009 $
(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
1011 $
("#navigation-slide > li > ul > li > a.collapsed_lv2").click(function() {
1012 $
("#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");
1013 $
(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
1015 $
("#navigation-slide > li > a#cal0").prepend('<i class="fa fa-fw fa-calendar"></i> ');
1016 $
("#navigation-slide > li > a#pfb0").prepend('<i class="fa fa-fw fa-list-alt"></i> ');
1017 $
("#navigation-slide > li > a#msg0").prepend('<i class="fa fa-fw fa-envelope-o"></i> ');
1018 $
("#navigation-slide > li > a#app0").prepend('<i class="fa fa-fw fa-user"></i> ');
1019 $
("#navigation-slide > li > a#ppo0").prepend('<i class="fa fa-fw fa-users"></i> ');
1020 $
("#navigation-slide > li > a#repimg").prepend('<i class="fa fa-fw fa-area-chart"></i> ');
1021 $
("#navigation-slide > li > a#feeimg").prepend('<i class="fa fa-fw fa-dollar"></i> ');
1022 $
("#navigation-slide > li > a#adm0").prepend('<i class="fa fa-fw fa-list-ol"></i> ');
1023 $
("#navigation-slide > li > a#invimg").prepend('<i class="fa fa-fw fa-list-ol"></i> ');
1024 $
("#navigation-slide > li > a#admimg").prepend('<i class="fa fa-fw fa-cogs"></i> ');
1025 $
("#navigation-slide > li > a#misimg").prepend('<i class="fa fa-fw fa-cog"></i> ');
1026 $
("#navigation-slide > li > a#proimg").prepend('<i class="fa fa-fw fa-stethoscope"></i> ');
1027 $
("#navigation-slide > li > a#modimg").prepend('<i class="fa fa-fw fa-puzzle-piece"></i> ');
1028 $
("#navigation-slide > li").each(function(index
) {
1029 if($
(" > ul > li", this
).size() == 0){
1030 $
(" > a", this
).addClass("collapsed");
1033 } else { // $GLOBALS['menu_styling_vertical'] == 0
1035 //Remove the links (used by the sliding menu) that will break treeview
1036 $
('a.collapsed').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1037 $
('a.collapsed_lv2').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1038 $
('a.expanded').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1039 $
('a.expanded_lv2').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1041 // Initiate treeview
1042 $
("#navigation").treeview({
1046 toggle
: function() {
1047 window
.console
&& console
.log("%o was toggled", this
);
1057 <body
class="body_nav main-left">
1059 <form method
='post' name
='find_patient' target
='RTop'
1060 action
='<?php echo $rootdir ?>/main/finder/patient_select.php'>
1063 <select name
='sel_frame' style
='background-color:transparent;font-size:9pt;width:100;'>
1064 <option value
='0'><?php
xl('Default','e'); ?
></option
>
1065 <option value
='1'><?php
xl('Top','e'); ?
></option
>
1066 <option value
='2'><?php
xl('Bottom','e'); ?
></option
>
1070 <table cellpadding
='0' cellspacing
='0' border
='0' width
='100%'>
1072 <td
class='smalltext' nowrap
>
1073 <input type
='checkbox' name
='cb_top' onclick
='toggleFrame(1)' <?php
echo $cb_top_chk ?
> />
1074 <b
><?php
xl('Top','e') ?
></b
>
1076 <td
class='smalltext' align
='right' nowrap
>
1077 <b
><?php
xl('Bot','e') ?
></b
>
1078 <input type
='checkbox' name
='cb_bot' onclick
='toggleFrame(2)' <?php
echo $cb_bot_chk ?
> />
1083 <?php
if ( $GLOBALS['menu_styling_vertical'] == 1) { ?
>
1084 <ul id
="navigation-slide">
1085 <?php
} else { // ($GLOBALS['menu_styling_vertical'] == 0) ?>
1086 <ul id
="navigation">
1090 if (!$GLOBALS['disable_calendar'] && acl_check('patients', 'appt')) {
1091 genTreeLink('RTop','cal',xl('Calendar'));
1093 if (!$GLOBALS['disable_pat_trkr'] && !$GLOBALS['disable_calendar'] && acl_check('patients', 'appt')) {
1094 genTreeLink('RTop','pfb',xl('Flow Board'));
1096 if (acl_check('patients', 'notes')) {
1097 genTreeLink('RBot','msg',xl('Messages'));
1099 if($GLOBALS['portal_offsite_enable'] && $GLOBALS['portal_offsite_address'] && acl_check('patientportal','portal')) {
1100 genTreeLink('RTop','app',xl('Portal Activity'));
1102 if ($GLOBALS['gbl_portal_cms_enable'] && acl_check('patientportal','portal')) {
1103 genPopLink(xl('CMS Portal'),'../cmsportal/list_requests.php','ppo0');
1107 <li
class="open"><a
class="expanded" id
="patimg" ><i
class="fa fa-fw fa-user"></i
> 
;<span
><?php
xl('Patient/Client','e') ?
></span
></a
>
1109 <?php
if (acl_check('patients','demo'))
1110 genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?
>
1111 <?php
if (acl_check('patients','demo', '', 'write') ||
acl_check('patients','demo', '', 'addonly'))
1112 genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ?
xl('New/Search') : xl('New'))); ?
>
1113 <?php
if (acl_check('patients','demo'))
1114 genTreeLink('RTop','dem',xl('Summary')); ?
>
1116 <?php
if (acl_check('patients','appt')) { ?
>
1117 <li
class="open"><a
class="expanded_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1119 <?php
if (acl_check('patients','appt', '', 'write') ||
acl_check('patients','appt', '', 'addonly'))
1120 genTreeLink('RBot','nen',xl('Create Visit')); ?
>
1121 <?php
if (acl_check('patients','appt'))
1122 genTreeLink('RBot','enc',xl('Current')); ?
>
1123 <?php
if (acl_check('patients','appt'))
1124 genTreeLink('RBot','ens',xl('Visit History')); ?
>
1129 <?php
if (acl_check('patients','med')) { ?
>
1130 <li
><a
class="collapsed_lv2"><span
><?php
xl('Records','e') ?
></span
></a
>
1132 <?php
genTreeLink('RTop','prq',xl('Patient Record Request')); ?
>
1137 <?php
if ($GLOBALS['gbl_nav_visit_forms'] && acl_check('patients','demo')) { ?
>
1138 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visit Forms','e') ?
></span
></a
>
1141 // Generate the items for visit forms, both traditional and LBF.
1144 $lres = sqlStatement("SELECT * FROM list_options " .
1145 "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title");
1146 while ($lrow = sqlFetchArray($lres)) {
1147 $option_id = $lrow['option_id']; // should start with LBF
1148 $title = $lrow['title'];
1149 // Check ACO attribute, if any, of this LBF.
1150 $jobj = json_decode($lrow['notes'], true);
1151 if (!empty($jobj['aco'])) {
1152 $tmp = explode('|', $jobj['aco']);
1153 if (!acl_check($tmp[0], $tmp[1])) continue;
1155 genMiscLink('RBot','cod','2',xl_form_title($title),
1156 "patient_file/encounter/load_form.php?formname=$option_id");
1158 include_once("$srcdir/registry.inc");
1159 $reg = getRegistered();
1161 foreach ($reg as $entry) {
1162 $option_id = $entry['directory'];
1163 $title = trim($entry['nickname']);
1164 if ($option_id == 'fee_sheet' ) continue;
1165 if ($option_id == 'newpatient') continue;
1166 if (empty($title)) $title = $entry['name'];
1167 genMiscLink('RBot','cod','2',xl_form_title($title),
1168 "patient_file/encounter/load_form.php?formname=" .
1169 urlencode($option_id));
1175 <li
class="collapsed" ><a
class="collapsed_lv2"><span
><?php
echo xlt('Import') ?
></span
></a
>
1177 <?php
genMiscLink('RTop','ccr','0',xlt('Upload'),'patient_file/ccr_import.php'); ?
>
1178 <?php
genMiscLink('RTop','apr','0',xlt('Pending Approval'),'patient_file/ccr_pending_approval.php'); ?
>
1181 <?php
} // end if gbl_nav_visit_forms ?>
1186 <?php
if ($GLOBALS['enable_group_therapy']) : ?
>
1187 <li
><a
class="collapsed" id
="groupimg" ><i
class="fa fa-fw fa-users"></i
> 
;<span
><?php
xl('Group','e') ?
></span
></a
>
1189 <?php
genMiscLink('RTop','gfn','0',xl('Groups'),'therapy_groups/index.php?method=listGroups'); ?
>
1190 <?php
genTreeLink('RTop','gng', xl('New')); ?
>
1191 <?php
genTreeLink('RTop','gdg',xl('Group Details')); ?
>
1192 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1194 <?php
genTreeLink('RBot','gcv',xl('Create Visit')); ?
>
1195 <?php
genTreeLink('RBot','gce',xl('Current')); ?
>
1196 <?php
genTreeLink('RBot','gvh',xl('Visit History')); ?
>
1204 <?php
// TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1205 <?php
if((!isset($GLOBALS['enable_fees_in_left_menu']) ||
$GLOBALS['enable_fees_in_left_menu'] == 1) &&
1206 (acl_check('encounters','coding') ||
acl_check('acct', 'eob') ||
acl_check('acct','bill','','write'))) { ?
>
1207 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('Fees','e') ?
></span
></a
>
1209 <?php
if (acl_check('encounters','coding'))
1210 genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?
>
1211 <?php
if ($GLOBALS['use_charges_panel'] && acl_check('encounters','coding'))
1212 genTreeLink('RBot','cod', xl('Charges')); ?
>
1213 <?php
if (acl_check('acct','bill','','write'))
1214 genMiscLink('RBot','pay','1',xl('Payment'),'patient_file/front_payment.php'); ?
>
1215 <?php
if (acl_check('acct','bill','','write'))
1216 genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?
>
1217 <?php
if (!$GLOBALS['simplified_demographics'] && (acl_check('acct','bill','','write') ||
acl_check('acct','eob','','write')))
1218 genTreeLink('RTop','bil',xl('Billing')); ?
>
1219 <?php
if ($GLOBALS['enable_batch_payment'] && (acl_check('acct','bill','','write') ||
acl_check('acct','eob','','write')))
1220 genTreeLink('RTop','npa',xl('Batch Payments'),false,2);?
>
1221 <?php
if ($GLOBALS['enable_posting'] && acl_check('acct','eob','','write'))
1222 genMiscLink('RTop','eob','0',xl('Posting'), 'billing/sl_eob_search.php'); ?
>
1223 <?php
if ($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob'))
1224 genTreeLink('RTop','edi',xl('EDI History'),false,2);?
>
1229 <?php
if (acl_check('menus', 'modle')) {?
>
1230 <li
><a
class="collapsed" id
="modimg" ><span
><?php
echo xlt('Modules') ?
></span
></a
>
1232 <?php
genMiscLink('RTop','adm','0',xl('Manage Modules'),'modules/zend_modules/public/Installer'); ?
>
1233 <?php
//genTreeLink('RTop','ort',xl('Settings')); ?>
1235 $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");
1236 if (sqlNumRows($module_query)) {
1237 while ($modulerow = sqlFetchArray($module_query)) {
1238 $acl_section = strtolower($modulerow['mod_directory']);
1239 $disallowed[$acl_section] = zh_acl_check($_SESSION['authUserID'],$acl_section) ?
"" : "1";
1242 if($modulerow['type'] == 0) {
1243 $modulePath = $GLOBALS['customModDir'];
1248 $modulePath = $GLOBALS['zendModDir'];
1251 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$added;
1252 $mod_nick_name = $modulerow['mod_nick_name'] ?
$modulerow['mod_nick_name'] : $modulerow['mod_name'];
1254 <?php
genMiscLink2('RTop',$acl_section,'0',xlt($mod_nick_name),$relative_link);?
>
1261 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?
>
1262 <li
><a
class="collapsed" id
="invimg" ><span
><?php
xl('Inventory','e') ?
></span
></a
>
1264 <?php
genMiscLink('RTop','adm','0',xl('Management'),'drugs/drug_inventory.php'); ?
>
1265 <?php
genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?
>
1270 <?php
if (acl_check('patients', 'lab')) { ?
>
1271 <li
><a
class="collapsed" id
="proimg" ><span
><?php
xl('Procedures','e') ?
></span
></a
>
1273 <?php
if (acl_check('admin', 'super')) genTreeLink('RTop','orl',xl('Providers')); ?
>
1274 <?php
if (acl_check('admin', 'super')) genTreeLink('RTop','ort',xl('Configuration')); ?
>
1275 <?php
if (acl_check('admin', 'super')) genTreeLink('RTop','orc',xl('Load Compendium')); ?
>
1276 <?php
genTreeLink('RTop','orp',xl('Pending Review')); ?
>
1277 <?php
genTreeLink('RTop','orr',xl('Patient Results')); ?
>
1278 <?php
genTreeLink('RTop','lda',xl('Lab Overview')); ?
>
1279 <?php
genTreeLink('RTop','orb',xl('Batch Results')); ?
>
1280 <?php
genTreeLink('RTop','ore',xl('Electronic Reports')); ?
>
1281 <?php
genTreeLink('RTop','dld',xl('Lab Documents'));?
>
1287 if($GLOBALS['erx_enable'] && acl_check('patients', 'rx')) {
1288 $newcrop_user_role = sqlQuery("SELECT newcrop_user_role FROM users WHERE username = '".$_SESSION['authUser']."'");
1289 if($newcrop_user_role['newcrop_user_role']) {
1291 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('New Crop','e') ?
></span
></a
>
1293 <li
><a
class="collapsed_lv2"><span
><?php
xl('Status','e') ?
></span
></a
>
1295 <?php
genTreeLink('RTop','erx',xl('e-Rx')); ?
>
1296 <?php
genMiscLink('RTop','err','0',xl('e-Rx Renewal'),'eRx.php?page=status'); ?
>
1297 <?php
if($newcrop_user_role['newcrop_user_role'] === 'erxadmin') genMiscLink('RTop','ere','0',xl('e-Rx EPCS'),'eRx.php?page=epcs-admin'); ?
>
1307 <?php
if (!$disallowed['adm']) { ?
>
1308 <li
><a
class="collapsed" id
="admimg" ><span
><?php
xl('Administration','e') ?
></span
></a
>
1310 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?
>
1311 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?
>
1312 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?
>
1313 <?php
if (acl_check('admin', 'practice' )) genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1315 // Changed the target URL from practice settings -> Practice Settings - Pharmacy... Dec 09,09 .. Visolve ... This replaces empty frame with Pharmacy window
1316 if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings&pharmacy&action=list'); ?
>
1317 <?php
if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?
>
1318 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?
>
1319 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?
>
1320 <?php
if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?
>
1321 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?
>
1322 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?
>
1323 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Rules'),'super/rules/index.php?action=browse!list'); ?
>
1324 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Alerts'),'super/rules/index.php?action=alerts!listactmgr'); ?
>
1325 <?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='); ?
>
1326 <?php
if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?
>
1327 <?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'); ?
>
1328 <?php
if (acl_check('admin', 'super') && !empty($GLOBALS['code_types']['IPPF'])) genMiscLink('RTop','adm','0',xl('Export'),'main/ippf_export.php'); ?
>
1329 <li
><a
class="collapsed_lv2"><span
><?php
xl('Other','e') ?
></span
></a
>
1331 <?php
if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?
>
1332 <?php
if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?
>
1333 <?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'); ?
>
1334 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?
>
1336 if($newcrop_user_role['newcrop_user_role'] ||
$GLOBALS['erx_enable']) {
1337 if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('eRx Logs'),'logview/erx_logview.php');
1340 <?php
if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?
>
1341 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?
>
1342 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Native Data Loads'),'../interface/super/load_codes.php'); ?
>
1343 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('External Data Loads'),'../interface/code_systems/dataloads_ajax.php'); ?
>
1344 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Merge Patients'),'patient_file/merge_patients.php'); ?
>
1345 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Import Holidays'),'../interface/main/holidays/import_holidays.php'); ?
>
1346 <?php
if ($GLOBALS['enable_auditlog_encryption']) genMiscLink('RTop','rep','0',xl('Audit Log Tamper'),'reports/audit_log_tamper_report.php'); ?
>
1353 <li
><a
class="collapsed" id
="repimg" ><span
><?php
xl('Reports','e') ?
></span
></a
>
1356 $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
1357 obj_name=enabled_hooks AND ms.mod_id=msh.mod_id LEFT OUTER JOIN modules AS m ON m.mod_id=ms.mod_id
1358 WHERE fld_type=3 AND mod_active=1 AND sql_run=1 AND attached_to='reports' ORDER BY mod_id");
1359 if (sqlNumRows($module_query)) {
1362 while ($modulerow = sqlFetchArray($module_query)) {
1365 if($modulerow['type'] == 0) {
1366 $modulePath = $GLOBALS['customModDir'];
1371 $modulePath = $GLOBALS['zendModDir'];
1374 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$modulerow['path'];
1375 $mod_nick_name = $modulerow['menu_name'] ?
$modulerow['menu_name'] : 'NoName';
1377 if($jid==0 ||
($modid!=$modulerow['mod_id'])){
1381 <li
><a
class="collapsed_lv2"><span
><?php
echo xlt($modulerow['mod_ui_name']); ?
></span
></a
>
1386 $modid = $modulerow['mod_id'];
1387 genMiscLink('RTop','adm','0',xlt($mod_nick_name),$relative_link);
1392 <?php
if (acl_check('patients', 'demo') ||
acl_check('patients', 'med') ||
1393 (acl_check('patients', 'rx') && !$GLOBALS['disable_prescriptions'])) { ?
>
1394 <li
><a
class="collapsed_lv2"><span
><?php
xl('Clients','e') ?
></span
></a
>
1396 <?php
if (acl_check('patients', 'demo'))
1397 genMiscLink('RTop','rep','0',xl('List'),'reports/patient_list.php'); ?
>
1398 <?php
if (acl_check('patients', 'rx') && !$GLOBALS['disable_prescriptions'])
1399 genMiscLink('RTop','rep','0',xl('Rx'),'reports/prescriptions_report.php'); ?
>
1400 <?php
if (acl_check('patients', 'med'))
1401 genMiscLink('RTop','rep','0',xl('Patient List Creation'),'reports/patient_list_creation.php'); ?
>
1402 <?php
if (acl_check('patients', 'med'))
1403 genMiscLink('RTop','rep','0',xl('Clinical'),'reports/clinical_reports.php'); ?
>
1404 <?php
if (acl_check('patients', 'med'))
1405 genMiscLink('RTop','rep','0',xl('Referrals'),'reports/referrals_report.php'); ?
>
1406 <?php
if (acl_check('patients', 'med'))
1407 genMiscLink('RTop','rep','0',xl('Immunization Registry'),'reports/immunization_report.php'); ?
>
1412 <?php
if (acl_check('patients', 'med')) { ?
>
1413 <li
><a
class="collapsed_lv2"><span
><?php
xl('Clinic','e') ?
></span
></a
>
1415 <?php
if (($GLOBALS['enable_cdr'] ||
$GLOBALS['enable_cqm'] ||
$GLOBALS['enable_amc']) && acl_check('patients', 'med'))
1416 genMiscLink('RTop','rep','0',xl('Report Results'),'reports/report_results.php'); ?
>
1417 <?php
if ($GLOBALS['enable_cdr'] && acl_check('patients', 'med'))
1418 genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?
>
1419 <?php
if ($GLOBALS['enable_cqm'] && acl_check('patients', 'med'))
1420 genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?
>
1421 <?php
if ($GLOBALS['enable_amc'] && acl_check('patients', 'med'))
1422 genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?
>
1423 <?php
if ($GLOBALS['enable_amc_tracking'] && acl_check('patients', 'med'))
1424 genMiscLink('RTop','rep','0',xl('AMC Tracking'),'reports/amc_tracking.php'); ?
>
1425 <?php
if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_alert_log'] && acl_check('patients', 'med'))
1426 genMiscLink('RTop','rep','0',xl('Alerts Log'),'reports/cdr_log.php'); ?
>
1431 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1433 <?php
if (acl_check('acct', 'rep_a'))
1434 genMiscLink('RTop','rep','0',xl('Daily Report'),'reports/daily_summary_report.php'); ?
>
1435 <?php
if (!$GLOBALS['disable_calendar'] && acl_check('patients', 'appt'))
1436 genMiscLink('RTop','rep','0',xl('Appointments'),'reports/appointments_report.php'); ?
>
1437 <?php
if (!$GLOBALS['disable_pat_trkr'] && !$GLOBALS['disable_calendar'] && acl_check('patients', 'appt'))
1438 genMiscLink('RTop','rep','0',xl('Patient Flow Board'),'reports/patient_flow_board_report.php'); ?
>
1439 <?php
if (acl_check('encounters', 'coding_a'))
1440 genMiscLink('RTop','rep','0',xl('Encounters'),'reports/encounters_report.php'); ?
>
1441 <?php
if (!$GLOBALS['disable_calendar'] && acl_check('acct', 'rep_a'))
1442 genMiscLink('RTop','rep','0',xl('Appt-Enc'),'reports/appt_encounter_report.php'); ?
>
1443 <?php
if (empty($GLOBALS['code_types']['IPPF']) && acl_check('encounters', 'coding_a'))
1444 genMiscLink('RTop','rep','0',xl('Superbill'),'reports/custom_report_range.php'); ?
>
1445 <?php
if (acl_check('patients', 'demo'))
1446 genMiscLink('RTop','rep','0',xl('Eligibility'),'reports/edi_270.php'); ?
>
1447 <?php
if (acl_check('patients', 'demo'))
1448 genMiscLink('RTop','rep','0',xl('Eligibility Response'),'reports/edi_271.php'); ?
>
1449 <?php
if (!$GLOBALS['disable_chart_tracker'] && acl_check('patients', 'appt'))
1450 genMiscLink('RTop','rep','0',xl('Chart Activity'),'reports/chart_location_activity.php'); ?
>
1451 <?php
if (!$GLOBALS['disable_chart_tracker'] && acl_check('patients', 'appt'))
1452 genMiscLink('RTop','rep','0',xl('Charts Out'),'reports/charts_checked_out.php'); ?
>
1453 <?php
genMiscLink('RTop','rep','0',xl('Services'), 'reports/services_by_category.php'); ?
>
1454 <?php
if (acl_check('patients', 'med'))
1455 genMiscLink('RTop','rep','0',xl('Syndromic Surveillance'),'reports/non_reported.php'); ?
>
1459 <?php
if (acl_check('acct', 'rep_a')) { ?
>
1460 <li
><a
class="collapsed_lv2"><span
><?php
xl('Financial','e') ?
></span
></a
>
1462 <?php
genMiscLink('RTop','rep','0',xl('Sales'),'reports/sales_by_item.php'); ?
>
1463 <?php
genMiscLink('RTop','rep','0',xl('Cash Rec'), 'billing/sl_receipts_report.php'); ?
>
1464 <?php
genMiscLink('RTop','rep','0',xl('Front Rec'), 'reports/front_receipts_report.php'); ?
>
1465 <?php
genMiscLink('RTop','rep','0',xl('Pmt Method'), 'reports/receipts_by_method_report.php'); ?
>
1466 <?php
genMiscLink('RTop','rep','0',xl('Collections'), 'reports/collections_report.php'); ?
>
1467 <?php
genMiscLink('RTop','rep','0',xl('Pat Ledger'),'reports/pat_ledger.php?form=0'); ?
>
1468 <?php
genMiscLink('RTop','rep','0',xl('Financial Summary by Service Code'),'reports/svc_code_financial_report.php'); ?
>
1473 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?
>
1474 <li
><a
class="collapsed_lv2"><span
><?php
xl('Inventory','e') ?
></span
></a
>
1476 <?php
genMiscLink('RTop','rep','0',xl('List'),'reports/inventory_list.php'); ?
>
1477 <?php
genMiscLink('RTop','rep','0',xl('Activity'),'reports/inventory_activity.php'); ?
>
1478 <?php
genMiscLink('RTop','rep','0',xl('Transactions'),'reports/inventory_transactions.php'); ?
>
1483 <?php
if (acl_check('patients', 'lab')) { ?
>
1484 <li
><a
class="collapsed_lv2"><span
><?php
xl('Procedures','e') ?
></span
></a
>
1486 <?php
genPopLink(xl('Pending Res'),'../orders/pending_orders.php'); ?
>
1487 <?php
if (!empty($GLOBALS['code_types']['IPPF'])) genPopLink(xl('Pending F/U'),'../orders/pending_followup.php'); ?
>
1488 <?php
genPopLink(xl('Statistics'),'../orders/procedure_stats.php'); ?
>
1493 <?php
if (!$GLOBALS['simplified_demographics'] && (acl_check('acct', 'rep_a') ||
acl_check('patients', 'demo'))) { ?
>
1494 <li
><a
class="collapsed_lv2"><span
><?php
xl('Insurance','e') ?
></span
></a
>
1496 <?php
if (acl_check('acct', 'rep_a'))
1497 genMiscLink('RTop','rep','0',xl('Distribution'),'reports/insurance_allocation_report.php'); ?
>
1498 <?php
if (acl_check('acct', 'rep_a'))
1499 genMiscLink('RTop','rep','0',xl('Indigents'),'billing/indigent_patients_report.php'); ?
>
1500 <?php
if (acl_check('patients', 'demo'))
1501 genMiscLink('RTop','rep','0',xl('Unique SP'),'reports/unique_seen_patients_report.php'); ?
>
1506 <?php
if (!empty($GLOBALS['code_types']['IPPF']) && acl_check('acct', 'rep_a')) { ?
>
1507 <li
><a
class="collapsed_lv2"><span
><?php
xl('Statistics','e') ?
></span
></a
>
1509 <?php
genPopLink(xl('IPPF Stats'),'ippf_statistics.php?t=i'); ?
>
1510 <?php
genPopLink(xl('GCAC Stats'),'ippf_statistics.php?t=g'); ?
>
1511 <?php
genPopLink(xl('MA Stats'),'ippf_statistics.php?t=m'); ?
>
1512 <?php
genPopLink(xl('CYP'),'ippf_cyp_report.php'); ?
>
1513 <?php
genPopLink(xl('Daily Record'),'ippf_daily.php'); ?
>
1516 <?php
} // end ippf-specific ?>
1518 <li
><a
class="collapsed_lv2"><span
><?php
xl('Blank Forms','e') ?
></span
></a
>
1520 <?php
genPopLink(xl('Demographics'),'../patient_file/summary/demographics_print.php'); ?
>
1521 <?php
genPopLink(xl('Superbill/Fee Sheet'),'../patient_file/printed_fee_sheet.php'); ?
>
1522 <?php
genPopLink(xl('Referral'),'../patient_file/transaction/print_referral.php'); ?
>
1524 $lres = sqlStatement("SELECT * FROM list_options " .
1525 "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title");
1526 while ($lrow = sqlFetchArray($lres)) {
1527 $option_id = $lrow['option_id']; // should start with LBF
1528 $title = $lrow['title'];
1529 // Check ACO attribute, if any, of this LBF.
1530 $jobj = json_decode($lrow['notes'], true);
1531 if (!empty($jobj['aco'])) {
1532 $tmp = explode('|', $jobj['aco']);
1533 if (!acl_check($tmp[0], $tmp[1])) continue;
1535 genPopLink($title, "../forms/LBF/printable.php?formname=$option_id");
1541 <?php
if (acl_check('admin','batchcom')) { ?
>
1542 <li
><a
class="collapsed_lv2"><span
><?php
echo xlt('Services') ?
></span
></a
>
1544 <?php
genMiscLink('RTop','rep','0',xl('Background Services'),'reports/background_services.php'); ?
>
1545 <?php
genMiscLink('RTop','rep','0',xl('Direct Message Log'),'reports/direct_message_log.php'); ?
>
1553 <li
><a
class="collapsed" id
="misimg" ><span
><?php
xl('Miscellaneous','e') ?
></span
></a
>
1555 <?php
genTreeLink('RTop','ped',xl('Patient Education')); ?
>
1556 <?php
if (acl_check('encounters','auth'))
1557 genTreeLink('RBot','aun',xl('Authorizations')); ?
>
1558 <?php
if (acl_check('patients','docs'))
1559 genTreeLink('RTop','fax',xl('Fax/Scan')); ?
>
1560 <?php
if (acl_check('admin','practice'))
1561 genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1562 <?php
if (acl_check('admin','practice'))
1563 genTreeLink('RTop','ort',xl('Order Catalog')); ?
>
1564 <?php
if (!$GLOBALS['disable_chart_tracker'] && acl_check('patients','appt'))
1565 genTreeLink('RTop','cht',xl('Chart Tracker')); ?
>
1566 <?php
if (acl_check('encounters','notes'))
1567 genTreeLink('RTop','ono',xl('Ofc Notes')); ?
>
1568 <?php
if (acl_check('admin','batchcom') ||
acl_check('admin','practice'))
1569 genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?
>
1570 <?php
$myrow = sqlQuery("SELECT state FROM registry WHERE directory = 'track_anything'");
1571 if($myrow['state']=='1') { genTreeLink('RTop','tan',xl('Configure Tracks')); } ?
>
1572 <?php
if(!$GLOBALS['use_active_directory']) { genTreeLink('RTop','pwd',xl('Password')); } ?
>
1573 <?php
genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?
>
1574 <?php
if(acl_check('patients','docs','','write') ||
acl_check('patients','docs','','addonly'))
1575 genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=00'); ?
>
1576 <?php
if (acl_check('admin','practice'))
1577 genMiscLink('RTop','adm','0',xl('Document Templates'),'super/manage_document_templates.php'); ?
>
1585 <div id
='current_patient' style
= 'display:none'>
1586 <b
><?php
xl('None','e'); ?
></b
>
1589 <div id
='current_encounter' style
= 'display:none'>
1590 <b
><?php
xl('None','e'); ?
></b
>
1599 <input type
='hidden' name
='findBy' value
='Last' />
1600 <input type
="hidden" name
="searchFields" id
="searchFields"/>
1601 <input type
="hidden" name
="search_service_code" value
='' />
1605 <script language
='JavaScript'>
1608 function save_setting (cb_frames
) {
1609 for (var i
= 0, len
= cb_frames
.length
; i
< len
; i++
) {
1611 var fref
= '<?php echo $uspfx ?>frame' + i +
'_chk';
1612 var ureq
= $
.post( "<?php echo $GLOBALS['webroot'] ?>/library/ajax/user_settings.php",
1613 { lab
: fref
, val
: cb_frames
[i
] })
1614 .done(function(data
) {
1615 // alert( "Data Loaded: " + data );
1617 .fail(function(xhr
, textStatus
, errorThrown
) {
1618 alert("Error:"+xhr
.responseText+
"\n"+textStatus+
"\n"+errorThrown
);
1620 .always(function() {
1621 // alert( "finished" );
1625 alert (err
.message
);