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 when $GLOBALS['concurrent_layout']
12 // is true. 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() and setRadio() functions.
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';
95 // This array defines the list of primary documents that may be
96 // chosen. Each element value is an array of 3 values:
98 // * Name to appear in the navigation table
99 // * Usage: 0 = global, 1 = patient-specific, 2 = encounter-specific
100 // * The URL relative to the interface directory
103 $primary_docs = array(
104 'ros' => array(xl('Roster') , 0, 'reports/players_report.php?embed=1'),
105 'cal' => array(xl('Calendar') , 0, 'main/main_info.php'),
106 'app' => array(xl('Portal Activity') , 0, '../myportal/index.php'),
107 'msg' => array(xl('Messages') , 0, 'main/messages/messages.php?form_active=1'),
108 'pwd' => array(xl('Password') , 0, 'usergroup/user_info.php'),
109 'prf' => array(xl('Preferences') , 0, 'super/edit_globals.php?mode=user'),
110 'adm' => array(xl('Admin') , 0, 'usergroup/admin_frameset.php'),
111 'rep' => array(xl('Reports') , 0, 'reports/index.php'),
112 'ono' => array(xl('Ofc Notes') , 0, 'main/onotes/office_comments.php'),
113 'fax' => array(xl('Fax/Scan') , 0, 'fax/faxq.php'),
114 'adb' => array(xl('Addr Bk') , 0, 'usergroup/addrbook_list.php'),
115 'orl' => array(xl('Proc Prov') , 0, 'orders/procedure_provider_list.php'),
116 'ort' => array(xl('Proc Cat') , 0, 'orders/types.php'),
117 'orc' => array(xl('Proc Load') , 0, 'orders/load_compendium.php'),
118 'orb' => array(xl('Proc Bat') , 0, 'orders/orders_results.php?batch=1'),
119 'ore' => array(xl('E-Reports') , 0, 'orders/list_reports.php'),
120 'ppo' => array(xl('CMS Portal'), 0, 'cmsportal/list_requests.php'),
121 'cht' => array(xl('Chart Trk') , 0, '../custom/chart_tracker.php'),
122 'imp' => array(xl('Import') , 0, '../custom/import.php'),
123 'bil' => array(xl('Billing') , 0, 'billing/billing_report.php'),
124 'sup' => array(xl('Superbill') , 0, 'patient_file/encounter/superbill_custom_full.php'),
125 'aun' => array(xl('Authorizations'), 0, 'main/authorizations/authorizations.php'),
126 'new' => array(xl('New Pt') , 0, 'new/new.php'),
127 'ped' => array(xl('Patient Education'), 0, 'reports/patient_edu_web_lookup.php'),
128 'lab' => array(xl('Check Lab Results') , 0, 'orders/lab_exchange.php'),
129 'dem' => array(xl('Patient') , 1, "patient_file/summary/demographics.php"),
130 'his' => array(xl('History') , 1, 'patient_file/history/history.php'),
131 'ens' => array(xl('Visit History'), 1, 'patient_file/history/encounters.php'),
132 'nen' => array(xl('Create Visit'), 1, 'forms/newpatient/new.php?autoloaded=1&calenc='),
133 'pre' => array(xl('Rx') , 1, 'patient_file/summary/rx_frameset.php'),
134 'iss' => array(xl('Issues') , 1, 'patient_file/summary/stats_full.php?active=all'),
135 'imm' => array(xl('Immunize') , 1, 'patient_file/summary/immunizations.php'),
136 'doc' => array(xl('Documents') , 1, '../controller.php?document&list&patient_id={PID}'),
137 'orp' => array(xl('Proc Pending Rev'), 1, 'orders/orders_results.php?review=1'),
138 'orr' => array(xl('Proc Res') , 1, 'orders/orders_results.php'),
139 'lda' => array(xl('Lab overview') , 1, 'patient_file/summary/labdata.php'),
140 'tan' => array(xl('Configure Tracks') , 0, 'forms/track_anything/create.php'),
141 'prp' => array(xl('Pt Report') , 1, 'patient_file/report/patient_report.php'),
142 'prq' => array(xl('Pt Rec Request') , 1, 'patient_file/transaction/record_request.php'),
143 'pno' => array(xl('Pt Notes') , 1, 'patient_file/summary/pnotes.php'),
144 'tra' => array(xl('Transact') , 1, 'patient_file/transaction/transactions.php'),
145 'sum' => array(xl('Summary') , 1, 'patient_file/summary/summary_bottom.php'),
146 'enc' => array(xl('Encounter') , 2, 'patient_file/encounter/encounter_top.php'),
147 'erx' => array(xl('e-Rx') , 1, 'eRx.php'),
148 'err' => array(xl('e-Rx Renewal') , 1, 'eRx.php?page=status'),
149 'pay' => array(xl('Payment') , 1, '../patient_file/front_payment.php'),
150 'edi' => array(xl('EDI History') , 0, 'billing/edih_view.php'),
151 'dld' => array(xl('Display Documents'), 0, 'main/display_documents.php')
153 $primary_docs['npa']=array(xl('Batch Payments') , 0, 'billing/new_payment.php');
154 if ($GLOBALS['use_charges_panel'] ||
$GLOBALS['concurrent_layout'] == 2) {
155 $primary_docs['cod'] = array(xl('Charges'), 2, 'patient_file/encounter/encounter_bottom.php');
158 $esignApi = new Api();
159 // This section decides which navigation items will not appear.
161 $disallowed = array();
162 $disallowed['edi'] = !($GLOBALS['enable_edihistory_in_left_menu'] ||
acl_check('acct', 'eob'));
163 $disallowed['adm'] = !(acl_check('admin', 'calendar') ||
164 acl_check('admin', 'database') ||
acl_check('admin', 'forms') ||
165 acl_check('admin', 'practice') ||
acl_check('admin', 'users') ||
166 acl_check('admin', 'acl') ||
acl_check('admin', 'super') ||
167 acl_check('admin', 'superbill') ||
acl_check('admin', 'drugs'));
169 $disallowed['bil'] = !(acl_check('acct', 'rep') ||
acl_check('acct', 'eob') ||
170 acl_check('acct', 'bill'));
172 $disallowed['new'] = !(acl_check('patients','demo','',array('write','addonly') ));
174 $disallowed['fax'] = !($GLOBALS['enable_hylafax'] ||
$GLOBALS['enable_scanner']);
176 $disallowed['ros'] = !$GLOBALS['athletic_team'];
178 $disallowed['iss'] = !((acl_check('encounters','notes','','write') ||
179 acl_check('encounters','notes_a','','write') ) &&
180 acl_check('patients','med','','write') );
182 $disallowed['imp'] = $disallowed['new'] ||
183 !is_readable("$webserver_root/custom/import.php");
185 $disallowed['cht'] = !is_readable("$webserver_root/custom/chart_tracker.php");
187 $disallowed['pre'] = !(acl_check('patients', 'med'));
189 // Helper functions for treeview generation.
190 function genTreeLink($frame, $name, $title, $mono=false) {
191 global $primary_docs, $disallowed;
192 if (empty($disallowed[$name])) {
193 $id = $name . $primary_docs[$name][1];
194 echo "<li><a href='' id='$id' onclick=\"";
196 if ($frame == 'RTop')
197 echo "forceSpec(true,false);";
199 echo "forceSpec(false,true);";
201 echo "return loadFrame2('$id','$frame','" .
202 $primary_docs[$name][2] . "')\">" . $title . ($name == 'msg' ?
' <span id="reminderCountSpan" class="bold"></span>' : '')."</a></li>";
205 function genMiscLink($frame, $name, $level, $title, $url, $mono=false) {
207 if (empty($disallowed[$name])) {
208 $id = $name . $level;
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 $url . "')\">" . $title . "</a></li>";
220 function genMiscLink2($frame, $name, $level, $title, $url, $mono=false,$mouseovertext="") {
222 if (empty($disallowed[$name])) {
224 $id = $name . $level;
225 echo "<li><a href='' id='$id' title='$mouseovertext' onclick=\"";
227 if ($frame == 'RTop')
228 echo "forceSpec(true,false);";
230 echo "forceSpec(false,true);";
232 echo "return loadFrame3('$id','$frame','" .
233 $url . "')\">" . $title . "</a></li>";
236 function genPopLink($title, $url, $linkid='') {
237 echo "<li><a href='' ";
238 if ($linkid) echo "id='$linkid' ";
239 echo "onclick=\"return repPopup('$url')\"" .
240 ">" . $title . "</a></li>";
242 function genDualLink($topname, $botname, $title) {
243 global $primary_docs, $disallowed;
244 if (empty($disallowed[$topname]) && empty($disallowed[$botname])) {
245 $topid = $topname . $primary_docs[$topname][1];
246 $botid = $botname . $primary_docs[$botname][1];
247 echo "<li><a href='' id='$topid' " .
248 "onclick=\"return loadFrameDual('$topid','$botid','" .
249 $primary_docs[$topname][2] . "','" .
250 $primary_docs[$botname][2] . "')\">" . $title . "</a></li>";
254 function genPopupsList($style='') {
255 global $disallowed, $webserver_root;
257 <select name
='popups' onchange
='selpopup(this)' style
='background-color:transparent;font-size:9pt;<?php echo $style; ?>'>
258 <option value
=''><?php
xl('Popups','e'); ?
></option
>
259 <?php
if (!$disallowed['iss']) { ?
>
260 <option value
='../patient_file/problem_encounter.php'><?php
xl('Issues','e'); ?
></option
>
262 <?php
if (!$GLOBALS['ippf_specific']) { ?
>
263 <option value
='../../custom/export_xml.php'><?php
xl('Export','e'); ?
></option
>
264 <option value
='../../custom/import_xml.php'><?php
xl('Import','e'); ?
></option
>
266 <?php
if ($GLOBALS['athletic_team']) { ?
>
267 <option value
='../reports/players_report.php'><?php
xl('Roster','e'); ?
></option
>
269 if (!$GLOBALS['disable_calendar']) { ?
>
270 <option value
='../reports/appointments_report.php?patient=<?php if(isset($pid)) {echo $pid;} ?>'><?php
xl('Appts','e'); ?
></option
>
272 if (file_exists("$webserver_root/custom/refer.php")) { ?
>
273 <option value
='../../custom/refer.php'><?php
xl('Refer','e'); ?
></option
>
275 <option value
='../patient_file/printed_fee_sheet.php?fill=1'><?php
xl('Superbill','e'); ?
></option
>
276 <option value
='../patient_file/front_payment.php'><?php
xl('Payment','e'); ?
></option
>
277 <?php
if ($GLOBALS['inhouse_pharmacy']) { ?
>
278 <option value
='../patient_file/pos_checkout.php'><?php
xl('Checkout','e'); ?
></option
>
280 <?php
if (is_dir($GLOBALS['OE_SITE_DIR'] . "/letter_templates")) { ?
>
281 <option value
='../patient_file/letter.php'><?php
xl('Letter','e'); ?
></option
>
283 <?php
if ($GLOBALS['chart_label_type'] != '0') { ?
>
284 <option value
='../patient_file/label.php'><?php
xl('Chart Label','e'); ?
></option
>
286 <?php
if ($GLOBALS['barcode_label_type'] != '0') { ?
>
287 <option value
='../patient_file/barcode_label.php'><?php
xl('Barcode Label','e'); ?
></option
>
289 <?php
if ($GLOBALS['addr_label_type']) { ?
>
290 <option value
='../patient_file/addr_label.php'><?php
xl('Address Label','e'); ?
></option
>
296 function genFindBlock() {
298 <table cellpadding
='0' cellspacing
='0' border
='0'>
300 <td
class='smalltext'><?php
xl('Find','e') ?
>: 
;</td
>
301 <td
class='smalltext' colspan
='2'>
302 <input type
="entry" size
="7" name
="patient" class='inputtext' style
='width:65px;' />
306 <td
class='smalltext'><?php
xl('by','e') ?
>:</td
>
307 <td
class='smalltext'>
308 <a href
="javascript:findPatient('Last');" class="navitem"><?php
xl('Name','e'); ?
></a
>
310 <td
class='smalltext' align
='right'>
311 <a href
="javascript:findPatient('ID');" class="navitem"><?php
xl('ID','e'); ?
></a
>
315 <td
class='smalltext'> 
;</td
>
316 <td
class='smalltext'>
317 <a href
="javascript:findPatient('SSN');" class="navitem"><?php
xl('SSN','e'); ?
></a
>
319 <td
class='smalltext' align
='right'>
320 <a href
="javascript:findPatient('DOB');" class="navitem"><?php
xl('DOB','e'); ?
></a
>
324 <td
class='smalltext'> 
;</td
>
325 <td
class='smalltext'>
326 <a href
="javascript:findPatient('Any');" class="navitem"><?php
xl('Any', 'e'); ?
></a
>
328 <td
class='smalltext' align
='right'>
329 <a href
="javascript:initFilter();" class="navitem"><?php
xl('Filter', 'e'); ?
></a
>
334 } // End function genFindBlock()
339 <title
>Navigation
</title
>
340 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
342 <style type
="text/css">
346 padding
: 5px
3px
5px
3px
;
349 font
-family
:sans
-serif
;
353 a
.navitem
, a
.navitem
:visited
{
355 font
-family
:sans
-serif
;
366 border
-color
: #000000;
367 background
-color
:transparent
;
371 background
-color
:transparent
;
373 #navigation-slide ul {
374 background
-color
:transparent
;
384 vertical
-align
:middle
;
388 <link rel
="stylesheet" href
="../../library/js/jquery.treeview-1.4.1/jquery.treeview.css" />
389 <script src
="../../library/js/jquery-1.6.4.min.js" type
="text/javascript"></script
>
390 <script src
="../../library/js/jquery.treeview-1.4.1/jquery.treeview.js" type
="text/javascript"></script
>
392 <script type
="text/javascript" src
="../../library/dialog.js"></script
>
394 <script language
='JavaScript'>
396 // tajemo work by CB 2012/01/31 12:32:57 PM dated reminders counter
397 function getReminderCount(){
398 top
.restoreSession();
399 // Send the skip_timeout_reset parameter to not count this as a manual entry in the
400 // timing out mechanism in OpenEMR.
401 $
.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
402 { skip_timeout_reset
: "1" },
404 $
("#reminderCountSpan").html(data
);
405 // run updater every 60 seconds
406 var repeater
= setTimeout("getReminderCount()", 60000);
408 //piggy-back on this repeater to run other background-services
409 //this is a silent task manager that returns no output
410 $
.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/execute_background_services.php",
411 { skip_timeout_reset
: "1", ajax
: "1" });
414 $
(document
).ready(function (){
415 getReminderCount();//
416 parent
.loadedFrameCount +
= 1;
418 // end of tajemo work dated reminders counter
420 // Master values for current pid and encounter.
422 var active_encounter
= 0;
423 var encounter_locked
= false;
425 // Current selections in the top and bottom frames.
429 // Expand and/or collapse frames in response to checkbox clicks.
430 // fnum indicates which checkbox was clicked (1=left, 2=right).
431 function toggleFrame(fnum
) {
432 var f
= document
.forms
[0];
433 var fset
= top
.document
.getElementById('fsright');
434 if (!f
.cb_top
.checked
&& !f
.cb_bot
.checked
) {
435 if (fnum
== 1) f
.cb_bot
.checked
= true;
436 else f
.cb_top
.checked
= true;
438 var rows
= f
.cb_top
.checked ?
'*' : '0';
439 rows +
= f
.cb_bot
.checked ?
',*' : ',0';
444 // Load the specified url into the specified frame (RTop or RBot).
445 // The URL provided must be relative to interface.
446 function loadFrame(fname
, frame
, url
) {
447 top
.restoreSession();
448 var i
= url
.indexOf('{PID}');
449 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
450 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
451 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
454 // Load the specified url into a frame to be determined, with the specified
455 // frame as the default; the url must be relative to interface.
456 function loadFrame2(fname
, frame
, url
) {
457 var usage
= fname
.substring(3);
458 if (active_pid
== 0 && usage
> '0') {
459 alert('<?php xl('You must first select
or add a patient
.','e
') ?>');
462 if (active_encounter
== 0 && usage
> '1') {
463 alert('<?php xl('You must first select
or create an encounter
.','e
') ?>');
466 if (encounter_locked
&& usage
> '1') {
467 alert('<?php echo xls('This encounter is locked
. No
new forms can be added
.') ?>');
470 var f
= document
.forms
[0];
471 top
.restoreSession();
472 var i
= url
.indexOf('{PID}');
473 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
476 var fi
= f
.sel_frame
.selectedIndex
;
477 if (fi
== 1) frame
= 'RTop'; else if (fi
== 2) frame
= 'RBot';
479 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
480 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
481 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
485 function loadFrame3(fname
, frame
, url
) {
486 var f
= document
.forms
[0];
487 top
.restoreSession();
488 var i
= url
.indexOf('{PID}');
489 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
492 var fi
= f
.sel_frame
.selectedIndex
;
493 if (fi
== 1) frame
= 'RTop'; else if (fi
== 2) frame
= 'RBot';
495 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
496 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
497 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
501 // Make sure the the top and bottom frames are open or closed, as specified.
502 function forceSpec(istop
, isbot
) {
503 var f
= document
.forms
[0];
504 if (f
.cb_top
.checked
!= istop
) {
505 f
.cb_top
.checked
= istop
;
508 if (f
.cb_bot
.checked
!= isbot
) {
509 f
.cb_bot
.checked
= isbot
;
514 // Make sure both frames are open.
515 function forceDual() {
516 forceSpec(true, true);
519 // Load the specified url into a frame to be determined, with the specified
520 // frame as the default; the url must be relative to interface.
521 function loadFrameDual(tname
, bname
, topurl
, boturl
) {
522 var topusage
= tname
.substring(3);
523 var botusage
= bname
.substring(3);
524 if (active_pid
== 0 && (topusage
> '0' || botusage
> '0')) {
525 alert('<?php xl('You must first select
or add a patient
.','e
') ?>');
528 if (active_encounter
== 0 && (topusage
> '1' || botusage
> '1')) {
529 alert('<?php xl('You must first select
or create an encounter
.','e
') ?>');
532 if (encounter_locked
&& (topusage
> '1' || botusage
> '1')) {
533 alert('<?php echo xls('This encounter is locked
. No
new forms can be added
.') ?>');
536 var f
= document
.forms
[0];
538 top
.restoreSession();
539 var i
= topurl
.indexOf('{PID}');
540 if (i
>= 0) topurl
= topurl
.substring(0,i
) + active_pid + topurl
.substring(i+
5);
541 i
= boturl
.indexOf('{PID}');
542 if (i
>= 0) boturl
= boturl
.substring(0,i
) + active_pid + boturl
.substring(i+
5);
543 top
.frames
.RTop
.location
= '<?php echo "$web_root/interface/" ?>' + topurl
;
544 top
.frames
.RBot
.location
= '<?php echo "$web_root/interface/" ?>' + boturl
;
550 // Select a designated radio button. raname may be either the radio button
551 // array name (rb_top or rb_bot), or the frame name (RTop or RBot).
552 // You should call this if you directly load a document that does not
553 // correspond to the current radio button setting.
554 function setRadio(raname
, rbid
) {
555 <?php
if ($GLOBALS['concurrent_layout'] < 2) { ?
>
556 var f
= document
.forms
[0];
557 if (raname
== 'RTop') raname
= 'rb_top';
558 if (raname
== 'RBot') raname
= 'rb_bot';
559 for (var i
= 0; i
< f
[raname
].length
; ++i
) {
560 if (f
[raname
][i
].value
.substring(0,3) == rbid
) {
561 f
[raname
][i
].checked
= true;
569 // Set disabled/enabled state of radio buttons and associated labels
570 // depending on whether there is an active patient or encounter.
571 function syncRadios() {
572 var f
= document
.forms
[0];
573 encounter_locked
= isEncounterLocked(active_encounter
);
574 <?php
if (($GLOBALS['concurrent_layout'] == 2)||
($GLOBALS['concurrent_layout'] == 3)) { ?
>
575 var nlinks
= document
.links
.length
;
576 for (var i
= 0; i
< nlinks
; ++i
) {
577 var lnk
= document
.links
[i
];
578 if (lnk
.id
.length
!= 4) continue;
579 var usage
= lnk
.id
.substring(3);
580 if (usage
== '1' || usage
== '2') {
582 if (active_pid
== 0) da
= true;
583 if (active_encounter
== 0 && usage
> '1') da
= true;
584 if (encounter_locked
&& usage
> '1') da
= true;
586 if ($GLOBALS['concurrent_layout'] == 2){
587 $color = "'#0000ff'";
589 $color = "'#000000'";
592 lnk
.style
.color
= da ?
'#888888' : <?php
echo $color; ?
>;
595 <?php
} else if ($GLOBALS['concurrent_layout'] < 2) { ?
>
596 for (var i
= 0; i
< f
.rb_top
.length
; ++i
) {
598 var rb1
= f
.rb_top
[i
];
599 var rb2
= f
.rb_bot
[i
];
600 var rbid
= rb1
.value
.substring(0,3);
601 var usage
= rb1
.value
.substring(3);
602 if (active_pid
== 0 && usage
> '0') da
= true;
603 if (active_encounter
== 0 && usage
> '1') da
= true;
604 if (encounter_locked
&& usage
> '1') da
= true;
605 // daemon_frame can also set special label colors, so don't mess with
606 // them unless we have to.
607 if (rb1
.disabled
!= da
) {
610 document
.getElementById('lbl_' + rbid
).style
.color
= da ?
'#888888' : '#000000';
614 f
.popups
.disabled
= (active_pid
== 0);
618 top
.frames
['RTop'].location
='<?php echo $GLOBALS['default_top_pane
']?>';
619 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';
622 //Function to clear active patient and encounter in the server side
623 function clearactive() {
624 top
.restoreSession();
625 //Ajax call to clear active patient in session
628 url
: "<?php echo $GLOBALS['webroot'] ?>/library/ajax/unset_session_ajax.php",
629 data
: { func
: "unset_pid"},
630 success
:function( msg
) {
632 top
.frames
['RTop'].location
='<?php echo $GLOBALS['default_top_pane
']?>';
633 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';
637 $
(parent
.Title
.document
.getElementById('clear_active')).hide();
639 // Reference to the search.php window.
642 // Open the search.php window.
643 function initFilter() {
644 my_window
= window
.open("../../custom/search.php", "mywindow","status=1");
647 // This is called by the search.php (Filter) window.
648 function processFilter(fieldString
, serviceCode
) {
649 var f
= document
.forms
[0];
650 document
.getElementById('searchFields').value
= fieldString
;
651 f
.search_service_code
.value
= serviceCode
;
652 findPatient("Filter");
653 f
.search_service_code
.value
= '';
657 // Process the click to find a patient by name, id, ssn or dob.
658 function findPatient(findby
) {
659 var f
= document
.forms
[0];
660 if (! f
.cb_top
.checked
) {
661 f
.cb_top
.checked
= true;
664 f
.findBy
.value
= findby
;
665 setRadio('rb_top', 'dem');
666 top
.restoreSession();
667 document
.find_patient
.submit();
670 // Helper function to set the contents of a div.
671 function setSomeContent(id
, content
, doc
) {
672 if (doc
.getElementById
) {
673 var x
= doc
.getElementById(id
);
675 x
.innerHTML
= content
;
679 x
.innerHTML
= content
;
682 function setDivContent(id
, content
) {
683 setSomeContent(id
, content
, document
);
685 function setTitleContent(id
, content
) {
686 setSomeContent(id
, content
, parent
.Title
.document
);
689 // This is called automatically when a new patient is set, to make sure
690 // there are no patient-specific documents showing stale data. If a frame
691 // was just loaded with data for the correct patient, its name is passed so
692 // that it will not be zapped. At this point the new server-side pid is not
693 // assumed to be set, so this function will only load global data.
694 function reloadPatient(frname
) {
695 var f
= document
.forms
[0];
696 if (topName
.length
> 3 && topName
.substring(3) > '0' && frname
!= 'RTop') {
697 loadFrame('cal0','RTop', '<?php echo $primary_docs['cal
'][2]; ?>');
698 setRadio('rb_top', 'cal');
700 if (botName
.length
> 3 && botName
.substring(3) > '0' && frname
!= 'RBot') {
701 loadFrame('ens0','RBot', '<?php echo $primary_docs['ens
'][2]; ?>');
702 setRadio('rb_bot', 'ens');
706 // Reload encounter-specific frames, excluding a specified frame. At this
707 // point the new server-side encounter ID may not be set and loading the same
708 // document for the new encounter will not work, so load patient info instead.
709 function reloadEncounter(frname
) {
710 var f
= document
.forms
[0];
711 if (topName
.length
> 3 && topName
.substring(3) > '1' && frname
!= 'RTop') {
712 loadFrame('dem1','RTop', '<?php echo $primary_docs['dem
'][2]; ?>');
713 setRadio('rb_top', 'dem');
715 if (botName
.length
> 3 && botName
.substring(3) > '1' && frname
!= 'RBot') {
716 loadFrame('ens1','RBot', '<?php echo $primary_docs['ens
'][2]; ?>');
717 setRadio('rb_bot', 'ens');
721 // Clear and reload issue-related menu items for active_pid.
722 // Currently this only applies to athletic teams, but might be implemented
723 // in the general menu at some future time.
725 function reloadIssues() {
727 if ($GLOBALS['athletic_team']) {
728 // Generates a menu item for each active issue that this patient
729 // has of each issue type. Each one looks like this:
730 // Onset-Date [Add] Issue-Title
731 // where the first part is a link to open the issue dialog,
732 // [Add] is a link that auto-creates and opens a new encounter, and
733 // Issue-Title is a link that shows related encounters.
734 foreach ($ISSUE_TYPES as $key => $value) {
736 $
('#icontainer_<?php echo $key ?>').empty();
737 if (active_pid
!= 0) {
738 $
('#icontainer_<?php echo $key ?>').append("<li>" +
739 "<a href='' id='xxx1' onclick='return repPopup(" +
740 "\"../patient_file/summary/add_edit_issue.php?thistype=" +
741 "<?php echo $key; ?>\")' " +
742 "title='<?php echo xl('Create new issue'); ?>'>" +
743 "<?php echo xl('New') . " " . $value[1]; ?></a></li>");
744 top
.restoreSession();
745 $
.getScript('../../library/ajax/left_nav_issues_ajax.php?type=<?php echo $key; ?>');
751 } // end function reloadIssues
753 // This is referenced in left_nav_issues_ajax.php and is called when [Add]
754 // is clicked for an issue menu item to add a new encounter for the issue.
755 // So far this only applies to the Athletic Team version of the menu.
757 function addEncNotes(issue
) {
759 // top.restoreSession();
760 // $.getScript('../../library/ajax/left_nav_encounter_ajax.php?createvisit=1&issue=' + issue);
762 // The above AJAX call was to create the encounter right away, but we later
763 // (2012-07-03) decided it's better to present the New Encounter form instead.
764 // Note the issue ID is passed so it will be pre-selected in that form.
765 loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=&issue=' + issue
);
770 // Call this to announce that the patient has changed. You must call this
771 // if you change the session PID, so that the navigation frame will show the
772 // correct patient and so that the other frame will be reloaded if it contains
773 // patient-specific information from the previous patient. frname is the name
774 // of the frame that the call came from, so we know to only reload content
775 // from the *other* frame if it is patient-specific.
776 function setPatient(pname
, pid
, pubpid
, frname
, str_dob
) {
777 var str
= '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentPatientFromTitle()" title="PID = ' + pid +
'"><b>' + pname +
' (' + pubpid +
')<br /></b></a>';
778 setDivContent('current_patient', str
);
779 setTitleContent('current_patient', str + str_dob
);
780 if (pid
== active_pid
) return;
781 setDivContent('current_encounter', '<b><?php xl('None
','e
'); ?></b>');
783 active_encounter
= 0;
784 encounter_locked
= false;
785 if (frname
) reloadPatient(frname
);
787 $
(parent
.Title
.document
.getElementById('current_patient_block')).show();
788 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
789 $
(encounter_block
).hide();
791 // zero out the encounter frame, replace it with the encounter list frame
792 var f
= document
.forms
[0];
793 if ( f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
794 var encounter_frame
= getEncounterTargetFrame('enc');
795 if ( encounter_frame
!= undefined
) {
796 loadFrame('ens0',encounter_frame
, '<?php echo $primary_docs['ens
'][2]; ?>');
797 setRadio(encounter_frame
, 'ens');
802 $
(parent
.Title
.document
.getElementById('clear_active')).show();//To display Clear Active Patient button on selecting a patient
804 function setPatientEncounter(EncounterIdArray
,EncounterDateArray
,CalendarCategoryArray
) {
805 //This function lists all encounters of the patient.
806 //This function writes the drop down in the top frame.
807 //It is called when a new patient is create/selected from the search menu.
808 var str
= '<Select class="text" id="EncounterHistory" onchange="{top.restoreSession();toencounter(this.options[this.selectedIndex].value)}">';
809 str+
='<option value=""><?php echo htmlspecialchars( xl('Encounter History
'), ENT_QUOTES) ?></option>';
810 str+
='<option value="New Encounter"><?php echo htmlspecialchars( xl('New Encounter
'), ENT_QUOTES) ?></option>';
811 str+
='<option value="Past Encounter List"><?php echo htmlspecialchars( xl('Past Encounter
List'), ENT_QUOTES) ?></option>';
812 for(CountEncounter
=0;CountEncounter
<EncounterDateArray
.length
;CountEncounter++
)
814 str+
='<option value="'+EncounterIdArray
[CountEncounter
]+
'~'+EncounterDateArray
[CountEncounter
]+
'">'+EncounterDateArray
[CountEncounter
]+
'-'+CalendarCategoryArray
[CountEncounter
]+
'</option>';
817 $
(parent
.Title
.document
.getElementById('past_encounter_block')).show();
818 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
=str
;
821 function loadCurrentPatientFromTitle() {
822 top
.restoreSession();
823 top
.frames
['RTop'].location
='../patient_file/summary/demographics.php';
826 function getEncounterTargetFrame( name
) {
827 var bias
= <?php
echo $primary_docs[ 'enc' ][ 1 ]?
>;
828 var f
= document
.forms
[0];
830 if (f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
837 if ( f
.cb_top
.checked
) {
839 } else if ( f
.cb_bot
.checked
) {
845 function isEncounterLocked( encounterId
) {
846 <?php
if ( $esignApi->lockEncounters() ) { ?
>
847 // If encounter locking is enabled, make a syncronous call (async=false) to check the
848 // DB to see if the encounter is locked.
849 // Call restore session, just in case
850 top
.restoreSession();
853 url
: '<?php echo $GLOBALS['webroot
']?>/interface/esign/index.php?module=encounter&method=esign_is_encounter_locked',
854 data
: { encounterId
: encounterId
},
855 success
: function( data
) {
856 encounter_locked
= data
;
861 return encounter_locked
;
863 // If encounter locking isn't enabled, just tell the left_nav that the encounter
868 // Call this to announce that the encounter has changed. You must call this
869 // if you change the session encounter, so that the navigation frame will
870 // show the correct encounter and so that the other frame will be reloaded if
871 // it contains encounter-specific information from the previous encounter.
872 // frname is the name of the frame that the call came from, so we know to only
873 // reload encounter-specific content from the *other* frame.
874 function setEncounter(edate
, eid
, frname
) {
875 if (eid
== active_encounter
) return;
876 if (!eid
) edate
= '<?php xl('None
','e
'); ?>';
877 var str
= '<b>' + edate +
'</b>';
878 setDivContent('current_encounter', str
);
879 active_encounter
= eid
;
880 encounter_locked
=isEncounterLocked(active_encounter
);
881 reloadEncounter(frname
);
883 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
884 var encounter
= $
(parent
.Title
.document
.getElementById('current_encounter'));
885 var estr
= '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentEncounterFromTitle()"><b>' + edate +
' (' + eid +
')</b></a>';
886 encounter
.html( estr
);
887 encounter_block
.show();
890 function loadCurrentEncounterFromTitle() {
891 top
.restoreSession();
892 top
.frames
[ parent
.left_nav
.getEncounterTargetFrame('enc') ].location
='../patient_file/encounter/encounter_top.php';
895 // You must call this if you delete the active patient (or if for any other
896 // reason you "close" the active patient without opening a new one), so that
897 // the appearance of the navigation frame will be correct and so that any
898 // stale content will be reloaded.
899 function clearPatient() {
900 if (active_pid
== 0) return;
901 var f
= document
.forms
[0];
903 active_encounter
= 0;
904 encounter_locked
= false;
905 setDivContent('current_patient', '<b><?php xl('None
','e
'); ?></b>');
906 $
(parent
.Title
.document
.getElementById('current_patient_block')).hide();
907 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
='';
908 $
(parent
.Title
.document
.getElementById('current_encounter_block')).hide();
913 // You must call this if you delete the active encounter (or if for any other
914 // reason you "close" the active encounter without opening a new one), so that
915 // the appearance of the navigation frame will be correct and so that any
916 // stale content will be reloaded.
917 function clearEncounter() {
918 if (active_encounter
== 0) return;
919 top
.window
.parent
.Title
.document
.getElementById('current_encounter').innerHTML
="<b><?php echo htmlspecialchars( xl('None'), ENT_QUOTES) ?></b>";
920 active_encounter
= 0;
921 encounter_locked
= false;
925 function removeOptionSelected(EncounterId
)
926 {//Removes an item from the Encounter drop down.
927 var elSel
= top
.window
.parent
.Title
.document
.getElementById('EncounterHistory');
929 for (i
= elSel
.length
- 1; i
>=2; i
--) {
930 EncounterHistoryValue
=elSel
.options
[i
].value
;
931 EncounterHistoryValueArray
=EncounterHistoryValue
.split('~');
932 if (EncounterHistoryValueArray
[0]==EncounterId
) {
938 // You can call this to make sure the session pid is what we expect.
939 function pidSanityCheck(pid
) {
940 if (pid
!= active_pid
) {
941 alert('Session patient ID is ' + pid +
', expecting ' + active_pid +
942 '. This session is unstable and should be abandoned. Do not use ' +
943 'OpenEMR in multiple browser windows!');
949 // You can call this to make sure the session encounter is what we expect.
950 function encounterSanityCheck(eid
) {
951 if (eid
!= active_encounter
) {
952 alert('Session encounter ID is ' + eid +
', expecting ' + active_encounter +
953 '. This session is unstable and should be abandoned. Do not use ' +
954 'OpenEMR in multiple browser windows!');
961 function repPopup(aurl
) {
962 top
.restoreSession();
963 window
.open('<?php echo "$web_root/interface/reports/" ?>' + aurl
, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
967 // This is invoked to pop up some window when a popup item is selected.
968 function selpopup(selobj
) {
969 var i
= selobj
.selectedIndex
;
970 var opt
= selobj
.options
[i
];
974 if (opt
.text
== 'Export' || opt
.text
== 'Import') {
978 else if (opt
.text
== 'Refer') {
982 dlgopen(opt
.value
, '_blank', width
, height
);
984 selobj
.selectedIndex
= 0;
986 // Treeview activation stuff:
987 $
(document
).ready(function(){
988 if(3 == <?php
echo $GLOBALS['concurrent_layout'] ?
>){
989 $
("#navigation-slide > li > a.collapsed + ul").slideToggle("medium");
990 $
("#navigation-slide > li > ul > li > a.collapsed_lv2 + ul").slideToggle("medium");
991 $
("#navigation-slide > li > a.expanded").click(function() {
992 $
("#navigation-slide > li > a.expanded").not(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
993 $
(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
995 $
("#navigation-slide > li > a.collapsed").click(function() {
996 $
("#navigation-slide > li > a.expanded").not(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
997 $
(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
999 $
("#navigation-slide > li > ul > li > a.expanded_lv2").click(function() {
1000 $
("#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");
1001 $
(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
1003 $
("#navigation-slide > li > ul > li > a.collapsed_lv2").click(function() {
1004 $
("#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");
1005 $
(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
1007 $
("#navigation-slide > li > a#cal0").prepend('<img src="../../images/calendar.png" class="nav-menu-img" />');
1008 $
("#navigation-slide > li > a#msg0").prepend('<img src="../../images/messages.png" class="nav-menu-img" />');
1009 $
("#navigation-slide > li > a#patimg").prepend('<img src="../../images/patient.png" class="nav-menu-img" />');
1010 $
("#navigation-slide > li > a#app0").prepend('<img src="../../images/patient.png" class="nav-menu-img" />');
1011 $
("#navigation-slide > li > a#ppo0").prepend('<img src="../../images/patient.png" class="nav-menu-img" />');
1012 $
("#navigation-slide > li > a#repimg").prepend('<img src="../../images/reports.png" class="nav-menu-img" />');
1013 $
("#navigation-slide > li > a#feeimg").prepend('<img src="../../images/fee.png" class="nav-menu-img" />');
1014 $
("#navigation-slide > li > a#adm0").prepend('<img src="../../images/inventory.png" class="nav-menu-img" />');
1015 $
("#navigation-slide > li > a#invimg").prepend('<img src="../../images/inventory.png" class="nav-menu-img" />');
1016 $
("#navigation-slide > li > a#admimg").prepend('<img src="../../images/admin.png" class="nav-menu-img" />');
1017 $
("#navigation-slide > li > a#misimg").prepend('<img src="../../images/misc.png" class="nav-menu-img" />');
1018 $
("#navigation-slide > li > a#proimg").prepend('<img src="../../images/procedures.png" class="nav-menu-img" />');
1019 $
("#navigation-slide > li > a#modimg").prepend('<img src="../../images/module.png" class="nav-menu-img" />');
1020 $
("#navigation-slide > li").each(function(index
) {
1021 if($
(" > ul > li", this
).size() == 0){
1022 $
(" > a", this
).addClass("collapsed");
1025 }else if(2 == <?php
echo $GLOBALS['concurrent_layout'] ?
>){
1027 //Remove the links (used by the sliding menu) that will break treeview
1028 $
('a.collapsed').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1029 $
('a.collapsed_lv2').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1030 $
('a.expanded').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1031 $
('a.expanded_lv2').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1033 // Initiate treeview
1034 $
("#navigation").treeview({
1037 unique
: <?php
echo $GLOBALS['athletic_team'] ?
'false' : 'true' ?
>,
1038 toggle
: function() {
1039 window
.console
&& console
.log("%o was toggled", this
);
1049 <body
class="body_nav">
1051 <form method
='post' name
='find_patient' target
='RTop'
1052 action
='<?php echo $rootdir ?>/main/finder/patient_select.php'>
1055 // Find widget is at the top for the athletic team layout.
1056 if ($GLOBALS['athletic_team']) {
1062 <?php
if ( ( $GLOBALS['concurrent_layout'] == 2) ||
($GLOBALS['concurrent_layout'] == 3) ) { ?
>
1064 <select name
='sel_frame' style
='background-color:transparent;font-size:9pt;width:<?php echo $GLOBALS['athletic_team
'] ? 47 : 100; ?>%;'>
1065 <option value
='0'><?php
xl('Default','e'); ?
></option
>
1066 <option value
='1'><?php
xl('Top','e'); ?
></option
>
1067 <option value
='2'><?php
xl('Bottom','e'); ?
></option
>
1069 <?php
if ($GLOBALS['athletic_team']) genPopupsList('width:47%'); ?
>
1072 <table cellpadding
='0' cellspacing
='0' border
='0' width
='100%'>
1074 <td
class='smalltext' nowrap
>
1075 <input type
='checkbox' name
='cb_top' onclick
='toggleFrame(1)' checked
/>
1076 <b
><?php
xl('Top','e') ?
></b
>
1078 <td
class='smalltext' align
='right' nowrap
>
1079 <b
><?php
xl('Bot','e') ?
></b
>
1080 <input type
='checkbox' name
='cb_bot' onclick
='toggleFrame(2)' <?php
if (empty($GLOBALS['athletic_team'])) echo 'checked '; ?
>/>
1085 <?php
if ( $GLOBALS['concurrent_layout'] == 3) { ?
>
1086 <ul id
="navigation-slide">
1087 <?php
} else { // ($GLOBALS['concurrent_layout'] == 2) ?>
1088 <ul id
="navigation">
1091 <?php
if ($GLOBALS['athletic_team']) { // Tree menu for athletic teams ?>
1093 <?php
genTreeLink('RBot','msg',xl('Messages')); ?
>
1094 <li
><a
class="collapsed" id
="patimg" ><span
><?php
xl('View','e') ?
></span
></a
>
1096 <?php
genTreeLink('RTop','ros',xl('Weekly Exposures'),true); ?
>
1097 <?php
genMiscLink('RTop','ros','0',xl('Team Roster'),'reports/old_players_report.php?embed=1',true); ?
>
1098 <?php
if (!$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar'),true); ?
>
1101 <li
class="open"><a
class="collapsed" id
="patimg" ><span
><?php
xl('Demographics','e') ?
></span
></a
>
1103 <?php
genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?
>
1104 <?php
genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ?
xl('New/Search') : xl('New'))); ?
>
1105 <?php
genTreeLink('RTop','dem',xl('Current')); ?
>
1108 <li
class="open"><a
class="expanded" id
="patimg" ><span
><?php
xl('Medical Records','e') ?
></span
></a
>
1110 <?php
genDualLink('iss','ens',xl('All Injuries/Problems/Issues')); // with ens on bottom ?>
1112 // Add a container for each issue type.
1113 foreach ($ISSUE_TYPES as $key => $value) {
1114 echo " <li class='open'><a class='collapsed_lv2'><span>" . xl('Active') . " " . $value[0] . "</span></a>\n";
1115 echo " <ul id='icontainer_$key'>\n";
1120 <?php
genDualLink('nen','ens',xl('New Consultation')); // with ens on bottom ?>
1121 <?php
// genDualLink('enc','ens','Current Consultation'); // with ens on bottom ?>
1122 <?php
genTreeLink('RTop','enc',xl('Current Consultation')); // encounter_top will itself load ens on bottom ?>
1123 <?php
// genDualLink('dem','ens',xl('Previous Consultations')); // with dem on top ?>
1124 <?php
genTreeLink('RBot','ens',xl('Previous Consultations'),true); ?
>
1125 <?php
genDualLink('his','ens',xl('Prev Med/Surg Hx')); // with ens on bottom ?>
1126 <?php
// genPopLink(xl('New Allergy'),'../patient_file/summary/add_edit_issue.php?thistype=allergy','xxx1'); ?>
1127 <?php
// genTreeLink('RTop','iss',xl('View/Edit Allergies')); // somehow emphasizing allergies...? ?>
1128 <?php
if (!$GLOBALS['disable_immunizations']) genDualLink('his','imm',xl('Immunizations')); // imm on bottom, his on top ?>
1129 <?php
if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genDualLink('his','pre',xl('Prescriptions')); // pre on bottom, his on top ?>
1130 <?php
genTreeLink('RTop','doc',xl('Document/Imaging Store'),true); ?
>
1131 <?php
genDualLink('dem','pno',xl('Additional Notes')); // with dem on top ?>
1134 <li
class="open"><a
class="collapsed" id
="patimg" ><span
><?php
xl('Medical Administration','e') ?
></span
></a
>
1136 <?php
genDualLink('tra','ens',xl('Transactions/Referrals')); // new transaction form on top and tra list on bottom (or ens if no tra) ?>
1137 <?php
genPopLink(xl('Address Book'),'../usergroup/addrbook_list.php?popup=1'); ?
>
1138 <li
><a href
='' onClick
="return repPopup('../patient_file/letter.php')" id
='prp1'>Letter
</a
></li
>
1139 <?php
genTreeLink('RTop','prp',xl('Patient Printed Report')); ?
>
1142 <li
class="open"><a
class="collapsed" id
="repimg" ><span
><?php
xl('Reports','e') ?
></span
></a
>
1144 <li
class="open"><a
class="collapsed_lv2"><span
><?php
xl('Athletic/Injury','e') ?
></span
></a
>
1146 <?php
genTreeLink('RTop','prp',xl('Patient Printed Report')); // also appears above ?>
1147 <?php
genPopLink(xl('Games/Events Missed'),'absences_report.php'); ?
>
1148 <?php
genPopLink(xl('Injury Surveillance'),'football_injury_report.php'); ?
>
1149 <?php
genPopLink(xl('Team Injury Overview'),'injury_overview_report.php'); ?
>
1152 <li
><a
class="collapsed_lv2"><span
><?php
xl('Patient/Client','e') ?
></span
></a
>
1154 <?php
genPopLink(xl('List'),'patient_list.php'); ?
>
1155 <?php
if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genPopLink(xl('Prescriptions'),'prescriptions_report.php'); ?
>
1156 <?php
genPopLink(xl('Referrals'),'referrals_report.php'); ?
>
1159 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1161 <?php
if (!$GLOBALS['disable_calendar']) genPopLink(xl('Appointments'),'appointments_report.php'); ?
>
1162 <?php
genPopLink(xl('Encounters'),'encounters_report.php'); ?
>
1163 <?php
if (!$GLOBALS['disable_calendar']) genPopLink(xl('Appt-Enc'),'appt_encounter_report.php'); ?
>
1166 <li
><a
class="collapsed_lv2"><span
><?php
xl('General','e') ?
></span
></a
>
1168 <?php
genPopLink(xl('Services'),'services_by_category.php'); ?
>
1169 <?php
if ($GLOBALS['inhouse_pharmacy']) genPopLink(xl('Inventory'),'inventory_list.php'); ?
>
1170 <?php
if ($GLOBALS['inhouse_pharmacy']) genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?
>
1175 <?php
// TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1176 <?php
if(!isset($GLOBALS['enable_fees_in_left_menu']) ||
$GLOBALS['enable_fees_in_left_menu'] == 1){ ?
>
1177 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('Fees','e') ?
></span
></a
>
1179 <?php
genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?
>
1180 <?php
genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?
>
1184 <?php
if (acl_check('menus', 'modle')) {?
>
1185 <li
><a
class="collapsed" id
="modimg" ><span
><?php
echo xlt('Modules') ?
></span
></a
>
1187 <?php
genMiscLink('RTop','adm','0',xl('Manage Modules'),'modules/zend_modules/public/Installer'); ?
>
1188 <?php
//genTreeLink('RTop','ort',xl('Settings')); ?>
1191 $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");
1192 if (sqlNumRows($module_query)) {
1193 while ($modulerow = sqlFetchArray($module_query)) {
1194 $acl_section = strtolower($modulerow['mod_directory']);
1195 $disallowed[$acl_section] = zh_acl_check($_SESSION['authUserID'],$acl_section) ?
"" : "1";
1198 if($modulerow['type'] == 0) {
1199 $modulePath = $GLOBALS['customModDir'];
1204 $modulePath = $GLOBALS['zendModDir'];
1207 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$added;
1208 $mod_nick_name = $modulerow['mod_nick_name'] ?
$modulerow['mod_nick_name'] : $modulerow['mod_name'];
1210 <?php
genMiscLink2('RTop',$acl_section,'0',xlt($mod_nick_name),$relative_link);
1216 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?
>
1217 <li
><a
class="collapsed" id
="admimg" ><span
><?php
xl('Administration','e') ?
></span
></a
>
1219 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?
>
1220 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?
>
1221 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?
>
1222 <?php
genTreeLink('RTop','pwd','Users Password Change'); ?
>
1223 <?php
if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings'); ?
>
1224 <?php
if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?
>
1225 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?
>
1226 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?
>
1227 <?php
if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?
>
1228 <?php
if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?
>
1229 <?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'); ?
>
1230 <li
><a
class="collapsed_lv2"><span
><?php
xl('Other','e') ?
></span
></a
>
1232 <?php
if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?
>
1233 <?php
if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?
>
1234 <?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'); ?
>
1235 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?
>
1236 <?php
if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?
>
1237 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?
>
1238 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?
>
1239 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?
>
1244 <li
><a
class="collapsed" id
="misimg" ><span
><?php
xl('Miscellaneous','e') ?
></span
></a
>
1246 <?php
genTreeLink('RBot','aun',xl('Authorizations')); ?
>
1247 <?php
genTreeLink('RTop','fax',xl('Fax/Scan')); ?
>
1248 <?php
genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1249 <?php
genTreeLink('RTop','ono',xl('Ofc Notes')); ?
>
1250 <?php
genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?
>
1251 <?php
genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?
>
1252 <?php
if(acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=0'); ?
>
1253 <?php
if (acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('Document Templates'),'super/manage_document_templates.php'); ?
>
1257 <?php
} else { // not athletic team ?>
1259 <?php
if (!$GLOBALS['disable_calendar'] && !$GLOBALS['ippf_specific']) genTreeLink('RTop','cal',xl('Calendar')); ?
>
1260 <?php
genTreeLink('RBot','msg',xl('Messages')); ?
>
1261 <?php
if ($GLOBALS['lab_exchange_enable']) genTreeLink('RTop', 'lab', xl('Check Lab Results'));?
>
1262 <?php
genTreeLink('RTop', 'dld', xl('Documents'));?
>
1263 <?php
if($GLOBALS['portal_offsite_enable'] && $GLOBALS['portal_offsite_address'] && acl_check('patientportal','portal')) genTreeLink('RTop','app',xl('Portal Activity')); ?
>
1265 if ($GLOBALS['gbl_portal_cms_enable'] && acl_check('patientportal','portal')) {
1266 // genTreeLink('RTop','ppo',xl('WordPress Portal'));
1267 genPopLink(xl('CMS Portal'),'../cmsportal/list_requests.php','ppo0');
1271 <li
class="open"><a
class="expanded" id
="patimg" ><span
><?php
xl('Patient/Client','e') ?
></span
></a
>
1273 <?php
genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?
>
1274 <?php
genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ?
xl('New/Search') : xl('New'))); ?
>
1275 <?php
genTreeLink('RTop','dem',xl('Summary')); ?
>
1276 <li
class="open"><a
class="expanded_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1278 <?php
if ($GLOBALS['ippf_specific'] && !$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar')); ?
>
1279 <?php
genTreeLink('RBot','nen',xl('Create Visit')); ?
>
1280 <?php
genTreeLink('RBot','enc',xl('Current')); ?
>
1281 <?php
genTreeLink('RBot','ens',xl('Visit History')); ?
>
1285 <li
><a
class="collapsed_lv2"><span
><?php
xl('Records','e') ?
></span
></a
>
1287 <?php
genTreeLink('RTop','prq',xl('Patient Record Request')); ?
>
1291 <?php
if ($GLOBALS['gbl_nav_visit_forms']) { ?
>
1292 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visit Forms','e') ?
></span
></a
>
1295 // Generate the items for visit forms, both traditional and LBF.
1298 $lres = sqlStatement("SELECT * FROM list_options " .
1299 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
1300 if (sqlNumRows($lres)) {
1301 while ($lrow = sqlFetchArray($lres)) {
1302 $option_id = $lrow['option_id']; // should start with LBF
1303 $title = $lrow['title'];
1304 genMiscLink('RBot','cod','2',xl_form_title($title),
1305 "patient_file/encounter/load_form.php?formname=$option_id");
1308 include_once("$srcdir/registry.inc");
1309 $reg = getRegistered();
1311 foreach ($reg as $entry) {
1312 $option_id = $entry['directory'];
1313 $title = trim($entry['nickname']);
1314 if ($option_id == 'fee_sheet' ) continue;
1315 if ($option_id == 'newpatient') continue;
1316 if (empty($title)) $title = $entry['name'];
1317 genMiscLink('RBot','cod','2',xl_form_title($title),
1318 "patient_file/encounter/load_form.php?formname=" .
1319 urlencode($option_id));
1325 <li
class="collapsed" ><a
class="collapsed_lv2"><span
><?php
echo xlt('Import') ?
></span
></a
>
1327 <?php
genMiscLink('RTop','ccr','0',xlt('Upload'),'patient_file/ccr_import.php'); ?
>
1328 <?php
genMiscLink('RTop','apr','0',xlt('Pending Approval'),'patient_file/ccr_pending_approval.php'); ?
>
1331 <?php
} // end if gbl_nav_visit_forms ?>
1335 <?php
// TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1336 <?php
if(!isset($GLOBALS['enable_fees_in_left_menu']) ||
$GLOBALS['enable_fees_in_left_menu'] == 1){ ?
>
1337 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('Fees','e') ?
></span
></a
>
1339 <?php
genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?
>
1340 <?php
if ($GLOBALS['use_charges_panel']) genTreeLink('RBot','cod',xl('Charges')); ?
>
1341 <?php
genMiscLink('RBot','pay','1',xl('Payment'),'patient_file/front_payment.php'); ?
>
1342 <?php
genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?
>
1343 <?php
if (! $GLOBALS['simplified_demographics']) genTreeLink('RTop','bil',xl('Billing')); ?
>
1344 <?php
genTreeLink('RTop','npa',xl('Batch Payments'),false,2);?
>
1345 <?php
if ($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob')) genTreeLink('RTop','edi',xl('EDI History'),false,2);?
>
1349 <?php
if (acl_check('menus', 'modle')) {?
>
1350 <li
><a
class="collapsed" id
="modimg" ><span
><?php
echo xlt('Modules') ?
></span
></a
>
1352 <?php
genMiscLink('RTop','adm','0',xl('Manage Modules'),'modules/zend_modules/public/Installer'); ?
>
1353 <?php
//genTreeLink('RTop','ort',xl('Settings')); ?>
1356 $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");
1357 if (sqlNumRows($module_query)) {
1358 while ($modulerow = sqlFetchArray($module_query)) {
1359 $acl_section = strtolower($modulerow['mod_directory']);
1360 $disallowed[$acl_section] = zh_acl_check($_SESSION['authUserID'],$acl_section) ?
"" : "1";
1363 if($modulerow['type'] == 0) {
1364 $modulePath = $GLOBALS['customModDir'];
1369 $modulePath = $GLOBALS['zendModDir'];
1372 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$added;
1373 $mod_nick_name = $modulerow['mod_nick_name'] ?
$modulerow['mod_nick_name'] : $modulerow['mod_name'];
1375 <?php
genMiscLink2('RTop',$acl_section,'0',xlt($mod_nick_name),$relative_link);?
>
1381 <?php
// if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?>
1382 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?
>
1383 <li
><a
class="collapsed" id
="invimg" ><span
><?php
xl('Inventory','e') ?
></span
></a
>
1385 <?php
genMiscLink('RTop','adm','0',xl('Management'),'drugs/drug_inventory.php'); ?
>
1386 <?php
genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?
>
1390 <li
><a
class="collapsed" id
="proimg" ><span
><?php
xl('Procedures','e') ?
></span
></a
>
1392 <?php
genTreeLink('RTop','orl',xl('Providers')); ?
>
1393 <?php
genTreeLink('RTop','ort',xl('Configuration')); ?
>
1394 <?php
genTreeLink('RTop','orc',xl('Load Compendium')); ?
>
1395 <?php
genTreeLink('RTop','orp',xl('Pending Review')); ?
>
1396 <?php
genTreeLink('RTop','orr',xl('Patient Results')); ?
>
1397 <?php
genTreeLink('RTop','lda',xl('Lab Overview')); ?
>
1398 <?php
genTreeLink('RTop','orb',xl('Batch Results')); ?
>
1399 <?php
genTreeLink('RTop','ore',xl('Electronic Reports')); ?
>
1403 $newcrop_user_role=sqlQuery("select newcrop_user_role from users where username='".$_SESSION['authUser']."'");
1404 if($newcrop_user_role['newcrop_user_role'] && $GLOBALS['erx_enable']) { ?
>
1405 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('New Crop','e') ?
></span
></a
>
1407 <li
><a
class="collapsed_lv2"><span
><?php
xl('Status','e') ?
></span
></a
>
1409 <?php
genTreeLink('RTop','erx',xl('e-Rx')); ?
>
1410 <?php
//genTreeLink('RTop','err',xl('e-Rx Renewal')); ?>
1411 <?php
genMiscLink('RTop','err','0',xl('e-Rx Renewal'),'eRx.php?page=status'); ?
>
1417 <?php
if (!$disallowed['adm']) { ?
>
1418 <li
><a
class="collapsed" id
="admimg" ><span
><?php
xl('Administration','e') ?
></span
></a
>
1420 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?
>
1421 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?
>
1422 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?
>
1423 <?php
if (acl_check('admin', 'practice' )) genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1425 // Changed the target URL from practice settings -> Practice Settings - Pharmacy... Dec 09,09 .. Visolve ... This replaces empty frame with Pharmacy window
1426 if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings&pharmacy&action=list'); ?
>
1427 <?php
if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?
>
1428 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?
>
1429 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?
>
1430 <?php
if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?
>
1431 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?
>
1432 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?
>
1433 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Rules'),'super/rules/index.php?action=browse!list'); ?
>
1434 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Alerts'),'super/rules/index.php?action=alerts!listactmgr'); ?
>
1435 <?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='); ?
>
1436 <?php
if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?
>
1437 <?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'); ?
>
1438 <?php
if (acl_check('admin', 'super') && !empty($GLOBALS['code_types']['IPPF'])) genMiscLink('RTop','adm','0',xl('Export'),'main/ippf_export.php'); ?
>
1439 <li
><a
class="collapsed_lv2"><span
><?php
xl('Other','e') ?
></span
></a
>
1441 <?php
if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?
>
1442 <?php
if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?
>
1443 <?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'); ?
>
1444 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?
>
1446 if($newcrop_user_role['newcrop_user_role'] ||
$GLOBALS['erx_enable']) {
1447 if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('eRx Logs'),'logview/erx_logview.php');
1450 <?php
if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?
>
1451 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?
>
1452 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Native Data Loads'),'../interface/super/load_codes.php'); ?
>
1453 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('External Data Loads'),'../interface/code_systems/dataloads_ajax.php'); ?
>
1454 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Merge Patients'),'patient_file/merge_patients.php'); ?
>
1455 <?php
if ($GLOBALS['enable_auditlog_encryption']) genMiscLink('RTop','rep','0',xl('Audit Log Tamper'),'reports/audit_log_tamper_report.php'); ?
>
1461 <li
><a
class="collapsed" id
="repimg" ><span
><?php
xl('Reports','e') ?
></span
></a
>
1464 $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
1465 obj_name=enabled_hooks AND ms.mod_id=msh.mod_id LEFT OUTER JOIN modules AS m ON m.mod_id=ms.mod_id
1466 WHERE fld_type=3 AND mod_active=1 AND sql_run=1 AND attached_to='reports' ORDER BY mod_id");
1467 if (sqlNumRows($module_query)) {
1470 while ($modulerow = sqlFetchArray($module_query)) {
1473 if($modulerow['type'] == 0) {
1474 $modulePath = $GLOBALS['customModDir'];
1479 $modulePath = $GLOBALS['zendModDir'];
1482 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$modulerow['path'];
1483 $mod_nick_name = $modulerow['menu_name'] ?
$modulerow['menu_name'] : 'NoName';
1485 if($jid==0 ||
($modid!=$modulerow['mod_id'])){
1489 <li
><a
class="collapsed_lv2"><span
><?php
echo xlt($modulerow['mod_ui_name']); ?
></span
></a
>
1494 $modid = $modulerow['mod_id'];
1495 genMiscLink('RTop','adm','0',xlt($mod_nick_name),$relative_link);
1499 <li
><a
class="collapsed_lv2"><span
><?php
xl('Clients','e') ?
></span
></a
>
1501 <?php
genMiscLink('RTop','rep','0',xl('List'),'reports/patient_list.php'); ?
>
1502 <?php
if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genMiscLink('RTop','rep','0',xl('Rx'),'reports/prescriptions_report.php'); ?
>
1503 <?php
if (acl_check('patients', 'med')) genMiscLink('RTop','rep','0',xl('Clinical'),'reports/clinical_reports.php'); ?
>
1504 <?php
genMiscLink('RTop','rep','0',xl('Referrals'),'reports/referrals_report.php'); ?
>
1505 <?php
genMiscLink('RTop','rep','0',xl('Immunization Registry'),'reports/immunization_report.php'); ?
>
1508 <li
><a
class="collapsed_lv2"><span
><?php
xl('Clinic','e') ?
></span
></a
>
1510 <?php
if ($GLOBALS['enable_cdr'] ||
$GLOBALS['enable_cqm'] ||
$GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Report Results'),'reports/report_results.php'); ?
>
1511 <?php
if ($GLOBALS['enable_cdr']) genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?
>
1512 <?php
if ($GLOBALS['enable_cqm']) genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?
>
1513 <?php
if ($GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?
>
1514 <?php
if ($GLOBALS['enable_amc_tracking']) genMiscLink('RTop','rep','0',xl('AMC Tracking'),'reports/amc_tracking.php'); ?
>
1517 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1519 <?php
if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appointments'),'reports/appointments_report.php'); ?
>
1520 <?php
genMiscLink('RTop','rep','0',xl('Encounters'),'reports/encounters_report.php'); ?
>
1521 <?php
if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appt-Enc'),'reports/appt_encounter_report.php'); ?
>
1522 <?php
if (empty($GLOBALS['code_types']['IPPF'])) { ?
>
1523 <?php
genMiscLink('RTop','rep','0',xl('Superbill'),'reports/custom_report_range.php'); ?
>
1525 <?php
genMiscLink('RTop','rep','0',xl('Eligibility'),'reports/edi_270.php'); ?
>
1526 <?php
genMiscLink('RTop','rep','0',xl('Eligibility Response'),'reports/edi_271.php'); ?
>
1529 <?php
if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Chart Activity'),'reports/chart_location_activity.php'); ?
>
1530 <?php
if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Charts Out'),'reports/charts_checked_out.php'); ?
>
1531 <?php
genMiscLink('RTop','rep','0',xl('Services'), 'reports/services_by_category.php'); ?
>
1532 <?php
genMiscLink('RTop','rep','0',xl('Syndromic Surveillance'),'reports/non_reported.php'); ?
>
1535 <?php
if (acl_check('acct', 'rep_a')) { ?
>
1536 <li
><a
class="collapsed_lv2"><span
><?php
xl('Financial','e') ?
></span
></a
>
1538 <?php
genMiscLink('RTop','rep','0',xl('Sales'),'reports/sales_by_item.php'); ?
>
1539 <?php
genMiscLink('RTop','rep','0',xl('Cash Rec'), 'billing/sl_receipts_report.php'); ?
>
1540 <?php
genMiscLink('RTop','rep','0',xl('Front Rec'), 'reports/front_receipts_report.php'); ?
>
1541 <?php
genMiscLink('RTop','rep','0',xl('Pmt Method'), 'reports/receipts_by_method_report.php'); ?
>
1542 <?php
genMiscLink('RTop','rep','0',xl('Collections'), 'reports/collections_report.php'); ?
>
1543 <?php
genMiscLink('RTop','rep','0',xl('Financial Summary by Service Code'),'reports/svc_code_financial_report.php'); ?
>
1547 <?php
if ($GLOBALS['inhouse_pharmacy']) { ?
>
1548 <li
><a
class="collapsed_lv2"><span
><?php
xl('Inventory','e') ?
></span
></a
>
1550 <?php
genMiscLink('RTop','rep','0',xl('List'),'reports/inventory_list.php'); ?
>
1551 <?php
genMiscLink('RTop','rep','0',xl('Activity'),'reports/inventory_activity.php'); ?
>
1552 <?php
genMiscLink('RTop','rep','0',xl('Transactions'),'reports/inventory_transactions.php'); ?
>
1556 <li
><a
class="collapsed_lv2"><span
><?php
xl('Procedures','e') ?
></span
></a
>
1558 <?php
genPopLink(xl('Pending Res'),'../orders/pending_orders.php'); ?
>
1559 <?php
if (!empty($GLOBALS['code_types']['IPPF'])) genPopLink(xl('Pending F/U'),'../orders/pending_followup.php'); ?
>
1560 <?php
genPopLink(xl('Statistics'),'../orders/procedure_stats.php'); ?
>
1563 <?php
if (! $GLOBALS['simplified_demographics']) { ?
>
1564 <li
><a
class="collapsed_lv2"><span
><?php
xl('Insurance','e') ?
></span
></a
>
1566 <?php
genMiscLink('RTop','rep','0',xl('Distribution'),'reports/insurance_allocation_report.php'); ?
>
1567 <?php
genMiscLink('RTop','rep','0',xl('Indigents'),'billing/indigent_patients_report.php'); ?
>
1568 <?php
genMiscLink('RTop','rep','0',xl('Unique SP'),'reports/unique_seen_patients_report.php'); ?
>
1572 <?php
if (!empty($GLOBALS['code_types']['IPPF'])) { ?
>
1573 <li
><a
class="collapsed_lv2"><span
><?php
xl('Statistics','e') ?
></span
></a
>
1575 <?php
genPopLink(xl('IPPF Stats'),'ippf_statistics.php?t=i'); ?
>
1576 <?php
genPopLink(xl('GCAC Stats'),'ippf_statistics.php?t=g'); ?
>
1577 <?php
genPopLink(xl('MA Stats'),'ippf_statistics.php?t=m'); ?
>
1578 <?php
genPopLink(xl('CYP'),'ippf_cyp_report.php'); ?
>
1579 <?php
genPopLink(xl('Daily Record'),'ippf_daily.php'); ?
>
1582 <?php
} // end ippf-specific ?>
1583 <li
><a
class="collapsed_lv2"><span
><?php
xl('Blank Forms','e') ?
></span
></a
>
1585 <?php
genPopLink(xl('Demographics'),'../patient_file/summary/demographics_print.php'); ?
>
1586 <?php
genPopLink(xl('Superbill/Fee Sheet'),'../patient_file/printed_fee_sheet.php'); ?
>
1587 <?php
genPopLink(xl('Referral'),'../patient_file/transaction/print_referral.php'); ?
>
1589 $lres = sqlStatement("SELECT * FROM list_options " .
1590 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
1591 while ($lrow = sqlFetchArray($lres)) {
1592 $option_id = $lrow['option_id']; // should start with LBF
1593 $title = $lrow['title'];
1594 genPopLink($title, "../forms/LBF/printable.php?formname=$option_id");
1599 <?php
if (acl_check('admin','super')) { ?
>
1600 <li
><a
class="collapsed_lv2"><span
><?php
echo xlt('Services') ?
></span
></a
>
1602 <?php
genMiscLink('RTop','rep','0',xl('Background Services'),'reports/background_services.php'); ?
>
1603 <?php
genMiscLink('RTop','rep','0',xl('Direct Message Log'),'reports/direct_message_log.php'); ?
>
1608 <?php
// genTreeLink('RTop','rep','Other'); ?>
1611 <li
><a
class="collapsed" id
="misimg" ><span
><?php
xl('Miscellaneous','e') ?
></span
></a
>
1613 <?php
genTreeLink('RTop','ped',xl('Patient Education')); ?
>
1614 <?php
genTreeLink('RBot','aun',xl('Authorizations')); ?
>
1615 <?php
genTreeLink('RTop','fax',xl('Fax/Scan')); ?
>
1616 <?php
genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1617 <?php
genTreeLink('RTop','ort',xl('Order Catalog')); ?
>
1618 <?php
if (!$GLOBALS['disable_chart_tracker']) genTreeLink('RTop','cht',xl('Chart Tracker')); ?
>
1619 <?php
genTreeLink('RTop','ono',xl('Ofc Notes')); ?
>
1620 <?php
genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?
>
1621 <?php
$myrow = sqlQuery("SELECT state FROM registry WHERE directory = 'track_anything'");
1622 if($myrow['state']=='1') { genTreeLink('RTop','tan',xl('Configure Tracks')); } ?
>
1623 <?php
genTreeLink('RTop','pwd',xl('Password')); ?
>
1624 <?php
genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?
>
1625 <?php
if(acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=00'); ?
>
1626 <?php
if (acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('Document Templates'),'super/manage_document_templates.php'); ?
>
1630 <?php
} // end not athletic team ?>
1634 <?php
} else { // end ($GLOBALS['concurrent_layout'] == 2 || $GLOBALS['concurrent_layout'] == 3) ?>
1636 <table cellpadding
='0' cellspacing
='0' border
='0'>
1639 <table cellpadding
='0' cellspacing
='0' border
='0' width
='100%'>
1641 <td
class='smalltext' nowrap
>
1642 <input type
='checkbox' name
='cb_top' onclick
='toggleFrame(1)' checked
/><b
><?php
xl('Top','e') ?
></b
>
1644 <td
class='smalltext' align
='right' nowrap
>
1645 <b
><?php
xl('Bot','e') ?
></b
><input type
='checkbox' name
='cb_bot' onclick
='toggleFrame(2)' checked
/>
1652 // Builds the table of radio buttons and their labels. Radio button values
1653 // are comprised of the 3-character document id and the 1-digit usage type,
1654 // so that JavaScript can easily access this information.
1655 $default_top_rbid = $GLOBALS['athletic_team'] ?
'ros' : 'cal';
1656 foreach ($primary_docs as $key => $varr) {
1657 if (!empty($disallowed[$key])) continue;
1662 echo " <td class='smalltext'><input type='radio' name='rb_top' value='$key$usage' " .
1663 "onclick=\"loadFrame('$key$usage','RTop','$url')\"";
1664 if ($key == $default_top_rbid) echo " checked";
1666 echo " <td class='smalltext' id='lbl_$key'>$label</td>\n";
1667 echo " <td class='smalltext'><input type='radio' name='rb_bot' value='$key$usage' " .
1668 "onclick=\"loadFrame('$key$usage','RBot','$url')\"";
1669 if ($key == 'msg') echo " checked";
1681 // To use RelayHealth, see comments and parameters in includes/config.php.
1682 if (!empty($GLOBALS['ssi']['rh'])) {
1683 include_once("../../library/ssi.inc");
1684 echo getRelayHealthLink() ."<br /><hr />\n";
1688 <div id
='current_patient' style
= 'display:none'>
1689 <b
><?php
xl('None','e'); ?
></b
>
1692 <div id
='current_encounter' style
= 'display:none'>
1693 <b
><?php
xl('None','e'); ?
></b
>
1697 if (!$GLOBALS['athletic_team']) {
1705 <?php
if (!empty($GLOBALS['online_support_link'])) { ?
>
1706 <a href
='<?php echo $GLOBALS["online_support_link"]; ?>' target
="_blank" id
="support_link" class='css_button' onClick
="top.restoreSession()"><span
><?php
xl('Online Support','e'); ?
></span
></a
>
1709 <input type
='hidden' name
='findBy' value
='Last' />
1710 <input type
="hidden" name
="searchFields" id
="searchFields"/>
1711 <input type
="hidden" name
="search_service_code" value
='' />
1715 <script language
='JavaScript'>