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')
152 $primary_docs['npa']=array(xl('Batch Payments') , 0, 'billing/new_payment.php');
153 if ($GLOBALS['use_charges_panel'] ||
$GLOBALS['concurrent_layout'] == 2) {
154 $primary_docs['cod'] = array(xl('Charges'), 2, 'patient_file/encounter/encounter_bottom.php');
157 $esignApi = new Api();
158 // This section decides which navigation items will not appear.
160 $disallowed = array();
161 $disallowed['edi'] = !($GLOBALS['enable_edihistory_in_left_menu'] ||
acl_check('acct', 'eob'));
162 $disallowed['adm'] = !(acl_check('admin', 'calendar') ||
163 acl_check('admin', 'database') ||
acl_check('admin', 'forms') ||
164 acl_check('admin', 'practice') ||
acl_check('admin', 'users') ||
165 acl_check('admin', 'acl') ||
acl_check('admin', 'super') ||
166 acl_check('admin', 'superbill') ||
acl_check('admin', 'drugs'));
168 $disallowed['bil'] = !(acl_check('acct', 'rep') ||
acl_check('acct', 'eob') ||
169 acl_check('acct', 'bill'));
171 $disallowed['new'] = !(acl_check('patients','demo','',array('write','addonly') ));
173 $disallowed['fax'] = !($GLOBALS['enable_hylafax'] ||
$GLOBALS['enable_scanner']);
175 $disallowed['ros'] = !$GLOBALS['athletic_team'];
177 $disallowed['iss'] = !((acl_check('encounters','notes','','write') ||
178 acl_check('encounters','notes_a','','write') ) &&
179 acl_check('patients','med','','write') );
181 $disallowed['imp'] = $disallowed['new'] ||
182 !is_readable("$webserver_root/custom/import.php");
184 $disallowed['cht'] = !is_readable("$webserver_root/custom/chart_tracker.php");
186 $disallowed['pre'] = !(acl_check('patients', 'med'));
188 // Helper functions for treeview generation.
189 function genTreeLink($frame, $name, $title, $mono=false) {
190 global $primary_docs, $disallowed;
191 if (empty($disallowed[$name])) {
192 $id = $name . $primary_docs[$name][1];
193 echo "<li><a href='' id='$id' onclick=\"";
195 if ($frame == 'RTop')
196 echo "forceSpec(true,false);";
198 echo "forceSpec(false,true);";
200 echo "return loadFrame2('$id','$frame','" .
201 $primary_docs[$name][2] . "')\">" . $title . ($name == 'msg' ?
' <span id="reminderCountSpan" class="bold"></span>' : '')."</a></li>";
204 function genMiscLink($frame, $name, $level, $title, $url, $mono=false) {
206 if (empty($disallowed[$name])) {
207 $id = $name . $level;
208 echo "<li><a href='' id='$id' onclick=\"";
210 if ($frame == 'RTop')
211 echo "forceSpec(true,false);";
213 echo "forceSpec(false,true);";
215 echo "return loadFrame2('$id','$frame','" .
216 $url . "')\">" . $title . "</a></li>";
219 function genMiscLink2($frame, $name, $level, $title, $url, $mono=false,$mouseovertext="") {
221 if (empty($disallowed[$name])) {
223 $id = $name . $level;
224 echo "<li><a href='' id='$id' title='$mouseovertext' onclick=\"";
226 if ($frame == 'RTop')
227 echo "forceSpec(true,false);";
229 echo "forceSpec(false,true);";
231 echo "return loadFrame3('$id','$frame','" .
232 $url . "')\">" . $title . "</a></li>";
235 function genPopLink($title, $url, $linkid='') {
236 echo "<li><a href='' ";
237 if ($linkid) echo "id='$linkid' ";
238 echo "onclick=\"return repPopup('$url')\"" .
239 ">" . $title . "</a></li>";
241 function genDualLink($topname, $botname, $title) {
242 global $primary_docs, $disallowed;
243 if (empty($disallowed[$topname]) && empty($disallowed[$botname])) {
244 $topid = $topname . $primary_docs[$topname][1];
245 $botid = $botname . $primary_docs[$botname][1];
246 echo "<li><a href='' id='$topid' " .
247 "onclick=\"return loadFrameDual('$topid','$botid','" .
248 $primary_docs[$topname][2] . "','" .
249 $primary_docs[$botname][2] . "')\">" . $title . "</a></li>";
253 function genPopupsList($style='') {
254 global $disallowed, $webserver_root;
256 <select name
='popups' onchange
='selpopup(this)' style
='background-color:transparent;font-size:9pt;<?php echo $style; ?>'>
257 <option value
=''><?php
xl('Popups','e'); ?
></option
>
258 <?php
if (!$disallowed['iss']) { ?
>
259 <option value
='../patient_file/problem_encounter.php'><?php
xl('Issues','e'); ?
></option
>
261 <?php
if (!$GLOBALS['ippf_specific']) { ?
>
262 <option value
='../../custom/export_xml.php'><?php
xl('Export','e'); ?
></option
>
263 <option value
='../../custom/import_xml.php'><?php
xl('Import','e'); ?
></option
>
265 <?php
if ($GLOBALS['athletic_team']) { ?
>
266 <option value
='../reports/players_report.php'><?php
xl('Roster','e'); ?
></option
>
268 if (!$GLOBALS['disable_calendar']) { ?
>
269 <option value
='../reports/appointments_report.php?patient=<?php if(isset($pid)) {echo $pid;} ?>'><?php
xl('Appts','e'); ?
></option
>
271 if (file_exists("$webserver_root/custom/refer.php")) { ?
>
272 <option value
='../../custom/refer.php'><?php
xl('Refer','e'); ?
></option
>
274 <option value
='../patient_file/printed_fee_sheet.php?fill=1'><?php
xl('Superbill','e'); ?
></option
>
275 <option value
='../patient_file/front_payment.php'><?php
xl('Payment','e'); ?
></option
>
276 <?php
if ($GLOBALS['inhouse_pharmacy']) { ?
>
277 <option value
='../patient_file/pos_checkout.php'><?php
xl('Checkout','e'); ?
></option
>
279 <?php
if (is_dir($GLOBALS['OE_SITE_DIR'] . "/letter_templates")) { ?
>
280 <option value
='../patient_file/letter.php'><?php
xl('Letter','e'); ?
></option
>
286 function genFindBlock() {
288 <table cellpadding
='0' cellspacing
='0' border
='0'>
290 <td
class='smalltext'><?php
xl('Find','e') ?
>: 
;</td
>
291 <td
class='smalltext' colspan
='2'>
292 <input type
="entry" size
="7" name
="patient" class='inputtext' style
='width:65px;' />
296 <td
class='smalltext'><?php
xl('by','e') ?
>:</td
>
297 <td
class='smalltext'>
298 <a href
="javascript:findPatient('Last');" class="navitem"><?php
xl('Name','e'); ?
></a
>
300 <td
class='smalltext' align
='right'>
301 <a href
="javascript:findPatient('ID');" class="navitem"><?php
xl('ID','e'); ?
></a
>
305 <td
class='smalltext'> 
;</td
>
306 <td
class='smalltext'>
307 <a href
="javascript:findPatient('SSN');" class="navitem"><?php
xl('SSN','e'); ?
></a
>
309 <td
class='smalltext' align
='right'>
310 <a href
="javascript:findPatient('DOB');" class="navitem"><?php
xl('DOB','e'); ?
></a
>
314 <td
class='smalltext'> 
;</td
>
315 <td
class='smalltext'>
316 <a href
="javascript:findPatient('Any');" class="navitem"><?php
xl('Any', 'e'); ?
></a
>
318 <td
class='smalltext' align
='right'>
319 <a href
="javascript:initFilter();" class="navitem"><?php
xl('Filter', 'e'); ?
></a
>
324 } // End function genFindBlock()
329 <title
>Navigation
</title
>
330 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
332 <style type
="text/css">
336 padding
: 5px
3px
5px
3px
;
339 font
-family
:sans
-serif
;
343 a
.navitem
, a
.navitem
:visited
{
345 font
-family
:sans
-serif
;
356 border
-color
: #000000;
357 background
-color
:transparent
;
361 background
-color
:transparent
;
363 #navigation-slide ul {
364 background
-color
:transparent
;
374 vertical
-align
:middle
;
378 <link rel
="stylesheet" href
="../../library/js/jquery.treeview-1.4.1/jquery.treeview.css" />
379 <script src
="../../library/js/jquery-1.6.4.min.js" type
="text/javascript"></script
>
380 <script src
="../../library/js/jquery.treeview-1.4.1/jquery.treeview.js" type
="text/javascript"></script
>
382 <script type
="text/javascript" src
="../../library/dialog.js"></script
>
384 <script language
='JavaScript'>
386 // tajemo work by CB 2012/01/31 12:32:57 PM dated reminders counter
387 function getReminderCount(){
388 top
.restoreSession();
389 // Send the skip_timeout_reset parameter to not count this as a manual entry in the
390 // timing out mechanism in OpenEMR.
391 $
.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
392 { skip_timeout_reset
: "1" },
394 $
("#reminderCountSpan").html(data
);
395 // run updater every 60 seconds
396 var repeater
= setTimeout("getReminderCount()", 60000);
398 //piggy-back on this repeater to run other background-services
399 //this is a silent task manager that returns no output
400 $
.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/execute_background_services.php",
401 { skip_timeout_reset
: "1", ajax
: "1" });
404 $
(document
).ready(function (){
405 getReminderCount();//
406 parent
.loadedFrameCount +
= 1;
408 // end of tajemo work dated reminders counter
410 // Master values for current pid and encounter.
412 var active_encounter
= 0;
413 var encounter_locked
= false;
415 // Current selections in the top and bottom frames.
419 // Expand and/or collapse frames in response to checkbox clicks.
420 // fnum indicates which checkbox was clicked (1=left, 2=right).
421 function toggleFrame(fnum
) {
422 var f
= document
.forms
[0];
423 var fset
= top
.document
.getElementById('fsright');
424 if (!f
.cb_top
.checked
&& !f
.cb_bot
.checked
) {
425 if (fnum
== 1) f
.cb_bot
.checked
= true;
426 else f
.cb_top
.checked
= true;
428 var rows
= f
.cb_top
.checked ?
'*' : '0';
429 rows +
= f
.cb_bot
.checked ?
',*' : ',0';
434 // Load the specified url into the specified frame (RTop or RBot).
435 // The URL provided must be relative to interface.
436 function loadFrame(fname
, frame
, url
) {
437 top
.restoreSession();
438 var i
= url
.indexOf('{PID}');
439 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
440 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
441 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
444 // Load the specified url into a frame to be determined, with the specified
445 // frame as the default; the url must be relative to interface.
446 function loadFrame2(fname
, frame
, url
) {
447 var usage
= fname
.substring(3);
448 if (active_pid
== 0 && usage
> '0') {
449 alert('<?php xl('You must first select
or add a patient
.','e
') ?>');
452 if (active_encounter
== 0 && usage
> '1') {
453 alert('<?php xl('You must first select
or create an encounter
.','e
') ?>');
456 if (encounter_locked
&& usage
> '1') {
457 alert('<?php echo xls('This encounter is locked
. No
new forms can be added
.') ?>');
460 var f
= document
.forms
[0];
461 top
.restoreSession();
462 var i
= url
.indexOf('{PID}');
463 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
466 var fi
= f
.sel_frame
.selectedIndex
;
467 if (fi
== 1) frame
= 'RTop'; else if (fi
== 2) frame
= 'RBot';
469 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
470 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
471 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
475 function loadFrame3(fname
, frame
, url
) {
476 var f
= document
.forms
[0];
477 top
.restoreSession();
478 var i
= url
.indexOf('{PID}');
479 if (i
>= 0) url
= url
.substring(0,i
) + active_pid + url
.substring(i+
5);
482 var fi
= f
.sel_frame
.selectedIndex
;
483 if (fi
== 1) frame
= 'RTop'; else if (fi
== 2) frame
= 'RBot';
485 if (!f
.cb_bot
.checked
) frame
= 'RTop'; else if (!f
.cb_top
.checked
) frame
= 'RBot';
486 top
.frames
[frame
].location
= '<?php echo "$web_root/interface/" ?>' + url
;
487 if (frame
== 'RTop') topName
= fname
; else botName
= fname
;
491 // Make sure the the top and bottom frames are open or closed, as specified.
492 function forceSpec(istop
, isbot
) {
493 var f
= document
.forms
[0];
494 if (f
.cb_top
.checked
!= istop
) {
495 f
.cb_top
.checked
= istop
;
498 if (f
.cb_bot
.checked
!= isbot
) {
499 f
.cb_bot
.checked
= isbot
;
504 // Make sure both frames are open.
505 function forceDual() {
506 forceSpec(true, true);
509 // Load the specified url into a frame to be determined, with the specified
510 // frame as the default; the url must be relative to interface.
511 function loadFrameDual(tname
, bname
, topurl
, boturl
) {
512 var topusage
= tname
.substring(3);
513 var botusage
= bname
.substring(3);
514 if (active_pid
== 0 && (topusage
> '0' || botusage
> '0')) {
515 alert('<?php xl('You must first select
or add a patient
.','e
') ?>');
518 if (active_encounter
== 0 && (topusage
> '1' || botusage
> '1')) {
519 alert('<?php xl('You must first select
or create an encounter
.','e
') ?>');
522 if (encounter_locked
&& (topusage
> '1' || botusage
> '1')) {
523 alert('<?php echo xls('This encounter is locked
. No
new forms can be added
.') ?>');
526 var f
= document
.forms
[0];
528 top
.restoreSession();
529 var i
= topurl
.indexOf('{PID}');
530 if (i
>= 0) topurl
= topurl
.substring(0,i
) + active_pid + topurl
.substring(i+
5);
531 i
= boturl
.indexOf('{PID}');
532 if (i
>= 0) boturl
= boturl
.substring(0,i
) + active_pid + boturl
.substring(i+
5);
533 top
.frames
.RTop
.location
= '<?php echo "$web_root/interface/" ?>' + topurl
;
534 top
.frames
.RBot
.location
= '<?php echo "$web_root/interface/" ?>' + boturl
;
540 // Select a designated radio button. raname may be either the radio button
541 // array name (rb_top or rb_bot), or the frame name (RTop or RBot).
542 // You should call this if you directly load a document that does not
543 // correspond to the current radio button setting.
544 function setRadio(raname
, rbid
) {
545 <?php
if ($GLOBALS['concurrent_layout'] < 2) { ?
>
546 var f
= document
.forms
[0];
547 if (raname
== 'RTop') raname
= 'rb_top';
548 if (raname
== 'RBot') raname
= 'rb_bot';
549 for (var i
= 0; i
< f
[raname
].length
; ++i
) {
550 if (f
[raname
][i
].value
.substring(0,3) == rbid
) {
551 f
[raname
][i
].checked
= true;
559 // Set disabled/enabled state of radio buttons and associated labels
560 // depending on whether there is an active patient or encounter.
561 function syncRadios() {
562 var f
= document
.forms
[0];
563 encounter_locked
= isEncounterLocked(active_encounter
);
564 <?php
if (($GLOBALS['concurrent_layout'] == 2)||
($GLOBALS['concurrent_layout'] == 3)) { ?
>
565 var nlinks
= document
.links
.length
;
566 for (var i
= 0; i
< nlinks
; ++i
) {
567 var lnk
= document
.links
[i
];
568 if (lnk
.id
.length
!= 4) continue;
569 var usage
= lnk
.id
.substring(3);
570 if (usage
== '1' || usage
== '2') {
572 if (active_pid
== 0) da
= true;
573 if (active_encounter
== 0 && usage
> '1') da
= true;
574 if (encounter_locked
&& usage
> '1') da
= true;
576 if ($GLOBALS['concurrent_layout'] == 2){
577 $color = "'#0000ff'";
579 $color = "'#000000'";
582 lnk
.style
.color
= da ?
'#888888' : <?php
echo $color; ?
>;
585 <?php
} else if ($GLOBALS['concurrent_layout'] < 2) { ?
>
586 for (var i
= 0; i
< f
.rb_top
.length
; ++i
) {
588 var rb1
= f
.rb_top
[i
];
589 var rb2
= f
.rb_bot
[i
];
590 var rbid
= rb1
.value
.substring(0,3);
591 var usage
= rb1
.value
.substring(3);
592 if (active_pid
== 0 && usage
> '0') da
= true;
593 if (active_encounter
== 0 && usage
> '1') da
= true;
594 if (encounter_locked
&& usage
> '1') da
= true;
595 // daemon_frame can also set special label colors, so don't mess with
596 // them unless we have to.
597 if (rb1
.disabled
!= da
) {
600 document
.getElementById('lbl_' + rbid
).style
.color
= da ?
'#888888' : '#000000';
604 f
.popups
.disabled
= (active_pid
== 0);
608 top
.frames
['RTop'].location
='<?php echo $GLOBALS['default_top_pane
']?>';
609 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';
612 //Function to clear active patient and encounter in the server side
613 function clearactive() {
614 top
.restoreSession();
615 //Ajax call to clear active patient in session
618 url
: "<?php echo $GLOBALS['webroot'] ?>/library/ajax/unset_session_ajax.php",
619 data
: { func
: "unset_pid"},
620 success
:function( msg
) {
622 top
.frames
['RTop'].location
='<?php echo $GLOBALS['default_top_pane
']?>';
623 top
.frames
['RBot'].location
='messages/messages.php?form_active=1';
627 $
(parent
.Title
.document
.getElementById('clear_active')).hide();
629 // Reference to the search.php window.
632 // Open the search.php window.
633 function initFilter() {
634 my_window
= window
.open("../../custom/search.php", "mywindow","status=1");
637 // This is called by the search.php (Filter) window.
638 function processFilter(fieldString
, serviceCode
) {
639 var f
= document
.forms
[0];
640 document
.getElementById('searchFields').value
= fieldString
;
641 f
.search_service_code
.value
= serviceCode
;
642 findPatient("Filter");
643 f
.search_service_code
.value
= '';
647 // Process the click to find a patient by name, id, ssn or dob.
648 function findPatient(findby
) {
649 var f
= document
.forms
[0];
650 if (! f
.cb_top
.checked
) {
651 f
.cb_top
.checked
= true;
654 f
.findBy
.value
= findby
;
655 setRadio('rb_top', 'dem');
656 top
.restoreSession();
657 document
.find_patient
.submit();
660 // Helper function to set the contents of a div.
661 function setSomeContent(id
, content
, doc
) {
662 if (doc
.getElementById
) {
663 var x
= doc
.getElementById(id
);
665 x
.innerHTML
= content
;
669 x
.innerHTML
= content
;
672 function setDivContent(id
, content
) {
673 setSomeContent(id
, content
, document
);
675 function setTitleContent(id
, content
) {
676 setSomeContent(id
, content
, parent
.Title
.document
);
679 // This is called automatically when a new patient is set, to make sure
680 // there are no patient-specific documents showing stale data. If a frame
681 // was just loaded with data for the correct patient, its name is passed so
682 // that it will not be zapped. At this point the new server-side pid is not
683 // assumed to be set, so this function will only load global data.
684 function reloadPatient(frname
) {
685 var f
= document
.forms
[0];
686 if (topName
.length
> 3 && topName
.substring(3) > '0' && frname
!= 'RTop') {
687 loadFrame('cal0','RTop', '<?php echo $primary_docs['cal
'][2]; ?>');
688 setRadio('rb_top', 'cal');
690 if (botName
.length
> 3 && botName
.substring(3) > '0' && frname
!= 'RBot') {
691 loadFrame('ens0','RBot', '<?php echo $primary_docs['ens
'][2]; ?>');
692 setRadio('rb_bot', 'ens');
696 // Reload encounter-specific frames, excluding a specified frame. At this
697 // point the new server-side encounter ID may not be set and loading the same
698 // document for the new encounter will not work, so load patient info instead.
699 function reloadEncounter(frname
) {
700 var f
= document
.forms
[0];
701 if (topName
.length
> 3 && topName
.substring(3) > '1' && frname
!= 'RTop') {
702 loadFrame('dem1','RTop', '<?php echo $primary_docs['dem
'][2]; ?>');
703 setRadio('rb_top', 'dem');
705 if (botName
.length
> 3 && botName
.substring(3) > '1' && frname
!= 'RBot') {
706 loadFrame('ens1','RBot', '<?php echo $primary_docs['ens
'][2]; ?>');
707 setRadio('rb_bot', 'ens');
711 // Clear and reload issue-related menu items for active_pid.
712 // Currently this only applies to athletic teams, but might be implemented
713 // in the general menu at some future time.
715 function reloadIssues() {
717 if ($GLOBALS['athletic_team']) {
718 // Generates a menu item for each active issue that this patient
719 // has of each issue type. Each one looks like this:
720 // Onset-Date [Add] Issue-Title
721 // where the first part is a link to open the issue dialog,
722 // [Add] is a link that auto-creates and opens a new encounter, and
723 // Issue-Title is a link that shows related encounters.
724 foreach ($ISSUE_TYPES as $key => $value) {
726 $
('#icontainer_<?php echo $key ?>').empty();
727 if (active_pid
!= 0) {
728 $
('#icontainer_<?php echo $key ?>').append("<li>" +
729 "<a href='' id='xxx1' onclick='return repPopup(" +
730 "\"../patient_file/summary/add_edit_issue.php?thistype=" +
731 "<?php echo $key; ?>\")' " +
732 "title='<?php echo xl('Create new issue'); ?>'>" +
733 "<?php echo xl('New') . " " . $value[1]; ?></a></li>");
734 top
.restoreSession();
735 $
.getScript('../../library/ajax/left_nav_issues_ajax.php?type=<?php echo $key; ?>');
741 } // end function reloadIssues
743 // This is referenced in left_nav_issues_ajax.php and is called when [Add]
744 // is clicked for an issue menu item to add a new encounter for the issue.
745 // So far this only applies to the Athletic Team version of the menu.
747 function addEncNotes(issue
) {
749 // top.restoreSession();
750 // $.getScript('../../library/ajax/left_nav_encounter_ajax.php?createvisit=1&issue=' + issue);
752 // The above AJAX call was to create the encounter right away, but we later
753 // (2012-07-03) decided it's better to present the New Encounter form instead.
754 // Note the issue ID is passed so it will be pre-selected in that form.
755 loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=&issue=' + issue
);
760 // Call this to announce that the patient has changed. You must call this
761 // if you change the session PID, so that the navigation frame will show the
762 // correct patient and so that the other frame will be reloaded if it contains
763 // patient-specific information from the previous patient. frname is the name
764 // of the frame that the call came from, so we know to only reload content
765 // from the *other* frame if it is patient-specific.
766 function setPatient(pname
, pid
, pubpid
, frname
, str_dob
) {
767 var str
= '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentPatientFromTitle()" title="PID = ' + pid +
'"><b>' + pname +
' (' + pubpid +
')<br /></b></a>';
768 setDivContent('current_patient', str
);
769 setTitleContent('current_patient', str + str_dob
);
770 if (pid
== active_pid
) return;
771 setDivContent('current_encounter', '<b><?php xl('None
','e
'); ?></b>');
773 active_encounter
= 0;
774 encounter_locked
= false;
775 if (frname
) reloadPatient(frname
);
777 $
(parent
.Title
.document
.getElementById('current_patient_block')).show();
778 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
779 $
(encounter_block
).hide();
781 // zero out the encounter frame, replace it with the encounter list frame
782 var f
= document
.forms
[0];
783 if ( f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
784 var encounter_frame
= getEncounterTargetFrame('enc');
785 if ( encounter_frame
!= undefined
) {
786 loadFrame('ens0',encounter_frame
, '<?php echo $primary_docs['ens
'][2]; ?>');
787 setRadio(encounter_frame
, 'ens');
792 $
(parent
.Title
.document
.getElementById('clear_active')).show();//To display Clear Active Patient button on selecting a patient
794 function setPatientEncounter(EncounterIdArray
,EncounterDateArray
,CalendarCategoryArray
) {
795 //This function lists all encounters of the patient.
796 //This function writes the drop down in the top frame.
797 //It is called when a new patient is create/selected from the search menu.
798 var str
= '<Select class="text" id="EncounterHistory" onchange="{top.restoreSession();toencounter(this.options[this.selectedIndex].value)}">';
799 str+
='<option value=""><?php echo htmlspecialchars( xl('Encounter History
'), ENT_QUOTES) ?></option>';
800 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 getEncounterTargetFrame( name
) {
817 var bias
= <?php
echo $primary_docs[ 'enc' ][ 1 ]?
>;
818 var f
= document
.forms
[0];
820 if (f
.cb_top
.checked
&& f
.cb_bot
.checked
) {
827 if ( f
.cb_top
.checked
) {
829 } else if ( f
.cb_bot
.checked
) {
835 function isEncounterLocked( encounterId
) {
836 <?php
if ( $esignApi->lockEncounters() ) { ?
>
837 // If encounter locking is enabled, make a syncronous call (async=false) to check the
838 // DB to see if the encounter is locked.
839 // Call restore session, just in case
840 top
.restoreSession();
843 url
: '<?php echo $GLOBALS['webroot
']?>/interface/esign/index.php?module=encounter&method=esign_is_encounter_locked',
844 data
: { encounterId
: encounterId
},
845 success
: function( data
) {
846 encounter_locked
= data
;
851 return encounter_locked
;
853 // If encounter locking isn't enabled, just tell the left_nav that the encounter
858 // Call this to announce that the encounter has changed. You must call this
859 // if you change the session encounter, so that the navigation frame will
860 // show the correct encounter and so that the other frame will be reloaded if
861 // it contains encounter-specific information from the previous encounter.
862 // frname is the name of the frame that the call came from, so we know to only
863 // reload encounter-specific content from the *other* frame.
864 function setEncounter(edate
, eid
, frname
) {
865 if (eid
== active_encounter
) return;
866 if (!eid
) edate
= '<?php xl('None
','e
'); ?>';
867 var str
= '<b>' + edate +
'</b>';
868 setDivContent('current_encounter', str
);
869 active_encounter
= eid
;
870 encounter_locked
=isEncounterLocked(active_encounter
);
871 reloadEncounter(frname
);
873 var encounter_block
= $
(parent
.Title
.document
.getElementById('current_encounter_block'));
874 var encounter
= $
(parent
.Title
.document
.getElementById('current_encounter'));
875 var estr
= '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentEncounterFromTitle()"><b>' + edate +
' (' + eid +
')</b></a>';
876 encounter
.html( estr
);
877 encounter_block
.show();
880 function loadCurrentEncounterFromTitle() {
881 top
.restoreSession();
882 top
.frames
[ parent
.left_nav
.getEncounterTargetFrame('enc') ].location
='../patient_file/encounter/encounter_top.php';
885 // You must call this if you delete the active patient (or if for any other
886 // reason you "close" the active patient without opening a new one), so that
887 // the appearance of the navigation frame will be correct and so that any
888 // stale content will be reloaded.
889 function clearPatient() {
890 if (active_pid
== 0) return;
891 var f
= document
.forms
[0];
893 active_encounter
= 0;
894 encounter_locked
= false;
895 setDivContent('current_patient', '<b><?php xl('None
','e
'); ?></b>');
896 $
(parent
.Title
.document
.getElementById('current_patient_block')).hide();
897 top
.window
.parent
.Title
.document
.getElementById('past_encounter').innerHTML
='';
898 $
(parent
.Title
.document
.getElementById('current_encounter_block')).hide();
903 // You must call this if you delete the active encounter (or if for any other
904 // reason you "close" the active encounter without opening a new one), so that
905 // the appearance of the navigation frame will be correct and so that any
906 // stale content will be reloaded.
907 function clearEncounter() {
908 if (active_encounter
== 0) return;
909 top
.window
.parent
.Title
.document
.getElementById('current_encounter').innerHTML
="<b><?php echo htmlspecialchars( xl('None'), ENT_QUOTES) ?></b>";
910 active_encounter
= 0;
911 encounter_locked
= false;
915 function removeOptionSelected(EncounterId
)
916 {//Removes an item from the Encounter drop down.
917 var elSel
= top
.window
.parent
.Title
.document
.getElementById('EncounterHistory');
919 for (i
= elSel
.length
- 1; i
>=2; i
--) {
920 EncounterHistoryValue
=elSel
.options
[i
].value
;
921 EncounterHistoryValueArray
=EncounterHistoryValue
.split('~');
922 if (EncounterHistoryValueArray
[0]==EncounterId
) {
928 // You can call this to make sure the session pid is what we expect.
929 function pidSanityCheck(pid
) {
930 if (pid
!= active_pid
) {
931 alert('Session patient ID is ' + pid +
', expecting ' + active_pid +
932 '. This session is unstable and should be abandoned. Do not use ' +
933 'OpenEMR in multiple browser windows!');
939 // You can call this to make sure the session encounter is what we expect.
940 function encounterSanityCheck(eid
) {
941 if (eid
!= active_encounter
) {
942 alert('Session encounter ID is ' + eid +
', expecting ' + active_encounter +
943 '. This session is unstable and should be abandoned. Do not use ' +
944 'OpenEMR in multiple browser windows!');
951 function repPopup(aurl
) {
952 top
.restoreSession();
953 window
.open('<?php echo "$web_root/interface/reports/" ?>' + aurl
, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
957 // This is invoked to pop up some window when a popup item is selected.
958 function selpopup(selobj
) {
959 var i
= selobj
.selectedIndex
;
960 var opt
= selobj
.options
[i
];
964 if (opt
.text
== 'Export' || opt
.text
== 'Import') {
968 else if (opt
.text
== 'Refer') {
972 dlgopen(opt
.value
, '_blank', width
, height
);
974 selobj
.selectedIndex
= 0;
976 // Treeview activation stuff:
977 $
(document
).ready(function(){
978 if(3 == <?php
echo $GLOBALS['concurrent_layout'] ?
>){
979 $
("#navigation-slide > li > a.collapsed + ul").slideToggle("medium");
980 $
("#navigation-slide > li > ul > li > a.collapsed_lv2 + ul").slideToggle("medium");
981 $
("#navigation-slide > li > a.expanded").click(function() {
982 $
("#navigation-slide > li > a.expanded").not(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
983 $
(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
985 $
("#navigation-slide > li > a.collapsed").click(function() {
986 $
("#navigation-slide > li > a.expanded").not(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
987 $
(this
).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
989 $
("#navigation-slide > li > ul > li > a.expanded_lv2").click(function() {
990 $
("#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");
991 $
(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
993 $
("#navigation-slide > li > ul > li > a.collapsed_lv2").click(function() {
994 $
("#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");
995 $
(this
).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
997 $
("#navigation-slide > li > a#cal0").prepend('<img src="../../images/calendar.png" class="nav-menu-img" />');
998 $
("#navigation-slide > li > a#msg0").prepend('<img src="../../images/messages.png" class="nav-menu-img" />');
999 $
("#navigation-slide > li > a#patimg").prepend('<img src="../../images/patient.png" class="nav-menu-img" />');
1000 $
("#navigation-slide > li > a#app0").prepend('<img src="../../images/patient.png" class="nav-menu-img" />');
1001 $
("#navigation-slide > li > a#ppo0").prepend('<img src="../../images/patient.png" class="nav-menu-img" />');
1002 $
("#navigation-slide > li > a#repimg").prepend('<img src="../../images/reports.png" class="nav-menu-img" />');
1003 $
("#navigation-slide > li > a#feeimg").prepend('<img src="../../images/fee.png" class="nav-menu-img" />');
1004 $
("#navigation-slide > li > a#adm0").prepend('<img src="../../images/inventory.png" class="nav-menu-img" />');
1005 $
("#navigation-slide > li > a#invimg").prepend('<img src="../../images/inventory.png" class="nav-menu-img" />');
1006 $
("#navigation-slide > li > a#admimg").prepend('<img src="../../images/admin.png" class="nav-menu-img" />');
1007 $
("#navigation-slide > li > a#misimg").prepend('<img src="../../images/misc.png" class="nav-menu-img" />');
1008 $
("#navigation-slide > li > a#proimg").prepend('<img src="../../images/procedures.png" class="nav-menu-img" />');
1009 $
("#navigation-slide > li > a#modimg").prepend('<img src="../../images/module.png" class="nav-menu-img" />');
1010 $
("#navigation-slide > li").each(function(index
) {
1011 if($
(" > ul > li", this
).size() == 0){
1012 $
(" > a", this
).addClass("collapsed");
1015 }else if(2 == <?php
echo $GLOBALS['concurrent_layout'] ?
>){
1017 //Remove the links (used by the sliding menu) that will break treeview
1018 $
('a.collapsed').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1019 $
('a.collapsed_lv2').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1020 $
('a.expanded').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1021 $
('a.expanded_lv2').each(function() { $
(this
).replaceWith('<span>'+$
(this
).text()+
'</span>'); });
1023 // Initiate treeview
1024 $
("#navigation").treeview({
1027 unique
: <?php
echo $GLOBALS['athletic_team'] ?
'false' : 'true' ?
>,
1028 toggle
: function() {
1029 window
.console
&& console
.log("%o was toggled", this
);
1039 <body
class="body_nav">
1041 <form method
='post' name
='find_patient' target
='RTop'
1042 action
='<?php echo $rootdir ?>/main/finder/patient_select.php'>
1045 // Find widget is at the top for the athletic team layout.
1046 if ($GLOBALS['athletic_team']) {
1052 <?php
if ( ( $GLOBALS['concurrent_layout'] == 2) ||
($GLOBALS['concurrent_layout'] == 3) ) { ?
>
1054 <select name
='sel_frame' style
='background-color:transparent;font-size:9pt;width:<?php echo $GLOBALS['athletic_team
'] ? 47 : 100; ?>%;'>
1055 <option value
='0'><?php
xl('Default','e'); ?
></option
>
1056 <option value
='1'><?php
xl('Top','e'); ?
></option
>
1057 <option value
='2'><?php
xl('Bottom','e'); ?
></option
>
1059 <?php
if ($GLOBALS['athletic_team']) genPopupsList('width:47%'); ?
>
1062 <table cellpadding
='0' cellspacing
='0' border
='0' width
='100%'>
1064 <td
class='smalltext' nowrap
>
1065 <input type
='checkbox' name
='cb_top' onclick
='toggleFrame(1)' checked
/>
1066 <b
><?php
xl('Top','e') ?
></b
>
1068 <td
class='smalltext' align
='right' nowrap
>
1069 <b
><?php
xl('Bot','e') ?
></b
>
1070 <input type
='checkbox' name
='cb_bot' onclick
='toggleFrame(2)' <?php
if (empty($GLOBALS['athletic_team'])) echo 'checked '; ?
>/>
1075 <?php
if ( $GLOBALS['concurrent_layout'] == 3) { ?
>
1076 <ul id
="navigation-slide">
1077 <?php
} else { // ($GLOBALS['concurrent_layout'] == 2) ?>
1078 <ul id
="navigation">
1081 <?php
if ($GLOBALS['athletic_team']) { // Tree menu for athletic teams ?>
1083 <?php
genTreeLink('RBot','msg',xl('Messages')); ?
>
1084 <li
><a
class="collapsed" id
="patimg" ><span
><?php
xl('View','e') ?
></span
></a
>
1086 <?php
genTreeLink('RTop','ros',xl('Weekly Exposures'),true); ?
>
1087 <?php
genMiscLink('RTop','ros','0',xl('Team Roster'),'reports/old_players_report.php?embed=1',true); ?
>
1088 <?php
if (!$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar'),true); ?
>
1091 <li
class="open"><a
class="collapsed" id
="patimg" ><span
><?php
xl('Demographics','e') ?
></span
></a
>
1093 <?php
genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?
>
1094 <?php
genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ?
xl('New/Search') : xl('New'))); ?
>
1095 <?php
genTreeLink('RTop','dem',xl('Current')); ?
>
1098 <li
class="open"><a
class="expanded" id
="patimg" ><span
><?php
xl('Medical Records','e') ?
></span
></a
>
1100 <?php
genDualLink('iss','ens',xl('All Injuries/Problems/Issues')); // with ens on bottom ?>
1102 // Add a container for each issue type.
1103 foreach ($ISSUE_TYPES as $key => $value) {
1104 echo " <li class='open'><a class='collapsed_lv2'><span>" . xl('Active') . " " . $value[0] . "</span></a>\n";
1105 echo " <ul id='icontainer_$key'>\n";
1110 <?php
genDualLink('nen','ens',xl('New Consultation')); // with ens on bottom ?>
1111 <?php
// genDualLink('enc','ens','Current Consultation'); // with ens on bottom ?>
1112 <?php
genTreeLink('RTop','enc',xl('Current Consultation')); // encounter_top will itself load ens on bottom ?>
1113 <?php
// genDualLink('dem','ens',xl('Previous Consultations')); // with dem on top ?>
1114 <?php
genTreeLink('RBot','ens',xl('Previous Consultations'),true); ?
>
1115 <?php
genDualLink('his','ens',xl('Prev Med/Surg Hx')); // with ens on bottom ?>
1116 <?php
// genPopLink(xl('New Allergy'),'../patient_file/summary/add_edit_issue.php?thistype=allergy','xxx1'); ?>
1117 <?php
// genTreeLink('RTop','iss',xl('View/Edit Allergies')); // somehow emphasizing allergies...? ?>
1118 <?php
if (!$GLOBALS['disable_immunizations']) genDualLink('his','imm',xl('Immunizations')); // imm on bottom, his on top ?>
1119 <?php
if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genDualLink('his','pre',xl('Prescriptions')); // pre on bottom, his on top ?>
1120 <?php
genTreeLink('RTop','doc',xl('Document/Imaging Store'),true); ?
>
1121 <?php
genDualLink('dem','pno',xl('Additional Notes')); // with dem on top ?>
1124 <li
class="open"><a
class="collapsed" id
="patimg" ><span
><?php
xl('Medical Administration','e') ?
></span
></a
>
1126 <?php
genDualLink('tra','ens',xl('Transactions/Referrals')); // new transaction form on top and tra list on bottom (or ens if no tra) ?>
1127 <?php
genPopLink(xl('Address Book'),'../usergroup/addrbook_list.php?popup=1'); ?
>
1128 <li
><a href
='' onClick
="return repPopup('../patient_file/letter.php')" id
='prp1'>Letter
</a
></li
>
1129 <?php
genTreeLink('RTop','prp',xl('Patient Printed Report')); ?
>
1132 <li
class="open"><a
class="collapsed" id
="repimg" ><span
><?php
xl('Reports','e') ?
></span
></a
>
1134 <li
class="open"><a
class="collapsed_lv2"><span
><?php
xl('Athletic/Injury','e') ?
></span
></a
>
1136 <?php
genTreeLink('RTop','prp',xl('Patient Printed Report')); // also appears above ?>
1137 <?php
genPopLink(xl('Games/Events Missed'),'absences_report.php'); ?
>
1138 <?php
genPopLink(xl('Injury Surveillance'),'football_injury_report.php'); ?
>
1139 <?php
genPopLink(xl('Team Injury Overview'),'injury_overview_report.php'); ?
>
1142 <li
><a
class="collapsed_lv2"><span
><?php
xl('Patient/Client','e') ?
></span
></a
>
1144 <?php
genPopLink(xl('List'),'patient_list.php'); ?
>
1145 <?php
if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genPopLink(xl('Prescriptions'),'prescriptions_report.php'); ?
>
1146 <?php
genPopLink(xl('Referrals'),'referrals_report.php'); ?
>
1149 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1151 <?php
if (!$GLOBALS['disable_calendar']) genPopLink(xl('Appointments'),'appointments_report.php'); ?
>
1152 <?php
genPopLink(xl('Encounters'),'encounters_report.php'); ?
>
1153 <?php
if (!$GLOBALS['disable_calendar']) genPopLink(xl('Appt-Enc'),'appt_encounter_report.php'); ?
>
1156 <li
><a
class="collapsed_lv2"><span
><?php
xl('General','e') ?
></span
></a
>
1158 <?php
genPopLink(xl('Services'),'services_by_category.php'); ?
>
1159 <?php
if ($GLOBALS['inhouse_pharmacy']) genPopLink(xl('Inventory'),'inventory_list.php'); ?
>
1160 <?php
if ($GLOBALS['inhouse_pharmacy']) genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?
>
1165 <?php
// TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1166 <?php
if(!isset($GLOBALS['enable_fees_in_left_menu']) ||
$GLOBALS['enable_fees_in_left_menu'] == 1){ ?
>
1167 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('Fees','e') ?
></span
></a
>
1169 <?php
genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?
>
1170 <?php
genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?
>
1174 <?php
if (acl_check('menus', 'modle')) {?
>
1175 <li
><a
class="collapsed" id
="modimg" ><span
><?php
echo xlt('Modules') ?
></span
></a
>
1177 <?php
genMiscLink('RTop','adm','0',xl('Manage Modules'),'modules/zend_modules/public/Installer'); ?
>
1178 <?php
//genTreeLink('RTop','ort',xl('Settings')); ?>
1181 $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");
1182 if (sqlNumRows($module_query)) {
1183 while ($modulerow = sqlFetchArray($module_query)) {
1184 $acl_section = strtolower($modulerow['mod_directory']);
1185 $disallowed[$acl_section] = zh_acl_check($_SESSION['authUserID'],$acl_section) ?
"" : "1";
1188 if($modulerow['type'] == 0) {
1189 $modulePath = $GLOBALS['customModDir'];
1194 $modulePath = $GLOBALS['zendModDir'];
1197 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$added;
1198 $mod_nick_name = $modulerow['mod_nick_name'] ?
$modulerow['mod_nick_name'] : $modulerow['mod_name'];
1200 <?php
genMiscLink2('RTop',$acl_section,'0',xlt($mod_nick_name),$relative_link);
1206 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?
>
1207 <li
><a
class="collapsed" id
="admimg" ><span
><?php
xl('Administration','e') ?
></span
></a
>
1209 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?
>
1210 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?
>
1211 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?
>
1212 <?php
genTreeLink('RTop','pwd','Users Password Change'); ?
>
1213 <?php
if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings'); ?
>
1214 <?php
if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?
>
1215 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?
>
1216 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?
>
1217 <?php
if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?
>
1218 <?php
if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?
>
1219 <?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'); ?
>
1220 <li
><a
class="collapsed_lv2"><span
><?php
xl('Other','e') ?
></span
></a
>
1222 <?php
if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?
>
1223 <?php
if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?
>
1224 <?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'); ?
>
1225 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?
>
1226 <?php
if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?
>
1227 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?
>
1228 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?
>
1229 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?
>
1234 <li
><a
class="collapsed" id
="misimg" ><span
><?php
xl('Miscellaneous','e') ?
></span
></a
>
1236 <?php
genTreeLink('RBot','aun',xl('Authorizations')); ?
>
1237 <?php
genTreeLink('RTop','fax',xl('Fax/Scan')); ?
>
1238 <?php
genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1239 <?php
genTreeLink('RTop','ono',xl('Ofc Notes')); ?
>
1240 <?php
genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?
>
1241 <?php
genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?
>
1242 <?php
if(acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=0'); ?
>
1243 <?php
if (acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('Document Templates'),'super/manage_document_templates.php'); ?
>
1247 <?php
} else { // not athletic team ?>
1249 <?php
if (!$GLOBALS['disable_calendar'] && !$GLOBALS['ippf_specific']) genTreeLink('RTop','cal',xl('Calendar')); ?
>
1250 <?php
genTreeLink('RBot','msg',xl('Messages')); ?
>
1251 <?php
if ($GLOBALS['lab_exchange_enable']) genTreeLink('RTop', 'lab', xl('Check Lab Results'));?
>
1252 <?php
if($GLOBALS['portal_offsite_enable'] && $GLOBALS['portal_offsite_address'] && acl_check('patientportal','portal')) genTreeLink('RTop','app',xl('Portal Activity')); ?
>
1254 if ($GLOBALS['gbl_portal_cms_enable'] && acl_check('patientportal','portal')) {
1255 // genTreeLink('RTop','ppo',xl('WordPress Portal'));
1256 genPopLink(xl('CMS Portal'),'../cmsportal/list_requests.php','ppo0');
1260 <li
class="open"><a
class="expanded" id
="patimg" ><span
><?php
xl('Patient/Client','e') ?
></span
></a
>
1262 <?php
genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?
>
1263 <?php
genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ?
xl('New/Search') : xl('New'))); ?
>
1264 <?php
genTreeLink('RTop','dem',xl('Summary')); ?
>
1265 <li
class="open"><a
class="expanded_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1267 <?php
if ($GLOBALS['ippf_specific'] && !$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar')); ?
>
1268 <?php
genTreeLink('RBot','nen',xl('Create Visit')); ?
>
1269 <?php
genTreeLink('RBot','enc',xl('Current')); ?
>
1270 <?php
genTreeLink('RBot','ens',xl('Visit History')); ?
>
1274 <li
><a
class="collapsed_lv2"><span
><?php
xl('Records','e') ?
></span
></a
>
1276 <?php
genTreeLink('RTop','prq',xl('Patient Record Request')); ?
>
1280 <?php
if ($GLOBALS['gbl_nav_visit_forms']) { ?
>
1281 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visit Forms','e') ?
></span
></a
>
1284 // Generate the items for visit forms, both traditional and LBF.
1287 $lres = sqlStatement("SELECT * FROM list_options " .
1288 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
1289 if (sqlNumRows($lres)) {
1290 while ($lrow = sqlFetchArray($lres)) {
1291 $option_id = $lrow['option_id']; // should start with LBF
1292 $title = $lrow['title'];
1293 genMiscLink('RBot','cod','2',xl_form_title($title),
1294 "patient_file/encounter/load_form.php?formname=$option_id");
1297 include_once("$srcdir/registry.inc");
1298 $reg = getRegistered();
1300 foreach ($reg as $entry) {
1301 $option_id = $entry['directory'];
1302 $title = trim($entry['nickname']);
1303 if ($option_id == 'fee_sheet' ) continue;
1304 if ($option_id == 'newpatient') continue;
1305 if (empty($title)) $title = $entry['name'];
1306 genMiscLink('RBot','cod','2',xl_form_title($title),
1307 "patient_file/encounter/load_form.php?formname=" .
1308 urlencode($option_id));
1314 <li
class="collapsed" ><a
class="collapsed_lv2"><span
><?php
echo xlt('Import') ?
></span
></a
>
1316 <?php
genMiscLink('RTop','ccr','0',xlt('Upload'),'patient_file/ccr_import.php'); ?
>
1317 <?php
genMiscLink('RTop','apr','0',xlt('Pending Approval'),'patient_file/ccr_pending_approval.php'); ?
>
1320 <?php
} // end if gbl_nav_visit_forms ?>
1324 <?php
// TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1325 <?php
if(!isset($GLOBALS['enable_fees_in_left_menu']) ||
$GLOBALS['enable_fees_in_left_menu'] == 1){ ?
>
1326 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('Fees','e') ?
></span
></a
>
1328 <?php
genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?
>
1329 <?php
if ($GLOBALS['use_charges_panel']) genTreeLink('RBot','cod',xl('Charges')); ?
>
1330 <?php
genMiscLink('RBot','pay','1',xl('Payment'),'patient_file/front_payment.php'); ?
>
1331 <?php
genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?
>
1332 <?php
if (! $GLOBALS['simplified_demographics']) genTreeLink('RTop','bil',xl('Billing')); ?
>
1333 <?php
genTreeLink('RTop','npa',xl('Batch Payments'),false,2);?
>
1334 <?php
if ($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob')) genTreeLink('RTop','edi',xl('EDI History'),false,2);?
>
1338 <?php
if (acl_check('menus', 'modle')) {?
>
1339 <li
><a
class="collapsed" id
="modimg" ><span
><?php
echo xlt('Modules') ?
></span
></a
>
1341 <?php
genMiscLink('RTop','adm','0',xl('Manage Modules'),'modules/zend_modules/public/Installer'); ?
>
1342 <?php
//genTreeLink('RTop','ort',xl('Settings')); ?>
1345 $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");
1346 if (sqlNumRows($module_query)) {
1347 while ($modulerow = sqlFetchArray($module_query)) {
1348 $acl_section = strtolower($modulerow['mod_directory']);
1349 $disallowed[$acl_section] = zh_acl_check($_SESSION['authUserID'],$acl_section) ?
"" : "1";
1352 if($modulerow['type'] == 0) {
1353 $modulePath = $GLOBALS['customModDir'];
1358 $modulePath = $GLOBALS['zendModDir'];
1361 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$added;
1362 $mod_nick_name = $modulerow['mod_nick_name'] ?
$modulerow['mod_nick_name'] : $modulerow['mod_name'];
1364 <?php
genMiscLink2('RTop',$acl_section,'0',xlt($mod_nick_name),$relative_link);?
>
1370 <?php
// if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?>
1371 <?php
if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?
>
1372 <li
><a
class="collapsed" id
="invimg" ><span
><?php
xl('Inventory','e') ?
></span
></a
>
1374 <?php
genMiscLink('RTop','adm','0',xl('Management'),'drugs/drug_inventory.php'); ?
>
1375 <?php
genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?
>
1379 <li
><a
class="collapsed" id
="proimg" ><span
><?php
xl('Procedures','e') ?
></span
></a
>
1381 <?php
genTreeLink('RTop','orl',xl('Providers')); ?
>
1382 <?php
genTreeLink('RTop','ort',xl('Configuration')); ?
>
1383 <?php
genTreeLink('RTop','orc',xl('Load Compendium')); ?
>
1384 <?php
genTreeLink('RTop','orp',xl('Pending Review')); ?
>
1385 <?php
genTreeLink('RTop','orr',xl('Patient Results')); ?
>
1386 <?php
genTreeLink('RTop','lda',xl('Lab Overview')); ?
>
1387 <?php
genTreeLink('RTop','orb',xl('Batch Results')); ?
>
1388 <?php
genTreeLink('RTop','ore',xl('Electronic Reports')); ?
>
1392 $newcrop_user_role=sqlQuery("select newcrop_user_role from users where username='".$_SESSION['authUser']."'");
1393 if($newcrop_user_role['newcrop_user_role'] && $GLOBALS['erx_enable']) { ?
>
1394 <li
><a
class="collapsed" id
="feeimg" ><span
><?php
xl('New Crop','e') ?
></span
></a
>
1396 <li
><a
class="collapsed_lv2"><span
><?php
xl('Status','e') ?
></span
></a
>
1398 <?php
genTreeLink('RTop','erx',xl('e-Rx')); ?
>
1399 <?php
//genTreeLink('RTop','err',xl('e-Rx Renewal')); ?>
1400 <?php
genMiscLink('RTop','err','0',xl('e-Rx Renewal'),'eRx.php?page=status'); ?
>
1406 <?php
if (!$disallowed['adm']) { ?
>
1407 <li
><a
class="collapsed" id
="admimg" ><span
><?php
xl('Administration','e') ?
></span
></a
>
1409 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?
>
1410 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?
>
1411 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?
>
1412 <?php
if (acl_check('admin', 'practice' )) genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1414 // Changed the target URL from practice settings -> Practice Settings - Pharmacy... Dec 09,09 .. Visolve ... This replaces empty frame with Pharmacy window
1415 if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings&pharmacy&action=list'); ?
>
1416 <?php
if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?
>
1417 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?
>
1418 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?
>
1419 <?php
if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?
>
1420 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?
>
1421 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?
>
1422 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Rules'),'super/rules/index.php?action=browse!list'); ?
>
1423 <?php
if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Alerts'),'super/rules/index.php?action=alerts!listactmgr'); ?
>
1424 <?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='); ?
>
1425 <?php
if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?
>
1426 <?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'); ?
>
1427 <?php
if (acl_check('admin', 'super') && !empty($GLOBALS['code_types']['IPPF'])) genMiscLink('RTop','adm','0',xl('Export'),'main/ippf_export.php'); ?
>
1428 <li
><a
class="collapsed_lv2"><span
><?php
xl('Other','e') ?
></span
></a
>
1430 <?php
if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?
>
1431 <?php
if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?
>
1432 <?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'); ?
>
1433 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?
>
1435 if($newcrop_user_role['newcrop_user_role'] ||
$GLOBALS['erx_enable']) {
1436 if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('eRx Logs'),'logview/erx_logview.php');
1439 <?php
if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?
>
1440 <?php
if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?
>
1441 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Native Data Loads'),'../interface/super/load_codes.php'); ?
>
1442 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('External Data Loads'),'../interface/code_systems/dataloads_ajax.php'); ?
>
1443 <?php
if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Merge Patients'),'patient_file/merge_patients.php'); ?
>
1449 <li
><a
class="collapsed" id
="repimg" ><span
><?php
xl('Reports','e') ?
></span
></a
>
1452 $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
1453 obj_name=enabled_hooks AND ms.mod_id=msh.mod_id LEFT OUTER JOIN modules AS m ON m.mod_id=ms.mod_id
1454 WHERE fld_type=3 AND mod_active=1 AND sql_run=1 AND attached_to='reports' ORDER BY mod_id");
1455 if (sqlNumRows($module_query)) {
1458 while ($modulerow = sqlFetchArray($module_query)) {
1461 if($modulerow['type'] == 0) {
1462 $modulePath = $GLOBALS['customModDir'];
1467 $modulePath = $GLOBALS['zendModDir'];
1470 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$modulerow['path'];
1471 $mod_nick_name = $modulerow['menu_name'] ?
$modulerow['menu_name'] : 'NoName';
1473 if($jid==0 ||
($modid!=$modulerow['mod_id'])){
1477 <li
><a
class="collapsed_lv2"><span
><?php
echo xlt($modulerow['mod_ui_name']); ?
></span
></a
>
1482 $modid = $modulerow['mod_id'];
1483 genMiscLink('RTop','adm','0',xlt($mod_nick_name),$relative_link);
1487 <li
><a
class="collapsed_lv2"><span
><?php
xl('Clients','e') ?
></span
></a
>
1489 <?php
genMiscLink('RTop','rep','0',xl('List'),'reports/patient_list.php'); ?
>
1490 <?php
if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genMiscLink('RTop','rep','0',xl('Rx'),'reports/prescriptions_report.php'); ?
>
1491 <?php
if (acl_check('patients', 'med')) genMiscLink('RTop','rep','0',xl('Clinical'),'reports/clinical_reports.php'); ?
>
1492 <?php
genMiscLink('RTop','rep','0',xl('Referrals'),'reports/referrals_report.php'); ?
>
1493 <?php
genMiscLink('RTop','rep','0',xl('Immunization Registry'),'reports/immunization_report.php'); ?
>
1496 <li
><a
class="collapsed_lv2"><span
><?php
xl('Clinic','e') ?
></span
></a
>
1498 <?php
if ($GLOBALS['enable_cdr'] ||
$GLOBALS['enable_cqm'] ||
$GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Report Results'),'reports/report_results.php'); ?
>
1499 <?php
if ($GLOBALS['enable_cdr']) genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?
>
1500 <?php
if ($GLOBALS['enable_cqm']) genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?
>
1501 <?php
if ($GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?
>
1502 <?php
if ($GLOBALS['enable_amc_tracking']) genMiscLink('RTop','rep','0',xl('AMC Tracking'),'reports/amc_tracking.php'); ?
>
1505 <li
><a
class="collapsed_lv2"><span
><?php
xl('Visits','e') ?
></span
></a
>
1507 <?php
if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appointments'),'reports/appointments_report.php'); ?
>
1508 <?php
genMiscLink('RTop','rep','0',xl('Encounters'),'reports/encounters_report.php'); ?
>
1509 <?php
if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appt-Enc'),'reports/appt_encounter_report.php'); ?
>
1510 <?php
if (empty($GLOBALS['code_types']['IPPF'])) { ?
>
1511 <?php
genMiscLink('RTop','rep','0',xl('Superbill'),'reports/custom_report_range.php'); ?
>
1513 <?php
genMiscLink('RTop','rep','0',xl('Eligibility'),'reports/edi_270.php'); ?
>
1514 <?php
genMiscLink('RTop','rep','0',xl('Eligibility Response'),'reports/edi_271.php'); ?
>
1517 <?php
if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Chart Activity'),'reports/chart_location_activity.php'); ?
>
1518 <?php
if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Charts Out'),'reports/charts_checked_out.php'); ?
>
1519 <?php
genMiscLink('RTop','rep','0',xl('Services'), 'reports/services_by_category.php'); ?
>
1520 <?php
genMiscLink('RTop','rep','0',xl('Syndromic Surveillance'),'reports/non_reported.php'); ?
>
1523 <?php
if (acl_check('acct', 'rep_a')) { ?
>
1524 <li
><a
class="collapsed_lv2"><span
><?php
xl('Financial','e') ?
></span
></a
>
1526 <?php
genMiscLink('RTop','rep','0',xl('Sales'),'reports/sales_by_item.php'); ?
>
1527 <?php
genMiscLink('RTop','rep','0',xl('Cash Rec'), 'billing/sl_receipts_report.php'); ?
>
1528 <?php
genMiscLink('RTop','rep','0',xl('Front Rec'), 'reports/front_receipts_report.php'); ?
>
1529 <?php
genMiscLink('RTop','rep','0',xl('Pmt Method'), 'reports/receipts_by_method_report.php'); ?
>
1530 <?php
genMiscLink('RTop','rep','0',xl('Collections'), 'reports/collections_report.php'); ?
>
1531 <?php
genMiscLink('RTop','rep','0',xl('Financial Summary by Service Code'),'reports/svc_code_financial_report.php'); ?
>
1535 <?php
if ($GLOBALS['inhouse_pharmacy']) { ?
>
1536 <li
><a
class="collapsed_lv2"><span
><?php
xl('Inventory','e') ?
></span
></a
>
1538 <?php
genMiscLink('RTop','rep','0',xl('List'),'reports/inventory_list.php'); ?
>
1539 <?php
genMiscLink('RTop','rep','0',xl('Activity'),'reports/inventory_activity.php'); ?
>
1540 <?php
genMiscLink('RTop','rep','0',xl('Transactions'),'reports/inventory_transactions.php'); ?
>
1544 <li
><a
class="collapsed_lv2"><span
><?php
xl('Procedures','e') ?
></span
></a
>
1546 <?php
genPopLink(xl('Pending Res'),'../orders/pending_orders.php'); ?
>
1547 <?php
if (!empty($GLOBALS['code_types']['IPPF'])) genPopLink(xl('Pending F/U'),'../orders/pending_followup.php'); ?
>
1548 <?php
genPopLink(xl('Statistics'),'../orders/procedure_stats.php'); ?
>
1551 <?php
if (! $GLOBALS['simplified_demographics']) { ?
>
1552 <li
><a
class="collapsed_lv2"><span
><?php
xl('Insurance','e') ?
></span
></a
>
1554 <?php
genMiscLink('RTop','rep','0',xl('Distribution'),'reports/insurance_allocation_report.php'); ?
>
1555 <?php
genMiscLink('RTop','rep','0',xl('Indigents'),'billing/indigent_patients_report.php'); ?
>
1556 <?php
genMiscLink('RTop','rep','0',xl('Unique SP'),'reports/unique_seen_patients_report.php'); ?
>
1560 <?php
if (!empty($GLOBALS['code_types']['IPPF'])) { ?
>
1561 <li
><a
class="collapsed_lv2"><span
><?php
xl('Statistics','e') ?
></span
></a
>
1563 <?php
genPopLink(xl('IPPF Stats'),'ippf_statistics.php?t=i'); ?
>
1564 <?php
genPopLink(xl('GCAC Stats'),'ippf_statistics.php?t=g'); ?
>
1565 <?php
genPopLink(xl('MA Stats'),'ippf_statistics.php?t=m'); ?
>
1566 <?php
genPopLink(xl('CYP'),'ippf_cyp_report.php'); ?
>
1567 <?php
genPopLink(xl('Daily Record'),'ippf_daily.php'); ?
>
1570 <?php
} // end ippf-specific ?>
1571 <li
><a
class="collapsed_lv2"><span
><?php
xl('Blank Forms','e') ?
></span
></a
>
1573 <?php
genPopLink(xl('Demographics'),'../patient_file/summary/demographics_print.php'); ?
>
1574 <?php
genPopLink(xl('Superbill/Fee Sheet'),'../patient_file/printed_fee_sheet.php'); ?
>
1575 <?php
genPopLink(xl('Referral'),'../patient_file/transaction/print_referral.php'); ?
>
1577 $lres = sqlStatement("SELECT * FROM list_options " .
1578 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
1579 while ($lrow = sqlFetchArray($lres)) {
1580 $option_id = $lrow['option_id']; // should start with LBF
1581 $title = $lrow['title'];
1582 genPopLink($title, "../forms/LBF/printable.php?formname=$option_id");
1587 <?php
if (acl_check('admin','super')) { ?
>
1588 <li
><a
class="collapsed_lv2"><span
><?php
echo xlt('Services') ?
></span
></a
>
1590 <?php
genMiscLink('RTop','rep','0',xl('Background Services'),'reports/background_services.php'); ?
>
1591 <?php
genMiscLink('RTop','rep','0',xl('Direct Message Log'),'reports/direct_message_log.php'); ?
>
1596 <?php
// genTreeLink('RTop','rep','Other'); ?>
1599 <li
><a
class="collapsed" id
="misimg" ><span
><?php
xl('Miscellaneous','e') ?
></span
></a
>
1601 <?php
genTreeLink('RTop','ped',xl('Patient Education')); ?
>
1602 <?php
genTreeLink('RBot','aun',xl('Authorizations')); ?
>
1603 <?php
genTreeLink('RTop','fax',xl('Fax/Scan')); ?
>
1604 <?php
genTreeLink('RTop','adb',xl('Addr Book')); ?
>
1605 <?php
genTreeLink('RTop','ort',xl('Order Catalog')); ?
>
1606 <?php
if (!$GLOBALS['disable_chart_tracker']) genTreeLink('RTop','cht',xl('Chart Tracker')); ?
>
1607 <?php
genTreeLink('RTop','ono',xl('Ofc Notes')); ?
>
1608 <?php
genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?
>
1609 <?php
$myrow = sqlQuery("SELECT state FROM registry WHERE directory = 'track_anything'");
1610 if($myrow['state']=='1') { genTreeLink('RTop','tan',xl('Configure Tracks')); } ?
>
1611 <?php
genTreeLink('RTop','pwd',xl('Password')); ?
>
1612 <?php
genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?
>
1613 <?php
if(acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=00'); ?
>
1614 <?php
if (acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('Document Templates'),'super/manage_document_templates.php'); ?
>
1618 <?php
} // end not athletic team ?>
1622 <?php
} else { // end ($GLOBALS['concurrent_layout'] == 2 || $GLOBALS['concurrent_layout'] == 3) ?>
1624 <table cellpadding
='0' cellspacing
='0' border
='0'>
1627 <table cellpadding
='0' cellspacing
='0' border
='0' width
='100%'>
1629 <td
class='smalltext' nowrap
>
1630 <input type
='checkbox' name
='cb_top' onclick
='toggleFrame(1)' checked
/><b
><?php
xl('Top','e') ?
></b
>
1632 <td
class='smalltext' align
='right' nowrap
>
1633 <b
><?php
xl('Bot','e') ?
></b
><input type
='checkbox' name
='cb_bot' onclick
='toggleFrame(2)' checked
/>
1640 // Builds the table of radio buttons and their labels. Radio button values
1641 // are comprised of the 3-character document id and the 1-digit usage type,
1642 // so that JavaScript can easily access this information.
1643 $default_top_rbid = $GLOBALS['athletic_team'] ?
'ros' : 'cal';
1644 foreach ($primary_docs as $key => $varr) {
1645 if (!empty($disallowed[$key])) continue;
1650 echo " <td class='smalltext'><input type='radio' name='rb_top' value='$key$usage' " .
1651 "onclick=\"loadFrame('$key$usage','RTop','$url')\"";
1652 if ($key == $default_top_rbid) echo " checked";
1654 echo " <td class='smalltext' id='lbl_$key'>$label</td>\n";
1655 echo " <td class='smalltext'><input type='radio' name='rb_bot' value='$key$usage' " .
1656 "onclick=\"loadFrame('$key$usage','RBot','$url')\"";
1657 if ($key == 'msg') echo " checked";
1669 // To use RelayHealth, see comments and parameters in includes/config.php.
1670 if (!empty($GLOBALS['ssi']['rh'])) {
1671 include_once("../../library/ssi.inc");
1672 echo getRelayHealthLink() ."<br /><hr />\n";
1676 <div id
='current_patient' style
= 'display:none'>
1677 <b
><?php
xl('None','e'); ?
></b
>
1680 <div id
='current_encounter' style
= 'display:none'>
1681 <b
><?php
xl('None','e'); ?
></b
>
1685 if (!$GLOBALS['athletic_team']) {
1693 <?php
if (!empty($GLOBALS['online_support_link'])) { ?
>
1694 <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
>
1697 <input type
='hidden' name
='findBy' value
='Last' />
1698 <input type
="hidden" name
="searchFields" id
="searchFields"/>
1699 <input type
="hidden" name
="search_service_code" value
='' />
1703 <script language
='JavaScript'>