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 'aop' => array(xl('Portal Dashboard') , 0, '../portal/patient/provider'),
115 'msg' => array(xl('Messages') , 0, 'main/messages/messages.php?form_active=1'),
116 'pwd' => array(xl('Password') , 0, 'usergroup/user_info.php'),
117 'prf' => array(xl('Preferences') , 0, 'super/edit_globals.php?mode=user'),
118 'adm' => array(xl('Admin') , 0, 'usergroup/admin_frameset.php'),
119 'rep' => array(xl('Reports') , 0, 'reports/index.php'),
120 'ono' => array(xl('Ofc Notes') , 0, 'main/onotes/office_comments.php'),
121 'fax' => array(xl('Fax/Scan') , 0, 'fax/faxq.php'),
122 'adb' => array(xl('Addr Bk') , 0, 'usergroup/addrbook_list.php'),
123 'orl' => array(xl('Proc Prov') , 0, 'orders/procedure_provider_list.php'),
124 'ort' => array(xl('Proc Cat') , 0, 'orders/types.php'),
125 'orc' => array(xl('Proc Load') , 0, 'orders/load_compendium.php'),
126 'orb' => array(xl('Proc Bat') , 0, 'orders/orders_results.php?batch=1'),
127 'ore' => array(xl('E-Reports') , 0, 'orders/list_reports.php'),
128 'ppo' => array(xl('CMS Portal'), 0, 'cmsportal/list_requests.php'),
129 'cht' => array(xl('Chart Trk') , 0, '../custom/chart_tracker.php'),
130 'imp' => array(xl('Import') , 0, '../custom/import.php'),
131 'bil' => array(xl('Billing') , 0, 'billing/billing_report.php'),
132 'sup' => array(xl('Superbill') , 0, 'patient_file/encounter/superbill_custom_full.php'),
133 'aun' => array(xl('Authorizations'), 0, 'main/authorizations/authorizations.php'),
134 'new' => array(xl('New Pt') , 0, 'new/new.php'),
135 'ped' => array(xl('Patient Education'), 0, 'reports/patient_edu_web_lookup.php'),
136 'lab' => array(xl('Check Lab Results') , 0, 'orders/lab_exchange.php'),
137 'dem' => array(xl('Patient') , 1, "patient_file/summary/demographics.php"),
138 'his' => array(xl('History') , 1, 'patient_file/history/history.php'),
139 'ens' => array(xl('Visit History'), 1, 'patient_file/history/encounters.php'),
140 'nen' => array(xl('Create Visit'), 1, 'forms/newpatient/new.php?autoloaded=1&calenc='),
141 'pre' => array(xl('Rx') , 1, 'patient_file/summary/rx_frameset.php'),
142 'iss' => array(xl('Issues') , 1, 'patient_file/summary/stats_full.php?active=all'),
143 'imm' => array(xl('Immunize') , 1, 'patient_file/summary/immunizations.php'),
144 'doc' => array(xl('Documents') , 1, '../controller.php?document&list&patient_id={PID}'),
145 'orp' => array(xl('Proc Pending Rev'), 1, 'orders/orders_results.php?review=1'),
146 'orr' => array(xl('Proc Res') , 1, 'orders/orders_results.php'),
147 'lda' => array(xl('Lab overview') , 1, 'patient_file/summary/labdata.php'),
148 'tan' => array(xl('Configure Tracks') , 0, 'forms/track_anything/create.php'),
149 'prp' => array(xl('Pt Report') , 1, 'patient_file/report/patient_report.php'),
150 'prq' => array(xl('Pt Rec Request') , 1, 'patient_file/transaction/record_request.php'),
151 'pno' => array(xl('Pt Notes') , 1, 'patient_file/summary/pnotes.php'),
152 'tra' => array(xl('Transact') , 1, 'patient_file/transaction/transactions.php'),
153 'sum' => array(xl('Summary') , 1, 'patient_file/summary/summary_bottom.php'),
154 'enc' => array(xl('Encounter') , 2, 'patient_file/encounter/encounter_top.php'),
155 'erx' => array(xl('e-Rx') , 1, 'eRx.php'),
156 'err' => array(xl('e-Rx Renewal') , 1, 'eRx.php?page=status'),
157 'ere' => array(xl('e-Rx EPCS') , 1, 'eRx.php?page=epcs-admin'),
158 'pay' => array(xl('Payment') , 1, '../patient_file/front_payment.php'),
159 'edi' => array(xl('EDI History') , 0, 'billing/edih_view.php'),
160 'eob' => array(xl('Posting') , 0, 'billing/sl_eob_search.php'),
161 'dld' => array(xl('Display Documents'), 0, 'main/display_documents.php')
163 $primary_docs['npa']=array(xl('Batch Payments') , 0, 'billing/new_payment.php');
164 if ($GLOBALS['use_charges_panel'] ||
$GLOBALS['menu_styling_vertical'] == 0) {
165 $primary_docs['cod'] = array(xl('Charges'), 2, 'patient_file/encounter/encounter_bottom.php');
168 if($GLOBALS['enable_group_therapy']){
169 $primary_docs['gng'] = array(xl('New') , 0, 'therapy_groups/index.php?method=addGroup');
170 $primary_docs['gdg'] = array(xl('Group Details') , 3, '/therapy_groups/index.php?method=groupDetails&group_id=from_session');
171 $primary_docs['gcv'] = array(xl('Create Visit'), 3, 'forms/newGroupEncounter/new.php?autoloaded=1&calenc=');
172 $primary_docs['gce'] = array(xl('Current') , 4, 'patient_file/encounter/encounter_top.php');
173 $primary_docs['gvh'] = array(xl('Visit History'), 3, 'patient_file/history/encounters.php');
176 $esignApi = new Api();
177 // This section decides which navigation items will not appear.
179 $disallowed = array();
180 $disallowed['edi'] = !($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob'));
181 $disallowed['adm'] = !(acl_check('admin', 'calendar') ||
182 acl_check('admin', 'database') ||
acl_check('admin', 'forms') ||
183 acl_check('admin', 'practice') ||
acl_check('admin', 'users') ||
184 acl_check('admin', 'acl') ||
acl_check('admin', 'super') ||
185 acl_check('admin', 'superbill') ||
acl_check('admin', 'drugs'));
187 $disallowed['bil'] = !(acl_check('acct', 'eob') ||
acl_check('acct', 'bill'));
189 $disallowed['new'] = !(acl_check('patients','demo','',array('write','addonly') ));
191 $disallowed['fax'] = !(($GLOBALS['enable_hylafax'] ||
$GLOBALS['enable_scanner']) && acl_check('patients', 'docs'));
193 $disallowed['iss'] = !((acl_check('encounters','notes','','write') ||
194 acl_check('encounters','notes_a','','write') ) &&
195 acl_check('patients','med','','write') );
197 $disallowed['imp'] = $disallowed['new'] ||
!is_readable("$webserver_root/custom/import.php");
199 $disallowed['cht'] = !is_readable("$webserver_root/custom/chart_tracker.php");
201 $disallowed['pre'] = !(acl_check('patients', 'med'));
202 $disallowed['eob'] = !(acl_check('acct', 'eob'));
204 // Helper functions for treeview generation.
205 function genTreeLink($frame, $name, $title, $mono=false) {
206 global $primary_docs, $disallowed;
207 if (empty($disallowed[$name])) {
208 $id = $name . $primary_docs[$name][1];
209 echo "<li><a href='' id='$id' onclick=\"";
211 if ($frame == 'RTop')
212 echo "forceSpec(true,false);";
214 echo "forceSpec(false,true);";
216 echo "return loadFrame2('$id','$frame','" .
217 $primary_docs[$name][2] . "')\">" . $title . ($name == 'msg' ?
' <span id="reminderCountSpan" class="bold"></span>' : '')."</a></li>";
220 function genMiscLink($frame, $name, $level, $title, $url, $mono=false) {
222 if (empty($disallowed[$name])) {
223 $id = $name . $level;
224 echo "<li><a href='' id='$id' onclick=\"";
226 if ($frame == 'RTop')
227 echo "forceSpec(true,false);";
229 echo "forceSpec(false,true);";
231 echo "return loadFrame2('$id','$frame','" .
232 $url . "')\">" . $title . "</a></li>";
235 function genMiscLink2($frame, $name, $level, $title, $url, $mono=false,$mouseovertext="") {
237 if (empty($disallowed[$name])) {
239 $id = $name . $level;
240 echo "<li><a href='' id='$id' title='$mouseovertext' onclick=\"";
242 if ($frame == 'RTop')
243 echo "forceSpec(true,false);";
245 echo "forceSpec(false,true);";
247 echo "return loadFrame3('$id','$frame','" .
248 $url . "')\">" . $title . "</a></li>";
251 function genPopLink($title, $url, $linkid='') {
252 echo "<li><a href='' ";
253 if ($linkid) echo "id='$linkid' ";
254 echo "onclick=\"return repPopup('$url')\"" .
255 ">" . $title . "</a></li>";
257 function genDualLink($topname, $botname, $title) {
258 global $primary_docs, $disallowed;
259 if (empty($disallowed[$topname]) && empty($disallowed[$botname])) {
260 $topid = $topname . $primary_docs[$topname][1];
261 $botid = $botname . $primary_docs[$botname][1];
262 echo "<li><a href='' id='$topid' " .
263 "onclick=\"return loadFrameDual('$topid','$botid','" .
264 $primary_docs[$topname][2] . "','" .
265 $primary_docs[$botname][2] . "')\">" . $title . "</a></li>";
269 function genPopupsList($style='') {
270 global $disallowed, $webserver_root;
272 <select name
='popups' onchange
='selpopup(this)' style
='background-color:transparent;font-size:9pt;<?php echo $style; ?>'>
273 <option value
=''><?php
xl('Popups','e'); ?
></option
>
274 <?php
if (!$disallowed['iss']) { ?
>
275 <option value
='../patient_file/problem_encounter.php'><?php
xl('Issues','e'); ?
></option
>
277 <?php
if (!$GLOBALS['ippf_specific'] && acl_check('patients', 'demo')) { ?
>
278 <option value
='../../custom/export_xml.php'><?php
xl('Export','e'); ?
></option
>
279 <?php
if (acl_check('patients', 'demo', '', 'write')) { ?
>
280 <option value
='../../custom/import_xml.php'><?php
xl('Import','e'); ?
></option
>
282 if (!$GLOBALS['disable_calendar'] && acl_check('patients', 'appt')) { ?
>
283 <option value
='../reports/appointments_report.php?patient=<?php if(isset($pid)) {echo $pid;} ?>'><?php
xl('Appts','e'); ?
></option
>
285 <?php
if (acl_check('patients', 'med')) { ?
>
286 <option value
='../patient_file/printed_fee_sheet.php?fill=1'><?php
xl('Superbill','e'); ?
></option
>
288 <?php
if (acl_check('acct', 'bill', '', 'write')) { ?
>
289 <option value
='../patient_file/front_payment.php'><?php
xl('Payment','e'); ?
></option
>
291 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('acct', 'bill', '', 'write')) { ?
>
292 <option value
='../patient_file/pos_checkout.php'><?php
xl('Checkout','e'); ?
></option
>
294 <?php
if (is_dir($GLOBALS['OE_SITE_DIR'] . "/letter_templates") && acl_check('patients', 'med')) { ?
>
295 <option value
='../patient_file/letter.php'><?php
xl('Letter','e'); ?
></option
>
297 <?php
if ($GLOBALS['chart_label_type'] != '0' && acl_check('patients', 'demo')) { ?
>
298 <option value
='../patient_file/label.php'><?php
xl('Chart Label','e'); ?
></option
>
300 <?php
if ($GLOBALS['barcode_label_type'] != '0' && acl_check('patients', 'demo')) { ?
>
301 <option value
='../patient_file/barcode_label.php'><?php
xl('Barcode Label','e'); ?
></option
>
303 <?php
if ($GLOBALS['addr_label_type'] && acl_check('patients', 'demo')) { ?
>
304 <option value
='../patient_file/addr_label.php'><?php
xl('Address Label','e'); ?
></option
>
310 function genFindBlock() {
312 <table cellpadding
='0' cellspacing
='0' border
='0'>
314 <td
class='smalltext'><?php
xl('Find','e') ?
>: 
;</td
>
315 <td
class='smalltext' colspan
='2'>
316 <input type
="entry" size
="7" name
="patient" class='inputtext' style
='width:65px;' />
320 <td
class='smalltext'><?php
xl('by','e') ?
>:</td
>
321 <td
class='smalltext'>
322 <a href
="javascript:findPatient('Last');" class="navitem"><?php
xl('Name','e'); ?
></a
>
324 <td
class='smalltext' align
='right'>
325 <a href
="javascript:findPatient('ID');" class="navitem"><?php
xl('ID','e'); ?
></a
>
329 <td
class='smalltext'> 
;</td
>
330 <td
class='smalltext'>
331 <a href
="javascript:findPatient('SSN');" class="navitem"><?php
xl('SSN','e'); ?
></a
>
333 <td
class='smalltext' align
='right'>
334 <a href
="javascript:findPatient('DOB');" class="navitem"><?php
xl('DOB','e'); ?
></a
>
338 <td
class='smalltext'> 
;</td
>
339 <td
class='smalltext'>
340 <a href
="javascript:findPatient('Any');" class="navitem"><?php
xl('Any', 'e'); ?
></a
>
342 <td
class='smalltext' align
='right'>
343 <a href
="javascript:initFilter();" class="navitem"><?php
xl('Filter', 'e'); ?
></a
>
348 } // End function genFindBlock()
353 <title
>Navigation
</title
>
355 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
356 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'];?>/font-awesome-4-6-3/css/font-awesome.css" type
="text/css">
357 <style type
="text/css">
361 padding
: 5px
3px
5px
3px
;
364 font
-family
:sans
-serif
;
368 a
.navitem
, a
.navitem
:visited
{
370 font
-family
:sans
-serif
;
381 border
-color
: #000000;
382 background
-color
:transparent
;
386 background
-color
:transparent
;
388 #navigation-slide ul {
389 background
-color
:transparent
;
399 vertical
-align
:middle
;
403 <link rel
="stylesheet" href
="../../library/js/jquery.treeview-1.4.1/jquery.treeview.css" />
404 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-6-4/index.js"></script
>
405 <script type
="text/javascript" src
="../../library/js/jquery.treeview-1.4.1/jquery.treeview.js" ></script
>
407 <script type
="text/javascript" src
="../../library/dialog.js?v=<?php echo $v_js_includes; ?>"></script
>
409 <script language
='JavaScript'>
411 var usrval
= jQuery
.parseJSON('<?php echo $usrval ?>');
413 // tajemo work by CB 2012/01/31 12:32:57 PM dated reminders counter
414 function getReminderCount(){
415 top
.restoreSession();
416 // Send the skip_timeout_reset parameter to not count this as a manual entry in the
417 // timing out mechanism in OpenEMR.
418 $
.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
419 { skip_timeout_reset
: "1" },
421 $
("#reminderCountSpan").html(data
);
422 // run updater every 60 seconds
423 var repeater
= setTimeout("getReminderCount()", 60000);
425 //piggy-back on this repeater to run other background-services
426 //this is a silent task manager that returns no output
427 $
.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/execute_background_services.php",
428 { skip_timeout_reset
: "1", ajax
: "1" });
431 $
(document
).ready(function (){
432 getReminderCount();//
433 parent
.loadedFrameCount +
= 1;
434 for (var i
= 0, len
= usrval
.length
; i
< len
; i++
) {
435 if (usrval
[i
] != "checked") toggleFrame(i+
1);
438 // end of tajemo work dated reminders counter
440 // Master values for current pid and encounter.
442 var active_encounter
= 0;
443 var encounter_locked
= false;
447 // Current selections in the top and bottom frames.
451 // Expand and/or collapse frames in response to checkbox clicks.
452 // fnum indicates which checkbox was clicked (1=left, 2=right).
453 function toggleFrame(fnum
) {
454 var f
= document
.forms
[0];
455 var fset
= top
.document
.getElementById('fsright');
456 if (!f
.cb_top
.checked
&& !f
.cb_bot
.checked
) {
457 if (fnum
== 1) f
.cb_bot
.checked
= true;
458 else f
.cb_top
.checked
= true;
460 var rows
= f
.cb_top
.checked ?
'*' : '0';
461 rows +
= f
.cb_bot
.checked ?
',*' : ',0';
463 save_setting ([(f
.cb_top
.checked ?
'checked' : ' '), (f
.cb_bot
.checked ?
'checked' : ' ')]);
466 // Load the specified url into the specified frame (RTop or RBot).
467 // The URL provided must be relative to interface.
468 function loadFrame(fname
, frame
, url
) {
469 top
.restoreSession();
470 var i
= url
.indexOf('{PID}');
471 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
472 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
473 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
476 // Load the specified url into a frame to be determined, with the specified
477 // frame as the default; the url must be relative to interface.
478 function loadFrame2(fname
, frame
, url
) {
479 var usage
= fname
.substring(3);
480 if (active_pid
== 0 && active_gid
== 0 && (usage
> '0' && usage
< '5')){
481 <?php
if($GLOBALS['enable_group_therapy']) { ?
>
482 alert('<?php xl('You must first select
or add a patient
or therapy group
.','e
') ?>');
484 alert('<?php xl('You must first select
or add a patient
.','e
') ?>');
488 if (active_encounter
== 0 && (usage
> '1' && usage
< '3')) {
489 alert('<?php xl('You must first select
or create an encounter
.','e
') ?>');
492 if (encounter_locked
&& usage
> '1' && (usage
> '1' && usage
< '3')) {
493 alert('<?php echo xls('This encounter is locked
. No
new forms can be added
.') ?>');
496 var f
= document
.forms
[0];
497 top
.restoreSession();
498 var i
= url
.indexOf('{PID}');
499 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
502 var fi
= f
.sel_frame
.selectedIndex
;
503 if (fi
== 1) frame
= 'RTop'; else if (fi
== 2) frame
= 'RBot';
505 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
506 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
507 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
511 function loadFrame3(fname
, frame
, url
) {
512 var f
= document
.forms
[0];
513 top
.restoreSession();
514 var i
= url
.indexOf('{PID}');
515 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
518 var fi
= f
.sel_frame
.selectedIndex
;
519 if (fi
== 1) frame
= 'RTop'; else if (fi
== 2) frame
= 'RBot';
521 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
522 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
523 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
527 // Make sure the the top and bottom frames are open or closed, as specified.
528 function forceSpec(istop
, isbot
) {
529 var f
= document
.forms
[0];
530 if (f
.cb_top
.checked
!= istop
) {
531 f
.cb_top
.checked
= istop
;
534 if (f
.cb_bot
.checked
!= isbot
) {
535 f
.cb_bot
.checked
= isbot
;
540 // Make sure both frames are open.
541 function forceDual() {
542 forceSpec(true, true);
545 // Load the specified url into a frame to be determined, with the specified
546 // frame as the default; the url must be relative to interface.
547 function loadFrameDual(tname
, bname
, topurl
, boturl
) {
548 var topusage
= tname
.substring(3);
549 var botusage
= bname
.substring(3);
550 if (active_pid
== 0 && (topusage
> '0' || botusage
> '0')) {
551 alert('<?php xl('You must first select
or add a patient
.','e
') ?>');
554 if (active_encounter
== 0 && (topusage
> '1' || botusage
> '1')) {
555 alert('<?php xl('You must first select
or create an encounter
.','e
') ?>');
558 if (encounter_locked
&& (topusage
> '1' || botusage
> '1')) {
559 alert('<?php echo xls('This encounter is locked
. No
new forms can be added
.') ?>');
562 var f
= document
.forms
[0];
564 top
.restoreSession();
565 var i
= topurl
.indexOf('{PID}');
566 if (i
>= 0) topurl
= topurl
.substring(0,i
) + active_pid + topurl
.substring(i+
5);
567 i
= boturl
.indexOf('{PID}');
568 if (i
>= 0) boturl
= boturl
.substring(0,i
) + active_pid + boturl
.substring(i+
5);
569 top
.frames
.RTop
.location
= '<?php echo "$web_root/interface/" ?>' + topurl
;
570 top
.frames
.RBot
.location
= '<?php echo "$web_root/interface/" ?>' + boturl
;
576 // Set disabled/enabled state of radio buttons and associated labels
577 // depending on whether there is an active patient or encounter.
578 function syncRadios() {
579 var f
= document
.forms
[0];
580 encounter_locked
= isEncounterLocked(active_encounter
);
581 var nlinks
= document
.links
.length
;
582 for (var i
= 0; i
< nlinks
; ++i
) {
583 var lnk
= document
.links
[i
];
584 if (lnk
.id
.length
!= 4) continue;
585 var usage
= lnk
.id
.substring(3);
586 if (usage
== '1' || usage
== '2') {
588 if (active_pid
== 0) da
= true;
589 if (active_encounter
== 0 && usage
> '1') da
= true;
590 if (encounter_locked
&& usage
> '1') da
= true;
592 if ($GLOBALS['menu_styling_vertical'] == 0){
593 $color = "'#0000ff'";
594 }else{ // ($GLOBALS['menu_styling_vertical'] == 1)
595 $color = "'#000000'";
598 lnk
.style
.color
= da ?
'#888888' : <?php
echo $color; ?
>;
600 //for therapy groups menu
601 <?php
if($GLOBALS['enable_group_therapy']) { ?
>
602 if (usage
== '3' || usage
== '4') {
604 if (active_gid
== 0) da
= true;
605 if (active_encounter
== 0 && usage
> '3') da
= true;
606 if (encounter_locked
&& usage
> '3') da
= true;
608 if ($GLOBALS['menu_styling_vertical'] == 0){
609 $color = "'#0000ff'";
610 }else{ // ($GLOBALS['menu_styling_vertical'] == 1)
611 $color = "'#000000'";
614 lnk
.style
.color
= da ?
'#888888' : <?php
echo $color; ?
>;
619 f
.popups
.disabled
= (active_pid
== 0);
623 top
.frames
['RTop'].location
='<?php echo $GLOBALS['default_top_pane
']?>';
624 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';
627 //Function to clear active patient and encounter in the server side
628 function clearactive() {
629 top
.restoreSession();
630 //Ajax call to clear active patient in session
631 var method
= (active_pid
> 0) ?
'unset_pid' : 'unset_gid';
634 url
: "<?php echo $GLOBALS['webroot'] ?>/library/ajax/unset_session_ajax.php",
635 data
: { func
: method
},
636 success
:function( msg
) {
639 top
.frames
['RTop'].location
='<?php echo $GLOBALS['default_top_pane
']?>';
640 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';
644 $
(parent
.Title
.document
.getElementById('clear_active')).hide();
645 $
(parent
.Title
.document
.getElementById('clear_active_group')).hide();
647 // Reference to the search.php window.
650 // Open the search.php window.
651 function initFilter() {
652 my_window
= window
.open("../../custom/search.php", "mywindow","status=1");
655 // This is called by the search.php (Filter) window.
656 function processFilter(fieldString
, serviceCode
) {
657 var f
= document
.forms
[0];
658 document
.getElementById('searchFields').value
= fieldString
;
659 f
.search_service_code
.value
= serviceCode
;
660 findPatient("Filter");
661 f
.search_service_code
.value
= '';
665 // Process the click to find a patient by name, id, ssn or dob.
666 function findPatient(findby
) {
667 var f
= document
.forms
[0];
668 if (! f
.cb_top
.checked
) {
669 f
.cb_top
.checked
= true;
672 f
.findBy
.value
= findby
;
673 top
.restoreSession();
674 document
.find_patient
.submit();
677 // Helper function to set the contents of a div.
678 function setSomeContent(id
, content
, doc
) {
679 if (doc
.getElementById
) {
680 var x
= doc
.getElementById(id
);
682 x
.innerHTML
= content
;
686 x
.innerHTML
= content
;
689 function setDivContent(id
, content
) {
690 setSomeContent(id
, content
, document
);
692 function setTitleContent(id
, content
) {
693 setSomeContent(id
, content
, parent
.Title
.document
);
696 // This is called automatically when a new patient is set, to make sure
697 // there are no patient-specific documents showing stale data. If a frame
698 // was just loaded with data for the correct patient, its name is passed so
699 // that it will not be zapped. At this point the new server-side pid is not
700 // assumed to be set, so this function will only load global data.
701 function reloadPatient(frname
) {
702 var f
= document
.forms
[0];
703 if (topName
.length
> 3 && topName
.substring(3) > '0' && frname
!= 'RTop') {
704 loadFrame('cal0','RTop', '<?php echo $primary_docs['cal
'][2]; ?>');
706 if (botName
.length
> 3 && botName
.substring(3) > '0' && frname
!= 'RBot') {
707 loadFrame('ens0','RBot', '<?php echo $primary_docs['ens
'][2]; ?>');
711 // Reload encounter-specific frames, excluding a specified frame. At this
712 // point the new server-side encounter ID may not be set and loading the same
713 // document for the new encounter will not work, so load patient info instead.
714 function reloadEncounter(frname
) {
715 var f
= document
.forms
[0];
716 if (topName
.length
> 3 && topName
.substring(3) > '1' && frname
!= 'RTop') {
717 loadFrame('dem1','RTop', '<?php echo $primary_docs['dem
'][2]; ?>');
719 if (botName
.length
> 3 && botName
.substring(3) > '1' && frname
!= 'RBot') {
720 loadFrame('ens1','RBot', '<?php echo $primary_docs['ens
'][2]; ?>');
725 // Call this to announce that the patient has changed. You must call this
726 // if you change the session PID, so that the navigation frame will show the
727 // correct patient and so that the other frame will be reloaded if it contains
728 // patient-specific information from the previous patient. frname is the name
729 // of the frame that the call came from, so we know to only reload content
730 // from the *other* frame if it is patient-specific.
731 function setPatient(pname
, pid
, pubpid
, frname
, str_dob
) {
733 var str
= '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentPatientFromTitle()" title="PID = ' + pid +
'"><b>' + pname +
' (' + pubpid +
')<br /></b></a>';
734 setDivContent('current_patient', str
);
735 setTitleContent('current_patient', str + str_dob
);
736 if (pid
== active_pid
) return;
737 setDivContent('current_encounter', '<b><?php xl('None
','e
'); ?></b>');
739 active_encounter
= 0;
740 encounter_locked
= false;
741 if (frname
) reloadPatient(frname
);
743 $
(parent
.Title
.document
.getElementById('current_patient_block')).show();
744 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
745 $
(encounter_block
).hide();
747 // zero out the encounter frame, replace it with the encounter list frame
748 var f
= document
.forms
[0];
749 if ( f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
750 var encounter_frame
= getEncounterTargetFrame('enc');
751 if ( encounter_frame
!= undefined
) {
752 loadFrame('ens0',encounter_frame
, '<?php echo $primary_docs['ens
'][2]; ?>');
756 $
(parent
.Title
.document
.getElementById('clear_active')).show();//To display Clear Active Patient button on selecting a patient
757 $
(parent
.Title
.document
.getElementById('clear_active_group')).hide();//To hide Clear Active group button on selecting a patient
761 // Call this to announce that the therapy group has changed. You must call this
762 // if you change the session 'therapy_group', so that the navigation frame will show the
764 function setTherapyGroup(group_id
, group_name
) {
767 $
(parent
.Title
.document
.querySelector('#current_patient_block span.text')).hide();
768 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>' );
769 if (group_id
== active_gid
) return;
770 setDivContent('current_encounter', '<b><?php xl('None
','e
'); ?></b>');
771 active_gid
= group_id
;
772 active_encounter
= 0;
773 encounter_locked
= false;
775 $
(parent
.Title
.document
.getElementById('current_patient_block')).show();
776 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
777 $
(encounter_block
).hide();
779 // zero out the encounter frame, replace it with the encounter list frame
780 var f
= document
.forms
[0];
781 if ( f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
782 var encounter_frame
= getEncounterTargetFrame('enc');
783 if ( encounter_frame
!= undefined
) {
784 loadFrame('ens0',encounter_frame
, '<?php echo $primary_docs['ens
'][2]; ?>');
788 $
(parent
.Title
.document
.getElementById('clear_active_group')).show();//To display Clear Active group button on selecting a patient
789 $
(parent
.Title
.document
.getElementById('clear_active')).hide();//To hide Clear Active Patient button on selecting a patient
792 function setPatientEncounter(EncounterIdArray
,EncounterDateArray
,CalendarCategoryArray
) {
793 //This function lists all encounters of the patient.
794 //This function writes the drop down in the top frame.
795 //It is called when a new patient is create/selected from the search menu.
796 var str
= '<Select class="text" id="EncounterHistory" onchange="{top.restoreSession();toencounter(this.options[this.selectedIndex].value)}">';
797 str+
='<option value=""><?php echo htmlspecialchars( xl('Encounter History
'), ENT_QUOTES) ?></option>';
798 <?php
if (acl_check_form('newpatient', '', array('write', 'addonly'))) { ?
>
799 str+
='<option value="New Encounter"><?php echo htmlspecialchars( xl('New Encounter
'), ENT_QUOTES) ?></option>';
801 str+
='<option value="Past Encounter List"><?php echo htmlspecialchars( xl('Past Encounter
List'), ENT_QUOTES) ?></option>';
802 for(CountEncounter
=0;CountEncounter
<EncounterDateArray
.length
;CountEncounter++
)
804 str+
='<option value="'+EncounterIdArray
[CountEncounter
]+
'~'+EncounterDateArray
[CountEncounter
]+
'">'+EncounterDateArray
[CountEncounter
]+
'-'+CalendarCategoryArray
[CountEncounter
]+
'</option>';
807 $
(parent
.Title
.document
.getElementById('past_encounter_block')).show();
808 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
=str
;
811 function loadCurrentPatientFromTitle() {
812 top
.restoreSession();
813 top
.frames
['RTop'].location
='../patient_file/summary/demographics.php';
816 function loadCurrentGroupFromTitle(gid
) {
817 top
.restoreSession();
818 top
.frames
['RTop'].location
='../therapy_groups/index.php?method=groupDetails&group_id=' + gid
;
821 function getEncounterTargetFrame( name
) {
822 var bias
= <?php
echo $primary_docs[ 'enc' ][ 1 ]?
>;
823 var f
= document
.forms
[0];
825 if (f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
832 if ( f
.cb_top
.checked
) {
834 } else if ( f
.cb_bot
.checked
) {
841 function isEncounterLocked( encounterId
) {
842 <?php
if ( $esignApi->lockEncounters() ) { ?
>
843 // If encounter locking is enabled, make a syncronous call (async=false) to check the
844 // DB to see if the encounter is locked.
845 // Call restore session, just in case
846 top
.restoreSession();
849 url
: '<?php echo $GLOBALS['webroot
']?>/interface/esign/index.php?module=encounter&method=esign_is_encounter_locked',
850 data
: { encounterId
: encounterId
},
851 success
: function( data
) {
852 encounter_locked
= data
;
857 return encounter_locked
;
859 // If encounter locking isn't enabled, just tell the left_nav that the encounter
865 // Call this to announce that the encounter has changed. You must call this
866 // if you change the session encounter, so that the navigation frame will
867 // show the correct encounter and so that the other frame will be reloaded if
868 // it contains encounter-specific information from the previous encounter.
869 // frname is the name of the frame that the call came from, so we know to only
870 // reload encounter-specific content from the *other* frame.
871 function setEncounter(edate
, eid
, frname
) {
872 if (eid
== active_encounter
) return;
873 if (!eid
) edate
= '<?php xl('None
','e
'); ?>';
874 var str
= '<b>' + edate +
'</b>';
875 setDivContent('current_encounter', str
);
876 active_encounter
= eid
;
877 encounter_locked
=isEncounterLocked(active_encounter
);
878 reloadEncounter(frname
);
880 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
881 var encounter
= $
(parent
.Title
.document
.getElementById('current_encounter'));
882 var estr
= '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentEncounterFromTitle()"><b>' + edate +
' (' + eid +
')</b></a>';
883 encounter
.html( estr
);
884 encounter_block
.show();
887 function loadCurrentEncounterFromTitle() {
888 top
.restoreSession();
889 top
.frames
[ parent
.left_nav
.getEncounterTargetFrame('enc') ].location
='../patient_file/encounter/encounter_top.php';
892 // You must call this if you delete the active patient (or if for any other
893 // reason you "close" the active patient without opening a new one), so that
894 // the appearance of the navigation frame will be correct and so that any
895 // stale content will be reloaded.
896 function clearPatient() {
897 if (active_pid
== 0) return;
898 var f
= document
.forms
[0];
900 active_encounter
= 0;
901 encounter_locked
= false;
902 setDivContent('current_patient', '<b><?php xl('None
','e
'); ?></b>');
903 $
(parent
.Title
.document
.getElementById('current_patient_block')).hide();
904 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
='';
905 $
(parent
.Title
.document
.getElementById('current_encounter_block')).hide();
910 // You must call this if you delete the active therapy group so that
911 // the appearance of the navigation frame will be correct and so that any
912 // stale content will be reloaded.
913 function clearTherapyGroup() {
914 if (active_gid
== 0) return;
915 var f
= document
.forms
[0];
917 active_encounter
= 0;
918 encounter_locked
= false;
919 setDivContent('current_patient', '<b><?php xl('None
','e
'); ?></b>');
920 $
(parent
.Title
.document
.getElementById('current_patient_block')).hide();
921 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
='';
922 $
(parent
.Title
.document
.getElementById('current_encounter_block')).hide();
926 // You must call this if you delete the active encounter (or if for any other
927 // reason you "close" the active encounter without opening a new one), so that
928 // the appearance of the navigation frame will be correct and so that any
929 // stale content will be reloaded.
930 function clearEncounter() {
931 if (active_encounter
== 0) return;
932 top
.window
.parent
.Title
.document
.getElementById('current_encounter').innerHTML
="<b><?php echo htmlspecialchars( xl('None'), ENT_QUOTES) ?></b>";
933 active_encounter
= 0;
934 encounter_locked
= false;
939 function removeOptionSelected(EncounterId
)
940 {//Removes an item from the Encounter drop down.
941 var elSel
= top
.window
.parent
.Title
.document
.getElementById('EncounterHistory');
943 for (i
= elSel
.length
- 1; i
>=2; i
--) {
944 EncounterHistoryValue
=elSel
.options
[i
].value
;
945 EncounterHistoryValueArray
=EncounterHistoryValue
.split('~');
946 if (EncounterHistoryValueArray
[0]==EncounterId
) {
952 // You can call this to make sure the session pid is what we expect.
953 function pidSanityCheck(pid
) {
954 if (pid
!= active_pid
) {
955 alert('Session patient ID is ' + pid +
', expecting ' + active_pid +
956 '. This session is unstable and should be abandoned. Do not use ' +
957 'OpenEMR in multiple browser windows!');
963 // You can call this to make sure the session encounter is what we expect.
964 function encounterSanityCheck(eid
) {
965 if (eid
!= active_encounter
) {
966 alert('Session encounter ID is ' + eid +
', expecting ' + active_encounter +
967 '. This session is unstable and should be abandoned. Do not use ' +
968 'OpenEMR in multiple browser windows!');
975 function repPopup(aurl
) {
976 top
.restoreSession();
977 window
.open('<?php echo "$web_root/interface/reports/" ?>' + aurl
, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
981 // This is invoked to pop up some window when a popup item is selected.
982 function selpopup(selobj
) {
983 var i
= selobj
.selectedIndex
;
984 var opt
= selobj
.options
[i
];
988 if (opt
.text
== 'Export' || opt
.text
== 'Import') {
992 dlgopen(opt
.value
, '_blank', width
, height
);
994 selobj
.selectedIndex
= 0;
997 // Treeview activation stuff:
998 $
(document
).ready(function(){
999 if(1 == <?php
echo $GLOBALS['menu_styling_vertical'] ?
>){
1000 $
("#navigation-slide > li > a.collapsed + ul").slideToggle("medium");
1001 $
("#navigation-slide > li > ul > li > a.collapsed_lv2 + ul").slideToggle("medium");
1002 $
("#navigation-slide > li > a.expanded").click(function() {
1003 $
("#navigation-slide > li > a.expanded").not(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1004 $
(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1006 $
("#navigation-slide > li > a.collapsed").click(function() {
1007 $
("#navigation-slide > li > a.expanded").not(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1008 $
(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1010 $
("#navigation-slide > li > ul > li > a.expanded_lv2").click(function() {
1011 $
("#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");
1012 $
(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
1014 $
("#navigation-slide > li > ul > li > a.collapsed_lv2").click(function() {
1015 $
("#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");
1016 $
(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
1018 $
("#navigation-slide > li > a#cal0").prepend('<i class="fa fa-fw fa-calendar"></i> ');
1019 $
("#navigation-slide > li > a#pfb0").prepend('<i class="fa fa-fw fa-list-alt"></i> ');
1020 $
("#navigation-slide > li > a#msg0").prepend('<i class="fa fa-fw fa-envelope-o"></i> ');
1021 $
("#navigation-slide > li > a#app0").prepend('<i class="fa fa-fw fa-user"></i> ');
1022 $
("#navigation-slide > li > a#ppo0").prepend('<i class="fa fa-fw fa-users"></i> ');
1023 $
("#navigation-slide > li > a#repimg").prepend('<i class="fa fa-fw fa-area-chart"></i> ');
1024 $
("#navigation-slide > li > a#feeimg").prepend('<i class="fa fa-fw fa-dollar"></i> ');
1025 $
("#navigation-slide > li > a#adm0").prepend('<i class="fa fa-fw fa-list-ol"></i> ');
1026 $
("#navigation-slide > li > a#invimg").prepend('<i class="fa fa-fw fa-list-ol"></i> ');
1027 $
("#navigation-slide > li > a#admimg").prepend('<i class="fa fa-fw fa-cogs"></i> ');
1028 $
("#navigation-slide > li > a#misimg").prepend('<i class="fa fa-fw fa-cog"></i> ');
1029 $
("#navigation-slide > li > a#proimg").prepend('<i class="fa fa-fw fa-stethoscope"></i> ');
1030 $
("#navigation-slide > li > a#modimg").prepend('<i class="fa fa-fw fa-puzzle-piece"></i> ');
1031 $
("#navigation-slide > li").each(function(index
) {
1032 if($
(" > ul > li", this
).size() == 0){
1033 $
(" > a", this
).addClass("collapsed");
1036 } else { // $GLOBALS['menu_styling_vertical'] == 0
1038 //Remove the links (used by the sliding menu) that will break treeview
1039 $
('a.collapsed').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1040 $
('a.collapsed_lv2').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1041 $
('a.expanded').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1042 $
('a.expanded_lv2').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1044 // Initiate treeview
1045 $
("#navigation").treeview({
1049 toggle
: function() {
1050 window
.console
&& console
.log("%o was toggled", this
);
1060 <body
class="body_nav main-left">
1062 <form method
='post' name
='find_patient' target
='RTop'
1063 action
='<?php echo $rootdir ?>/main/finder/patient_select.php'>
1066 <select name
='sel_frame' style
='background-color:transparent;font-size:9pt;width:100;'>
1067 <option value
='0'><?php
xl('Default','e'); ?
></option
>
1068 <option value
='1'><?php
xl('Top','e'); ?
></option
>
1069 <option value
='2'><?php
xl('Bottom','e'); ?
></option
>
1073 <table cellpadding
='0' cellspacing
='0' border
='0' width
='100%'>
1075 <td
class='smalltext' nowrap
>
1076 <input type
='checkbox' name
='cb_top' onclick
='toggleFrame(1)' <?php
echo $cb_top_chk ?
> />
1077 <b
><?php
xl('Top','e') ?
></b
>
1079 <td
class='smalltext' align
='right' nowrap
>
1080 <b
><?php
xl('Bot','e') ?
></b
>
1081 <input type
='checkbox' name
='cb_bot' onclick
='toggleFrame(2)' <?php
echo $cb_bot_chk ?
> />
1086 <?php
if ( $GLOBALS['menu_styling_vertical'] == 1) { ?
>
1087 <ul id
="navigation-slide">
1088 <?php
} else { // ($GLOBALS['menu_styling_vertical'] == 0) ?>
1089 <ul id
="navigation">
1093 if (!$GLOBALS['disable_calendar'] && acl_check('patients', 'appt')) {
1094 genTreeLink('RTop','cal',xl('Calendar'));
1096 if (!$GLOBALS['disable_pat_trkr'] && !$GLOBALS['disable_calendar'] && acl_check('patients', 'appt')) {
1097 genTreeLink('RTop','pfb',xl('Flow Board'));
1099 if (acl_check('patients', 'notes')) {
1100 genTreeLink('RBot','msg',xl('Messages'));
1102 if($GLOBALS['portal_offsite_enable'] && $GLOBALS['portal_offsite_address'] && acl_check('patientportal','portal')) {
1103 genTreeLink('RTop','app',xl('Portal Activity'));
1105 if($GLOBALS['portal_onsite_two_enable'] && acl_check('patientportal','portal')) {
1106 genTreeLink('RTop','aop',xl('Portal Dashboard'));
1108 if ($GLOBALS['gbl_portal_cms_enable'] && acl_check('patientportal','portal')) {
1109 genPopLink(xl('CMS Portal'),'../cmsportal/list_requests.php','ppo0');
1113 <li
class="open"><a
class="expanded" id
="patimg" ><i
class="fa fa-fw fa-user"></i
> 
;<span
><?php
xl('Patient/Client','e') ?
></span
></a
>
1115 <?php
if (acl_check('patients','demo'))
1116 genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?
>
1117 <?php
if (acl_check('patients','demo', '', 'write') ||
acl_check('patients','demo', '', 'addonly'))
1118 genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ?
xl('New/Search') : xl('New'))); ?
>
1119 <?php
if (acl_check('patients','demo'))
1120 genTreeLink('RTop','dem',xl('Summary')); ?
>
1122 <?php
if (acl_check('patients','appt') ||
acl_check_form('newpatient', '', array('write', 'addonly'))) { ?
>
1123 <li
class="open"><a
class="expanded_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1125 <?php
if (acl_check_form('newpatient', '', array('write', 'addonly')))
1126 genTreeLink('RBot','nen',xl('Create Visit')); ?
>
1127 <?php
if (acl_check('patients','appt'))
1128 genTreeLink('RBot','enc',xl('Current')); ?
>
1129 <?php
if (acl_check('patients','appt'))
1130 genTreeLink('RBot','ens',xl('Visit History')); ?
>
1135 <?php
if (acl_check('patients','med')) { ?
>
1136 <li
><a
class="collapsed_lv2"><span
><?php
xl('Records','e') ?
></span
></a
>
1138 <?php
genTreeLink('RTop','prq',xl('Patient Record Request')); ?
>
1143 <?php
if ($GLOBALS['gbl_nav_visit_forms'] && acl_check('patients','demo')) { ?
>
1144 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visit Forms','e') ?
></span
></a
>
1147 // Generate the items for visit forms, both traditional and LBF.
1149 $lres = sqlStatement("SELECT * FROM list_options " .
1150 "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title");
1151 while ($lrow = sqlFetchArray($lres)) {
1152 $option_id = $lrow['option_id']; // should start with LBF
1153 $title = $lrow['title'];
1154 // Check ACO attribute, if any, of this LBF.
1155 $jobj = json_decode($lrow['notes'], true);
1156 if (!empty($jobj['aco'])) {
1157 $tmp = explode('|', $jobj['aco']);
1158 if (!acl_check($tmp[0], $tmp[1], '', 'write')) continue;
1160 genMiscLink('RBot','cod','2',xl_form_title($title),
1161 "patient_file/encounter/load_form.php?formname=$option_id");
1164 include_once("$srcdir/registry.inc");
1165 $reg = getRegistered();
1167 foreach ($reg as $entry) {
1168 $option_id = $entry['directory'];
1169 $title = trim($entry['nickname']);
1170 if ($option_id == 'fee_sheet' ) continue;
1171 if ($option_id == 'newpatient') continue;
1172 // Check permission to create forms of this type.
1173 $tmp = explode('|', $entry['aco_spec']);
1174 if (!empty($tmp[1])) {
1175 if (!acl_check($tmp[0], $tmp[1], '', 'write') && !acl_check($tmp[0], $tmp[1], '', 'addonly'))
1178 if (empty($title)) $title = $entry['name'];
1179 genMiscLink('RBot','cod','2',xl_form_title($title),
1180 "patient_file/encounter/load_form.php?formname=" .
1181 urlencode($option_id));
1187 <li
class="collapsed" ><a
class="collapsed_lv2"><span
><?php
echo xlt('Import') ?
></span
></a
>
1189 <?php
genMiscLink('RTop','ccr','0',xlt('Upload'),'patient_file/ccr_import.php'); ?
>
1190 <?php
genMiscLink('RTop','apr','0',xlt('Pending Approval'),'patient_file/ccr_pending_approval.php'); ?
>
1193 <?php
} // end if gbl_nav_visit_forms ?>
1198 <?php
if ($GLOBALS['enable_group_therapy']) : ?
>
1199 <li
><a
class="collapsed" id
="groupimg" ><i
class="fa fa-fw fa-users"></i
> 
;<span
><?php
xl('Group','e') ?
></span
></a
>
1201 <?php
genMiscLink('RTop','gfn','0',xl('Groups'),'therapy_groups/index.php?method=listGroups'); ?
>
1202 <?php
genTreeLink('RTop','gng', xl('New')); ?
>
1203 <?php
genTreeLink('RTop','gdg',xl('Group Details')); ?
>
1204 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1206 <?php
genTreeLink('RBot','gcv',xl('Create Visit')); ?
>
1207 <?php
genTreeLink('RBot','gce',xl('Current')); ?
>
1208 <?php
genTreeLink('RBot','gvh',xl('Visit History')); ?
>
1216 <?php
// TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1217 <?php
if((!isset($GLOBALS['enable_fees_in_left_menu']) ||
$GLOBALS['enable_fees_in_left_menu'] == 1) &&
1218 (acl_check('encounters','coding') ||
acl_check('acct', 'eob') ||
acl_check('acct','bill','','write'))) { ?
>
1219 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('Fees','e') ?
></span
></a
>
1221 <?php
if (acl_check('encounters','coding'))
1222 genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?
>
1223 <?php
if ($GLOBALS['use_charges_panel'] && acl_check('encounters','coding'))
1224 genTreeLink('RBot','cod', xl('Charges')); ?
>
1225 <?php
if (acl_check('acct','bill','','write'))
1226 genMiscLink('RBot','pay','1',xl('Payment'),'patient_file/front_payment.php'); ?
>
1227 <?php
if (acl_check('acct','bill','','write'))
1228 genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?
>
1229 <?php
if (!$GLOBALS['simplified_demographics'] && (acl_check('acct','bill','','write') ||
acl_check('acct','eob','','write')))
1230 genTreeLink('RTop','bil',xl('Billing')); ?
>
1231 <?php
if ($GLOBALS['enable_batch_payment'] && (acl_check('acct','bill','','write') ||
acl_check('acct','eob','','write')))
1232 genTreeLink('RTop','npa',xl('Batch Payments'),false,2);?
>
1233 <?php
if ($GLOBALS['enable_posting'] && acl_check('acct','eob','','write'))
1234 genMiscLink('RTop','eob','0',xl('Posting'), 'billing/sl_eob_search.php'); ?
>
1235 <?php
if ($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob'))
1236 genTreeLink('RTop','edi',xl('EDI History'),false,2);?
>
1241 <?php
if (acl_check('menus', 'modle')) {?
>
1242 <li
><a
class="collapsed" id
="modimg" ><span
><?php
echo xlt('Modules') ?
></span
></a
>
1244 <?php
genMiscLink('RTop','adm','0',xl('Manage Modules'),'modules/zend_modules/public/Installer'); ?
>
1245 <?php
//genTreeLink('RTop','ort',xl('Settings')); ?>
1247 $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");
1248 if (sqlNumRows($module_query)) {
1249 while ($modulerow = sqlFetchArray($module_query)) {
1250 $acl_section = strtolower($modulerow['mod_directory']);
1251 $disallowed[$acl_section] = zh_acl_check($_SESSION['authUserID'],$acl_section) ?
"" : "1";
1254 if($modulerow['type'] == 0) {
1255 $modulePath = $GLOBALS['customModDir'];
1260 $modulePath = $GLOBALS['zendModDir'];
1263 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$added;
1264 $mod_nick_name = $modulerow['mod_nick_name'] ?
$modulerow['mod_nick_name'] : $modulerow['mod_name'];
1266 <?php
genMiscLink2('RTop',$acl_section,'0',xlt($mod_nick_name),$relative_link);?
>
1273 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?
>
1274 <li
><a
class="collapsed" id
="invimg" ><span
><?php
xl('Inventory','e') ?
></span
></a
>
1276 <?php
genMiscLink('RTop','adm','0',xl('Management'),'drugs/drug_inventory.php'); ?
>
1277 <?php
genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?
>
1282 <?php
if (acl_check('patients', 'lab')) { ?
>
1283 <li
><a
class="collapsed" id
="proimg" ><span
><?php
xl('Procedures','e') ?
></span
></a
>
1285 <?php
if (acl_check('admin', 'super')) genTreeLink('RTop','orl',xl('Providers')); ?
>
1286 <?php
if (acl_check('admin', 'super')) genTreeLink('RTop','ort',xl('Configuration')); ?
>
1287 <?php
if (acl_check('admin', 'super')) genTreeLink('RTop','orc',xl('Load Compendium')); ?
>
1288 <?php
genTreeLink('RTop','orp',xl('Pending Review')); ?
>
1289 <?php
genTreeLink('RTop','orr',xl('Patient Results')); ?
>
1290 <?php
genTreeLink('RTop','lda',xl('Lab Overview')); ?
>
1291 <?php
genTreeLink('RTop','orb',xl('Batch Results')); ?
>
1292 <?php
genTreeLink('RTop','ore',xl('Electronic Reports')); ?
>
1293 <?php
genTreeLink('RTop','dld',xl('Lab Documents'));?
>
1299 if($GLOBALS['erx_enable'] && acl_check('patients', 'rx')) {
1300 $newcrop_user_role = sqlQuery("SELECT newcrop_user_role FROM users WHERE username = '".$_SESSION['authUser']."'");
1301 if($newcrop_user_role['newcrop_user_role']) {
1303 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('New Crop','e') ?
></span
></a
>
1305 <li
><a
class="collapsed_lv2"><span
><?php
xl('Status','e') ?
></span
></a
>
1307 <?php
genTreeLink('RTop','erx',xl('e-Rx')); ?
>
1308 <?php
genMiscLink('RTop','err','0',xl('e-Rx Renewal'),'eRx.php?page=status'); ?
>
1309 <?php
if($newcrop_user_role['newcrop_user_role'] === 'erxadmin') genMiscLink('RTop','ere','0',xl('e-Rx EPCS'),'eRx.php?page=epcs-admin'); ?
>
1319 <?php
if (!$disallowed['adm']) { ?
>
1320 <li
><a
class="collapsed" id
="admimg" ><span
><?php
xl('Administration','e') ?
></span
></a
>
1322 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?
>
1323 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?
>
1324 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?
>
1325 <?php
if (acl_check('admin', 'practice' )) genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1327 // Changed the target URL from practice settings -> Practice Settings - Pharmacy... Dec 09,09 .. Visolve ... This replaces empty frame with Pharmacy window
1328 if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings&pharmacy&action=list'); ?
>
1329 <?php
if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?
>
1330 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?
>
1331 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?
>
1332 <?php
if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?
>
1333 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?
>
1334 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?
>
1335 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Rules'),'super/rules/index.php?action=browse!list'); ?
>
1336 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Alerts'),'super/rules/index.php?action=alerts!listactmgr'); ?
>
1337 <?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='); ?
>
1338 <?php
if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?
>
1339 <?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'); ?
>
1340 <?php
if (acl_check('admin', 'super') && !empty($GLOBALS['code_types']['IPPF'])) genMiscLink('RTop','adm','0',xl('Export'),'main/ippf_export.php'); ?
>
1341 <li
><a
class="collapsed_lv2"><span
><?php
xl('Other','e') ?
></span
></a
>
1343 <?php
if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?
>
1344 <?php
if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?
>
1345 <?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'); ?
>
1346 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?
>
1348 if($newcrop_user_role['newcrop_user_role'] ||
$GLOBALS['erx_enable']) {
1349 if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('eRx Logs'),'logview/erx_logview.php');
1352 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?
>
1353 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Native Data Loads'),'../interface/super/load_codes.php'); ?
>
1354 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('External Data Loads'),'../interface/code_systems/dataloads_ajax.php'); ?
>
1355 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Merge Patients'),'patient_file/merge_patients.php'); ?
>
1356 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Import Holidays'),'../interface/main/holidays/import_holidays.php'); ?
>
1357 <?php
if ($GLOBALS['enable_auditlog_encryption']) genMiscLink('RTop','rep','0',xl('Audit Log Tamper'),'reports/audit_log_tamper_report.php'); ?
>
1364 <li
><a
class="collapsed" id
="repimg" ><span
><?php
xl('Reports','e') ?
></span
></a
>
1367 $module_query = sqlStatement("SELECT msh.*,ms.obj_name,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
1368 obj_name=enabled_hooks AND ms.mod_id=msh.mod_id LEFT OUTER JOIN modules AS m ON m.mod_id=ms.mod_id
1369 WHERE fld_type=3 AND mod_active=1 AND sql_run=1 AND attached_to='reports' ORDER BY mod_id");
1370 if (sqlNumRows($module_query)) {
1373 while ($modulerow = sqlFetchArray($module_query)) {
1376 if($modulerow['type'] == 0) {
1377 $modulePath = $GLOBALS['customModDir'];
1382 $modulePath = $GLOBALS['zendModDir'];
1384 $disallowed[$modulerow['obj_name']] = !$disallowed['adm'] ||
zh_acl_check($_SESSION['authUserID'],$modulerow['obj_name']) ?
"" : "1";
1386 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$modulerow['path'];
1387 $mod_nick_name = $modulerow['menu_name'] ?
$modulerow['menu_name'] : 'NoName';
1389 if($jid==0 ||
($modid!=$modulerow['mod_id'])){
1393 <li
><a
class="collapsed_lv2"><span
><?php
echo xlt($modulerow['mod_ui_name']); ?
></span
></a
>
1398 $modid = $modulerow['mod_id'];
1399 genMiscLink('RTop',$modulerow['obj_name'],'0',xlt($mod_nick_name),$relative_link);
1404 <?php
if (acl_check('patients', 'demo') ||
acl_check('patients', 'med') ||
1405 (acl_check('patients', 'rx') && !$GLOBALS['disable_prescriptions'])) { ?
>
1406 <li
><a
class="collapsed_lv2"><span
><?php
xl('Clients','e') ?
></span
></a
>
1408 <?php
if (acl_check('patients', 'demo'))
1409 genMiscLink('RTop','rep','0',xl('List'),'reports/patient_list.php'); ?
>
1410 <?php
if (acl_check('patients', 'rx') && !$GLOBALS['disable_prescriptions'])
1411 genMiscLink('RTop','rep','0',xl('Rx'),'reports/prescriptions_report.php'); ?
>
1412 <?php
if (acl_check('patients', 'med'))
1413 genMiscLink('RTop','rep','0',xl('Patient List Creation'),'reports/patient_list_creation.php'); ?
>
1414 <?php
if (acl_check('patients', 'med'))
1415 genMiscLink('RTop','rep','0',xl('Clinical'),'reports/clinical_reports.php'); ?
>
1416 <?php
if (acl_check('patients', 'med'))
1417 genMiscLink('RTop','rep','0',xl('Referrals'),'reports/referrals_report.php'); ?
>
1418 <?php
if (acl_check('patients', 'med'))
1419 genMiscLink('RTop','rep','0',xl('Immunization Registry'),'reports/immunization_report.php'); ?
>
1424 <?php
if (acl_check('patients', 'med')) { ?
>
1425 <li
><a
class="collapsed_lv2"><span
><?php
xl('Clinic','e') ?
></span
></a
>
1427 <?php
if (($GLOBALS['enable_cdr'] ||
$GLOBALS['enable_cqm'] ||
$GLOBALS['enable_amc']) && acl_check('patients', 'med'))
1428 genMiscLink('RTop','rep','0',xl('Report Results'),'reports/report_results.php'); ?
>
1429 <?php
if ($GLOBALS['enable_cdr'] && acl_check('patients', 'med'))
1430 genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?
>
1431 <?php
if ($GLOBALS['enable_cqm'] && acl_check('patients', 'med'))
1432 genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?
>
1433 <?php
if ($GLOBALS['enable_amc'] && acl_check('patients', 'med'))
1434 genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?
>
1435 <?php
if ($GLOBALS['enable_amc_tracking'] && acl_check('patients', 'med'))
1436 genMiscLink('RTop','rep','0',xl('AMC Tracking'),'reports/amc_tracking.php'); ?
>
1437 <?php
if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_alert_log'] && acl_check('patients', 'med'))
1438 genMiscLink('RTop','rep','0',xl('Alerts Log'),'reports/cdr_log.php'); ?
>
1443 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1445 <?php
if (acl_check('acct', 'rep_a'))
1446 genMiscLink('RTop','rep','0',xl('Daily Report'),'reports/daily_summary_report.php'); ?
>
1447 <?php
if (!$GLOBALS['disable_calendar'] && acl_check('patients', 'appt'))
1448 genMiscLink('RTop','rep','0',xl('Appointments'),'reports/appointments_report.php'); ?
>
1449 <?php
if (!$GLOBALS['disable_pat_trkr'] && !$GLOBALS['disable_calendar'] && acl_check('patients', 'appt'))
1450 genMiscLink('RTop','rep','0',xl('Patient Flow Board'),'reports/patient_flow_board_report.php'); ?
>
1451 <?php
if (acl_check('encounters', 'coding_a'))
1452 genMiscLink('RTop','rep','0',xl('Encounters'),'reports/encounters_report.php'); ?
>
1453 <?php
if (!$GLOBALS['disable_calendar'] && acl_check('acct', 'rep_a'))
1454 genMiscLink('RTop','rep','0',xl('Appt-Enc'),'reports/appt_encounter_report.php'); ?
>
1455 <?php
if (empty($GLOBALS['code_types']['IPPF']) && acl_check('encounters', 'coding_a'))
1456 genMiscLink('RTop','rep','0',xl('Superbill'),'reports/custom_report_range.php'); ?
>
1457 <?php
if (acl_check('patients', 'demo'))
1458 genMiscLink('RTop','rep','0',xl('Eligibility'),'reports/edi_270.php'); ?
>
1459 <?php
if (acl_check('patients', 'demo'))
1460 genMiscLink('RTop','rep','0',xl('Eligibility Response'),'reports/edi_271.php'); ?
>
1461 <?php
if (!$GLOBALS['disable_chart_tracker'] && acl_check('patients', 'appt'))
1462 genMiscLink('RTop','rep','0',xl('Chart Activity'),'reports/chart_location_activity.php'); ?
>
1463 <?php
if (!$GLOBALS['disable_chart_tracker'] && acl_check('patients', 'appt'))
1464 genMiscLink('RTop','rep','0',xl('Charts Out'),'reports/charts_checked_out.php'); ?
>
1465 <?php
genMiscLink('RTop','rep','0',xl('Services'), 'reports/services_by_category.php'); ?
>
1466 <?php
if (acl_check('patients', 'med'))
1467 genMiscLink('RTop','rep','0',xl('Syndromic Surveillance'),'reports/non_reported.php'); ?
>
1471 <?php
if (acl_check('acct', 'rep_a')) { ?
>
1472 <li
><a
class="collapsed_lv2"><span
><?php
xl('Financial','e') ?
></span
></a
>
1474 <?php
genMiscLink('RTop','rep','0',xl('Sales'),'reports/sales_by_item.php'); ?
>
1475 <?php
genMiscLink('RTop','rep','0',xl('Cash Rec'), 'billing/sl_receipts_report.php'); ?
>
1476 <?php
genMiscLink('RTop','rep','0',xl('Front Rec'), 'reports/front_receipts_report.php'); ?
>
1477 <?php
genMiscLink('RTop','rep','0',xl('Pmt Method'), 'reports/receipts_by_method_report.php'); ?
>
1478 <?php
genMiscLink('RTop','rep','0',xl('Collections'), 'reports/collections_report.php'); ?
>
1479 <?php
genMiscLink('RTop','rep','0',xl('Pat Ledger'),'reports/pat_ledger.php?form=0'); ?
>
1480 <?php
genMiscLink('RTop','rep','0',xl('Financial Summary by Service Code'),'reports/svc_code_financial_report.php'); ?
>
1485 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?
>
1486 <li
><a
class="collapsed_lv2"><span
><?php
xl('Inventory','e') ?
></span
></a
>
1488 <?php
genMiscLink('RTop','rep','0',xl('List'),'reports/inventory_list.php'); ?
>
1489 <?php
genMiscLink('RTop','rep','0',xl('Activity'),'reports/inventory_activity.php'); ?
>
1490 <?php
genMiscLink('RTop','rep','0',xl('Transactions'),'reports/inventory_transactions.php'); ?
>
1495 <?php
if (acl_check('patients', 'lab')) { ?
>
1496 <li
><a
class="collapsed_lv2"><span
><?php
xl('Procedures','e') ?
></span
></a
>
1498 <?php
genPopLink(xl('Pending Res'),'../orders/pending_orders.php'); ?
>
1499 <?php
if (!empty($GLOBALS['code_types']['IPPF'])) genPopLink(xl('Pending F/U'),'../orders/pending_followup.php'); ?
>
1500 <?php
genPopLink(xl('Statistics'),'../orders/procedure_stats.php'); ?
>
1505 <?php
if (!$GLOBALS['simplified_demographics'] && (acl_check('acct', 'rep_a') ||
acl_check('patients', 'demo'))) { ?
>
1506 <li
><a
class="collapsed_lv2"><span
><?php
xl('Insurance','e') ?
></span
></a
>
1508 <?php
if (acl_check('acct', 'rep_a'))
1509 genMiscLink('RTop','rep','0',xl('Distribution'),'reports/insurance_allocation_report.php'); ?
>
1510 <?php
if (acl_check('acct', 'rep_a'))
1511 genMiscLink('RTop','rep','0',xl('Indigents'),'billing/indigent_patients_report.php'); ?
>
1512 <?php
if (acl_check('patients', 'demo'))
1513 genMiscLink('RTop','rep','0',xl('Unique SP'),'reports/unique_seen_patients_report.php'); ?
>
1518 <?php
if (!empty($GLOBALS['code_types']['IPPF']) && acl_check('acct', 'rep_a')) { ?
>
1519 <li
><a
class="collapsed_lv2"><span
><?php
xl('Statistics','e') ?
></span
></a
>
1521 <?php
genPopLink(xl('IPPF Stats'),'ippf_statistics.php?t=i'); ?
>
1522 <?php
genPopLink(xl('GCAC Stats'),'ippf_statistics.php?t=g'); ?
>
1523 <?php
genPopLink(xl('MA Stats'),'ippf_statistics.php?t=m'); ?
>
1524 <?php
genPopLink(xl('CYP'),'ippf_cyp_report.php'); ?
>
1525 <?php
genPopLink(xl('Daily Record'),'ippf_daily.php'); ?
>
1528 <?php
} // end ippf-specific ?>
1530 <li
><a
class="collapsed_lv2"><span
><?php
xl('Blank Forms','e') ?
></span
></a
>
1532 <?php
genPopLink(xl('Demographics'),'../patient_file/summary/demographics_print.php'); ?
>
1533 <?php
genPopLink(xl('Superbill/Fee Sheet'),'../patient_file/printed_fee_sheet.php'); ?
>
1534 <?php
genPopLink(xl('Referral'),'../patient_file/transaction/print_referral.php'); ?
>
1536 $lres = sqlStatement("SELECT * FROM list_options " .
1537 "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title");
1538 while ($lrow = sqlFetchArray($lres)) {
1539 $option_id = $lrow['option_id']; // should start with LBF
1540 $title = $lrow['title'];
1541 // Check ACO attribute, if any, of this LBF.
1542 $jobj = json_decode($lrow['notes'], true);
1543 if (!empty($jobj['aco'])) {
1544 $tmp = explode('|', $jobj['aco']);
1545 if (!acl_check($tmp[0], $tmp[1])) continue;
1547 genPopLink($title, "../forms/LBF/printable.php?formname=$option_id");
1553 <?php
if (acl_check('admin','batchcom')) { ?
>
1554 <li
><a
class="collapsed_lv2"><span
><?php
echo xlt('Services') ?
></span
></a
>
1556 <?php
genMiscLink('RTop','rep','0',xl('Background Services'),'reports/background_services.php'); ?
>
1557 <?php
genMiscLink('RTop','rep','0',xl('Direct Message Log'),'reports/direct_message_log.php'); ?
>
1565 <li
><a
class="collapsed" id
="misimg" ><span
><?php
xl('Miscellaneous','e') ?
></span
></a
>
1567 <?php
genTreeLink('RTop','ped',xl('Patient Education')); ?
>
1568 <?php
if (acl_check('encounters','auth'))
1569 genTreeLink('RBot','aun',xl('Authorizations')); ?
>
1570 <?php
if (acl_check('patients','docs'))
1571 genTreeLink('RTop','fax',xl('Fax/Scan')); ?
>
1572 <?php
if (acl_check('admin','practice'))
1573 genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1574 <?php
if (acl_check('admin','practice'))
1575 genTreeLink('RTop','ort',xl('Order Catalog')); ?
>
1576 <?php
if (!$GLOBALS['disable_chart_tracker'] && acl_check('patients','appt'))
1577 genTreeLink('RTop','cht',xl('Chart Tracker')); ?
>
1578 <?php
if (acl_check('encounters','notes'))
1579 genTreeLink('RTop','ono',xl('Ofc Notes')); ?
>
1580 <?php
if (acl_check('admin','batchcom') ||
acl_check('admin','practice'))
1581 genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?
>
1582 <?php
$myrow = sqlQuery("SELECT state FROM registry WHERE directory = 'track_anything'");
1583 if($myrow['state']=='1') { genTreeLink('RTop','tan',xl('Configure Tracks')); } ?
>
1584 <?php
if(!$GLOBALS['use_active_directory']) { genTreeLink('RTop','pwd',xl('Password')); } ?
>
1585 <?php
genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?
>
1586 <?php
if(acl_check('patients','docs','','write') ||
acl_check('patients','docs','','addonly'))
1587 genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=00'); ?
>
1588 <?php
if (acl_check('admin','practice'))
1589 genMiscLink('RTop','adm','0',xl('Document Templates'),'super/manage_document_templates.php'); ?
>
1597 <div id
='current_patient' style
= 'display:none'>
1598 <b
><?php
xl('None','e'); ?
></b
>
1601 <div id
='current_encounter' style
= 'display:none'>
1602 <b
><?php
xl('None','e'); ?
></b
>
1611 <input type
='hidden' name
='findBy' value
='Last' />
1612 <input type
="hidden" name
="searchFields" id
="searchFields"/>
1613 <input type
="hidden" name
="search_service_code" value
='' />
1617 <script language
='JavaScript'>
1620 function save_setting (cb_frames
) {
1621 for (var i
= 0, len
= cb_frames
.length
; i
< len
; i++
) {
1623 var fref
= '<?php echo $uspfx ?>frame' + i +
'_chk';
1624 var ureq
= $
.post( "<?php echo $GLOBALS['webroot'] ?>/library/ajax/user_settings.php",
1625 { lab
: fref
, val
: cb_frames
[i
] })
1626 .done(function(data
) {
1627 // alert( "Data Loaded: " + data );
1629 .fail(function(xhr
, textStatus
, errorThrown
) {
1630 alert("Error:"+xhr
.responseText+
"\n"+textStatus+
"\n"+errorThrown
);
1632 .always(function() {
1633 // alert( "finished" );
1637 alert (err
.message
);