Implement direct message receive and background services manager, take 1.
[openemr.git] / interface / main / left_nav.php
blob99b2a602252fed7014c07016c592873dcbbab092
1 <?php
2 // Copyright (C) 2006-2012 Rod Roark <rod@sunsetsystems.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 // This provides the left navigation frame when $GLOBALS['concurrent_layout']
10 // is true. Following are notes as to what else was changed for this feature:
12 // * interface/main/main_screen.php: the top-level frameset.
13 // * interface/main/finder/patient_select.php: loads stuff when a new patient
14 // is selected.
15 // * interface/patient_file/summary/demographics.php: this is the first frame
16 // loaded when a new patient is chosen, and in turn sets the current pid and
17 // then loads the initial bottom frame.
18 // * interface/patient_file/summary/demographics_full.php: added support for
19 // setting a new pid, needed for going to demographics from billing.
20 // * interface/patient_file/summary/demographics_save.php: redisplay
21 // demographics.php and not the frameset.
22 // * interface/patient_file/summary/summary_bottom.php: new frameset for the
23 // summary, prescriptions and notes for a selected patient, cloned from
24 // patient_summary.php.
25 // * interface/patient_file/encounter/encounter_bottom.php: new frameset for
26 // the selected encounter, mosting coding/billing stuff, cloned from
27 // patient_encounter.php. This will also self-load the superbill pages
28 // as requested.
29 // * interface/usergroup/user_info.php: removed Back link.
30 // * interface/usergroup/admin_frameset.php: new frameset for Admin pages,
31 // cloned from usergroup.php.
32 // * interface/main/onotes/office_comments.php: removed Back link target.
33 // * interface/main/onotes/office_comments_full.php: changed Back link.
34 // * interface/billing/billing_report.php: removed Back link; added logic
35 // to properly go to demographics or to an encounter when requested.
36 // * interface/new/new.php: removed Back link and revised form target.
37 // * interface/new/new_patient_save.php: modified to load the demographics
38 // page to the current frame instead of loading a new frameset.
39 // * interface/patient_file/history/history.php: target change.
40 // * interface/patient_file/history/history_full.php: target changes.
41 // * interface/patient_file/history/history_save.php: target change.
42 // * interface/patient_file/history/encounters.php: link/target changes.
43 // * interface/patient_file/encounter/encounter_top.php: another new frameset
44 // cloned from patient_encounter.php.
45 // * interface/patient_file/encounter/forms.php: link target removal.
46 // * interface/patient_file/encounter/new_form.php: target change.
47 // * interface/forms/newpatient/new.php, view.php, save.php: link/target
48 // changes.
49 // * interface/patient_file/summary/immunizations.php: removed back link.
50 // * interface/patient_file/summary/pnotes.php: changed link targets.
51 // * interface/patient_file/summary/pnotes_full.php: changed back link and
52 // added set_pid logic.
53 // * interface/patient_file/transaction/transactions.php: various changes.
54 // * interface/patient_file/transaction/add_transaction.php: new return js.
55 // * interface/patient_file/encounter/superbill_codes.php: target and link
56 // changes.
57 // * interface/patient_file/encounter/superbill_custom_full.php: target and
58 // link changes.
59 // * interface/patient_file/encounter/diagnosis.php: target changes.
60 // * interface/patient_file/encounter/diagnosis_full.php: target and link
61 // changes.
62 // * interface/main/authorizations/authorizations.php: link and target changes.
63 // * library/api.inc: url change.
64 // * interface/patient_file/summary/rx_frameset.php: new frameset.
65 // * interface/patient_file/summary/rx_left.php: new for prescriptions.
66 // * all encounter forms: remove all instances of "target=Main" and change
67 // all instances of "patient_encounter.php" to "encounter_top.php".
69 // Our find_patient form, when submitted, invokes patient_select.php in the
70 // upper frame. When the patient is selected, demographics.php is invoked
71 // with the set_pid parameter, which establishes the new session pid and also
72 // calls the setPatient() function (below). In this case demographics.php
73 // will also load the summary frameset into the bottom frame, invoking our
74 // loadFrame() and setRadio() functions.
76 // Similarly, we have the concept of selecting an encounter from the
77 // Encounters list, and then having that "stick" until some other encounter
78 // or a new encounter is chosen. We also have a navigation item for creating
79 // a new encounter. interface/patient_file/encounter/encounter_top.php
80 // supports set_encounter to establish an encounter.
82 // TBD: Include active_pid and/or active_encounter in relevant submitted
83 // form data, and add logic to the save routines to make sure they match
84 // the corresponding session values.
86 require_once("../globals.php");
87 require_once($GLOBALS['fileroot']."/library/acl.inc");
88 require_once($GLOBALS['fileroot']."/custom/code_types.inc.php");
89 require_once($GLOBALS['fileroot']."/library/patient.inc");
90 require_once($GLOBALS['fileroot']."/library/lists.inc");
92 // This array defines the list of primary documents that may be
93 // chosen. Each element value is an array of 3 values:
95 // * Name to appear in the navigation table
96 // * Usage: 0 = global, 1 = patient-specific, 2 = encounter-specific
97 // * The URL relative to the interface directory
100 $primary_docs = array(
101 'ros' => array(xl('Roster') , 0, 'reports/players_report.php?embed=1'),
102 'cal' => array(xl('Calendar') , 0, 'main/main_info.php'),
103 'app' => array(xl('Portal Activity') , 0, '../myportal/index.php'),
104 'msg' => array(xl('Messages') , 0, 'main/messages/messages.php?form_active=1'),
105 'pwd' => array(xl('Password') , 0, 'usergroup/user_info.php'),
106 'prf' => array(xl('Preferences') , 0, 'super/edit_globals.php?mode=user'),
107 'adm' => array(xl('Admin') , 0, 'usergroup/admin_frameset.php'),
108 'rep' => array(xl('Reports') , 0, 'reports/index.php'),
109 'ono' => array(xl('Ofc Notes') , 0, 'main/onotes/office_comments.php'),
110 'fax' => array(xl('Fax/Scan') , 0, 'fax/faxq.php'),
111 'adb' => array(xl('Addr Bk') , 0, 'usergroup/addrbook_list.php'),
112 'orl' => array(xl('Proc Prov') , 0, 'orders/procedure_provider_list.php'),
113 'ort' => array(xl('Proc Cat') , 0, 'orders/types.php'),
114 'orc' => array(xl('Proc Load') , 0, 'orders/load_compendium.php'),
115 'orb' => array(xl('Proc Bat') , 0, 'orders/orders_results.php?batch=1'),
116 'ore' => array(xl('E-Reports') , 0, 'orders/list_reports.php'),
117 'cht' => array(xl('Chart Trk') , 0, '../custom/chart_tracker.php'),
118 'imp' => array(xl('Import') , 0, '../custom/import.php'),
119 'bil' => array(xl('Billing') , 0, 'billing/billing_report.php'),
120 'sup' => array(xl('Superbill') , 0, 'patient_file/encounter/superbill_custom_full.php'),
121 'aun' => array(xl('Authorizations'), 0, 'main/authorizations/authorizations.php'),
122 'new' => array(xl('New Pt') , 0, 'new/new.php'),
123 'ped' => array(xl('Patient Education'), 0, 'reports/patient_edu_web_lookup.php'),
124 'lab' => array(xl('Check Lab Results') , 0, 'orders/lab_exchange.php'),
125 'dem' => array(xl('Patient') , 1, "patient_file/summary/demographics.php"),
126 'his' => array(xl('History') , 1, 'patient_file/history/history.php'),
127 'ens' => array(xl('Visit History'), 1, 'patient_file/history/encounters.php'),
128 'nen' => array(xl('Create Visit'), 1, 'forms/newpatient/new.php?autoloaded=1&calenc='),
129 'pre' => array(xl('Rx') , 1, 'patient_file/summary/rx_frameset.php'),
130 'iss' => array(xl('Issues') , 1, 'patient_file/summary/stats_full.php?active=all'),
131 'imm' => array(xl('Immunize') , 1, 'patient_file/summary/immunizations.php'),
132 'doc' => array(xl('Documents') , 1, '../controller.php?document&list&patient_id={PID}'),
133 'orp' => array(xl('Proc Pending Rev'), 1, 'orders/orders_results.php?review=1'),
134 'orr' => array(xl('Proc Res') , 1, 'orders/orders_results.php'),
135 'prp' => array(xl('Pt Report') , 1, 'patient_file/report/patient_report.php'),
136 'prq' => array(xl('Pt Rec Request') , 1, 'patient_file/transaction/record_request.php'),
137 'pno' => array(xl('Pt Notes') , 1, 'patient_file/summary/pnotes.php'),
138 'tra' => array(xl('Transact') , 1, 'patient_file/transaction/transactions.php'),
139 'sum' => array(xl('Summary') , 1, 'patient_file/summary/summary_bottom.php'),
140 'enc' => array(xl('Encounter') , 2, 'patient_file/encounter/encounter_top.php'),
141 'erx' => array(xl('e-Rx') , 1, 'eRx.php'),
142 'err' => array(xl('e-Rx Renewal') , 1, 'eRx.php?page=status'),
143 'pay' => array(xl('Payment') , 1, '../patient_file/front_payment.php'),
144 'edi' => array(xl('EDI History') , 0, 'billing/edih_view.php')
146 $primary_docs['npa']=array(xl('Batch Payments') , 0, 'billing/new_payment.php');
147 if ($GLOBALS['use_charges_panel'] || $GLOBALS['concurrent_layout'] == 2) {
148 $primary_docs['cod'] = array(xl('Charges'), 2, 'patient_file/encounter/encounter_bottom.php');
151 // This section decides which navigation items will not appear.
153 $disallowed = array();
154 $disallowed['edi'] = !($GLOBALS['enable_edihistory_in_left_menu'] || acl_check('acct', 'eob'));
155 $disallowed['adm'] = !(acl_check('admin', 'calendar') ||
156 acl_check('admin', 'database') || acl_check('admin', 'forms') ||
157 acl_check('admin', 'practice') || acl_check('admin', 'users') ||
158 acl_check('admin', 'acl') || acl_check('admin', 'super') ||
159 acl_check('admin', 'superbill'));
161 $disallowed['bil'] = !(acl_check('acct', 'rep') || acl_check('acct', 'eob') ||
162 acl_check('acct', 'bill'));
164 $disallowed['new'] = !(acl_check('patients','demo','',array('write','addonly') ));
166 $disallowed['fax'] = !($GLOBALS['enable_hylafax'] || $GLOBALS['enable_scanner']);
168 $disallowed['ros'] = !$GLOBALS['athletic_team'];
170 $disallowed['iss'] = !((acl_check('encounters','notes','','write') ||
171 acl_check('encounters','notes_a','','write') ) &&
172 acl_check('patients','med','','write') );
174 $disallowed['imp'] = $disallowed['new'] ||
175 !is_readable("$webserver_root/custom/import.php");
177 $disallowed['cht'] = !is_readable("$webserver_root/custom/chart_tracker.php");
179 $disallowed['pre'] = !(acl_check('patients', 'med'));
181 // Helper functions for treeview generation.
182 function genTreeLink($frame, $name, $title, $mono=false) {
183 global $primary_docs, $disallowed;
184 if (empty($disallowed[$name])) {
185 $id = $name . $primary_docs[$name][1];
186 echo "<li><a href='' id='$id' onclick=\"";
187 if ($mono) {
188 if ($frame == 'RTop')
189 echo "forceSpec(true,false);";
190 else
191 echo "forceSpec(false,true);";
193 echo "return loadFrame2('$id','$frame','" .
194 $primary_docs[$name][2] . "')\">" . $title . ($name == 'msg' ? ' <span id="reminderCountSpan" class="bold"></span>' : '')."</a></li>";
197 function genMiscLink($frame, $name, $level, $title, $url, $mono=false) {
198 global $disallowed;
199 if (empty($disallowed[$name])) {
200 $id = $name . $level;
201 echo "<li><a href='' id='$id' onclick=\"";
202 if ($mono) {
203 if ($frame == 'RTop')
204 echo "forceSpec(true,false);";
205 else
206 echo "forceSpec(false,true);";
208 echo "return loadFrame2('$id','$frame','" .
209 $url . "')\">" . $title . "</a></li>";
212 function genPopLink($title, $url, $linkid='') {
213 echo "<li><a href='' ";
214 if ($linkid) echo "id='$linkid' ";
215 echo "onclick=\"return repPopup('$url')\"" .
216 ">" . $title . "</a></li>";
218 function genDualLink($topname, $botname, $title) {
219 global $primary_docs, $disallowed;
220 if (empty($disallowed[$topname]) && empty($disallowed[$botname])) {
221 $topid = $topname . $primary_docs[$topname][1];
222 $botid = $botname . $primary_docs[$botname][1];
223 echo "<li><a href='' id='$topid' " .
224 "onclick=\"return loadFrameDual('$topid','$botid','" .
225 $primary_docs[$topname][2] . "','" .
226 $primary_docs[$botname][2] . "')\">" . $title . "</a></li>";
230 function genPopupsList($style='') {
231 global $disallowed, $webserver_root;
233 <select name='popups' onchange='selpopup(this)' style='background-color:transparent;font-size:9pt;<?php echo $style; ?>'>
234 <option value=''><?php xl('Popups','e'); ?></option>
235 <?php if (!$disallowed['iss']) { ?>
236 <option value='../patient_file/problem_encounter.php'><?php xl('Issues','e'); ?></option>
237 <?php } ?>
238 <?php if (!$GLOBALS['ippf_specific']) { ?>
239 <option value='../../custom/export_xml.php'><?php xl('Export','e'); ?></option>
240 <option value='../../custom/import_xml.php'><?php xl('Import','e'); ?></option>
241 <?php } ?>
242 <?php if ($GLOBALS['athletic_team']) { ?>
243 <option value='../reports/players_report.php'><?php xl('Roster','e'); ?></option>
244 <?php } ;
245 if (!$GLOBALS['disable_calendar']) { ?>
246 <option value='../reports/appointments_report.php?patient=<?php if(isset($pid)) {echo $pid;} ?>'><?php xl('Appts','e'); ?></option>
247 <?php } ;
248 if (file_exists("$webserver_root/custom/refer.php")) { ?>
249 <option value='../../custom/refer.php'><?php xl('Refer','e'); ?></option>
250 <?php } ?>
251 <option value='../patient_file/printed_fee_sheet.php?fill=1'><?php xl('Superbill','e'); ?></option>
252 <option value='../patient_file/front_payment.php'><?php xl('Payment','e'); ?></option>
253 <?php if ($GLOBALS['inhouse_pharmacy']) { ?>
254 <option value='../patient_file/pos_checkout.php'><?php xl('Checkout','e'); ?></option>
255 <?php } ?>
256 <?php if (is_dir($GLOBALS['OE_SITE_DIR'] . "/letter_templates")) { ?>
257 <option value='../patient_file/letter.php'><?php xl('Letter','e'); ?></option>
258 <?php } ?>
259 </select>
260 <?php
263 function genFindBlock() {
265 <table cellpadding='0' cellspacing='0' border='0'>
266 <tr>
267 <td class='smalltext'><?php xl('Find','e') ?>:&nbsp;</td>
268 <td class='smalltext' colspan='2'>
269 <input type="entry" size="7" name="patient" class='inputtext' style='width:65px;' />
270 </td>
271 </tr>
272 <tr>
273 <td class='smalltext'><?php xl('by','e') ?>:</td>
274 <td class='smalltext'>
275 <a href="javascript:findPatient('Last');" class="navitem"><?php xl('Name','e'); ?></a>
276 </td>
277 <td class='smalltext' align='right'>
278 <a href="javascript:findPatient('ID');" class="navitem"><?php xl('ID','e'); ?></a>
279 </td>
280 </tr>
281 <tr>
282 <td class='smalltext'>&nbsp;</td>
283 <td class='smalltext'>
284 <a href="javascript:findPatient('SSN');" class="navitem"><?php xl('SSN','e'); ?></a>
285 </td>
286 <td class='smalltext' align='right'>
287 <a href="javascript:findPatient('DOB');" class="navitem"><?php xl('DOB','e'); ?></a>
288 </td>
289 </tr>
290 <tr>
291 <td class='smalltext'>&nbsp;</td>
292 <td class='smalltext'>
293 <a href="javascript:findPatient('Any');" class="navitem"><?php xl('Any', 'e'); ?></a>
294 </td>
295 <td class='smalltext' align='right'>
296 <a href="javascript:initFilter();" class="navitem"><?php xl('Filter', 'e'); ?></a>
297 </td>
298 </tr>
299 </table>
300 <?php
301 } // End function genFindBlock()
304 <html>
305 <head>
306 <title>Navigation</title>
307 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
309 <style type="text/css">
310 body {
311 font-size:8pt;
312 font-weight:normal;
313 padding: 5px 3px 5px 3px;
315 .smalltext {
316 font-family:sans-serif;
317 font-size:8pt;
318 font-weight:normal;
320 a.navitem, a.navitem:visited {
321 color:#0000ff;
322 font-family:sans-serif;
323 font-size:8pt;
324 font-weight:bold;
326 .inputtext {
327 font-size:9pt;
328 font-weight:normal;
329 border-style:solid;
330 border-width:1px;
331 padding-left:2px;
332 padding-right:2px;
333 border-color: #000000;
334 background-color:transparent;
337 #navigation ul {
338 background-color:transparent;
340 #navigation-slide ul {
341 background-color:transparent;
343 #navigation-slide a{
344 width: 92%;
346 .nav-menu-img{
347 width:25px;
348 height:25px;
349 border:none;
350 margin-right:5px;
351 vertical-align:middle;
353 </style>
355 <link rel="stylesheet" href="../../library/js/jquery.treeview-1.4.1/jquery.treeview.css" />
356 <script src="../../library/js/jquery-1.6.4.min.js" type="text/javascript"></script>
357 <script src="../../library/js/jquery.treeview-1.4.1/jquery.treeview.js" type="text/javascript"></script>
359 <script type="text/javascript" src="../../library/dialog.js"></script>
361 <script language='JavaScript'>
363 // tajemo work by CB 2012/01/31 12:32:57 PM dated reminders counter
364 function getReminderCount(){
365 top.restoreSession();
366 // Send the skip_timeout_reset parameter to not count this as a manual entry in the
367 // timing out mechanism in OpenEMR.
368 $.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
369 { skip_timeout_reset: "1" },
370 function(data) {
371 $("#reminderCountSpan").html(data);
372 // run updater every 60 seconds
373 var repeater = setTimeout("getReminderCount()", 60000);
375 //piggy-back on this repeater to run other background-services
376 //this is a silent task manager that returns no output
377 $.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/execute_background_services.php",
378 { skip_timeout_reset: "1", ajax: "1" });
381 $(document).ready(function (){
382 getReminderCount();//
383 parent.loadedFrameCount += 1;
385 // end of tajemo work dated reminders counter
387 // Master values for current pid and encounter.
388 var active_pid = 0;
389 var active_encounter = 0;
391 // Current selections in the top and bottom frames.
392 var topName = '';
393 var botName = '';
395 // Expand and/or collapse frames in response to checkbox clicks.
396 // fnum indicates which checkbox was clicked (1=left, 2=right).
397 function toggleFrame(fnum) {
398 var f = document.forms[0];
399 var fset = top.document.getElementById('fsright');
400 if (!f.cb_top.checked && !f.cb_bot.checked) {
401 if (fnum == 1) f.cb_bot.checked = true;
402 else f.cb_top.checked = true;
404 var rows = f.cb_top.checked ? '*' : '0';
405 rows += f.cb_bot.checked ? ',*' : ',0';
406 fset.rows = rows;
407 fset.rows = rows;
410 // Load the specified url into the specified frame (RTop or RBot).
411 // The URL provided must be relative to interface.
412 function loadFrame(fname, frame, url) {
413 top.restoreSession();
414 var i = url.indexOf('{PID}');
415 if (i >= 0) url = url.substring(0,i) + active_pid + url.substring(i+5);
416 top.frames[frame].location = '<?php echo "$web_root/interface/" ?>' + url;
417 if (frame == 'RTop') topName = fname; else botName = fname;
420 // Load the specified url into a frame to be determined, with the specified
421 // frame as the default; the url must be relative to interface.
422 function loadFrame2(fname, frame, url) {
423 var usage = fname.substring(3);
424 if (active_pid == 0 && usage > '0') {
425 alert('<?php xl('You must first select or add a patient.','e') ?>');
426 return false;
428 if (active_encounter == 0 && usage > '1') {
429 alert('<?php xl('You must first select or create an encounter.','e') ?>');
430 return false;
432 var f = document.forms[0];
433 top.restoreSession();
434 var i = url.indexOf('{PID}');
435 if (i >= 0) url = url.substring(0,i) + active_pid + url.substring(i+5);
436 if(f.sel_frame)
438 var fi = f.sel_frame.selectedIndex;
439 if (fi == 1) frame = 'RTop'; else if (fi == 2) frame = 'RBot';
441 if (!f.cb_bot.checked) frame = 'RTop'; else if (!f.cb_top.checked) frame = 'RBot';
442 top.frames[frame].location = '<?php echo "$web_root/interface/" ?>' + url;
443 if (frame == 'RTop') topName = fname; else botName = fname;
444 return false;
447 // Make sure the the top and bottom frames are open or closed, as specified.
448 function forceSpec(istop, isbot) {
449 var f = document.forms[0];
450 if (f.cb_top.checked != istop) {
451 f.cb_top.checked = istop;
452 toggleFrame(1);
454 if (f.cb_bot.checked != isbot) {
455 f.cb_bot.checked = isbot;
456 toggleFrame(2);
460 // Make sure both frames are open.
461 function forceDual() {
462 forceSpec(true, true);
465 // Load the specified url into a frame to be determined, with the specified
466 // frame as the default; the url must be relative to interface.
467 function loadFrameDual(tname, bname, topurl, boturl) {
468 var topusage = tname.substring(3);
469 var botusage = bname.substring(3);
470 if (active_pid == 0 && (topusage > '0' || botusage > '0')) {
471 alert('<?php xl('You must first select or add a patient.','e') ?>');
472 return false;
474 if (active_encounter == 0 && (topusage > '1' || botusage > '1')) {
475 alert('<?php xl('You must first select or create an encounter.','e') ?>');
476 return false;
478 var f = document.forms[0];
479 forceDual();
480 top.restoreSession();
481 var i = topurl.indexOf('{PID}');
482 if (i >= 0) topurl = topurl.substring(0,i) + active_pid + topurl.substring(i+5);
483 i = boturl.indexOf('{PID}');
484 if (i >= 0) boturl = boturl.substring(0,i) + active_pid + boturl.substring(i+5);
485 top.frames.RTop.location = '<?php echo "$web_root/interface/" ?>' + topurl;
486 top.frames.RBot.location = '<?php echo "$web_root/interface/" ?>' + boturl;
487 topName = tname;
488 botName = bname;
489 return false;
492 // Select a designated radio button. raname may be either the radio button
493 // array name (rb_top or rb_bot), or the frame name (RTop or RBot).
494 // You should call this if you directly load a document that does not
495 // correspond to the current radio button setting.
496 function setRadio(raname, rbid) {
497 <?php if ($GLOBALS['concurrent_layout'] < 2) { ?>
498 var f = document.forms[0];
499 if (raname == 'RTop') raname = 'rb_top';
500 if (raname == 'RBot') raname = 'rb_bot';
501 for (var i = 0; i < f[raname].length; ++i) {
502 if (f[raname][i].value.substring(0,3) == rbid) {
503 f[raname][i].checked = true;
504 return true;
507 <?php } ?>
508 return false;
511 // Set disabled/enabled state of radio buttons and associated labels
512 // depending on whether there is an active patient or encounter.
513 function syncRadios() {
514 var f = document.forms[0];
515 <?php if (($GLOBALS['concurrent_layout'] == 2)||($GLOBALS['concurrent_layout'] == 3)) { ?>
516 var nlinks = document.links.length;
517 for (var i = 0; i < nlinks; ++i) {
518 var lnk = document.links[i];
519 if (lnk.id.length != 4) continue;
520 var usage = lnk.id.substring(3);
521 if (usage == '1' || usage == '2') {
522 var da = false;
523 if (active_pid == 0) da = true;
524 if (active_encounter == 0 && usage > '1') da = true;
525 <?php
526 if ($GLOBALS['concurrent_layout'] == 2){
527 $color = "'#0000ff'";
528 }else{
529 $color = "'#000000'";
532 lnk.style.color = da ? '#888888' : <?php echo $color; ?>;
535 <?php } else if ($GLOBALS['concurrent_layout'] < 2) { ?>
536 for (var i = 0; i < f.rb_top.length; ++i) {
537 var da = false;
538 var rb1 = f.rb_top[i];
539 var rb2 = f.rb_bot[i];
540 var rbid = rb1.value.substring(0,3);
541 var usage = rb1.value.substring(3);
542 if (active_pid == 0 && usage > '0') da = true;
543 if (active_encounter == 0 && usage > '1') da = true;
544 // daemon_frame can also set special label colors, so don't mess with
545 // them unless we have to.
546 if (rb1.disabled != da) {
547 rb1.disabled = da;
548 rb2.disabled = da;
549 document.getElementById('lbl_' + rbid).style.color = da ? '#888888' : '#000000';
552 <?php } ?>
553 f.popups.disabled = (active_pid == 0);
556 function goHome() {
557 top.frames['RTop'].location='<?php echo $GLOBALS['default_top_pane']?>';
558 top.frames['RBot'].location='messages/messages.php?form_active=1';
561 //Function to clear active patient and encounter in the server side
562 function clearactive() {
563 top.restoreSession();
564 //Ajax call to clear active patient in session
565 $.ajax({
566 type: "POST",
567 url: "<?php echo $GLOBALS['webroot'] ?>/library/ajax/unset_session_ajax.php",
568 data: { func: "unset_pid"},
569 success:function( msg ) {
570 clearPatient();
571 top.frames['RTop'].location='<?php echo $GLOBALS['default_top_pane']?>';
572 top.frames['RBot'].location='messages/messages.php?form_active=1';
576 $(parent.Title.document.getElementById('clear_active')).hide();
578 // Reference to the search.php window.
579 var my_window;
581 // Open the search.php window.
582 function initFilter() {
583 my_window = window.open("../../custom/search.php", "mywindow","status=1");
586 // This is called by the search.php (Filter) window.
587 function processFilter(fieldString, serviceCode) {
588 var f = document.forms[0];
589 document.getElementById('searchFields').value = fieldString;
590 f.search_service_code.value = serviceCode;
591 findPatient("Filter");
592 f.search_service_code.value = '';
593 my_window.close();
596 // Process the click to find a patient by name, id, ssn or dob.
597 function findPatient(findby) {
598 var f = document.forms[0];
599 if (! f.cb_top.checked) {
600 f.cb_top.checked = true;
601 toggleFrame(1);
603 f.findBy.value = findby;
604 setRadio('rb_top', 'dem');
605 top.restoreSession();
606 document.find_patient.submit();
609 // Helper function to set the contents of a div.
610 function setSomeContent(id, content, doc) {
611 if (doc.getElementById) {
612 var x = doc.getElementById(id);
613 x.innerHTML = '';
614 x.innerHTML = content;
616 else if (doc.all) {
617 var x = doc.all[id];
618 x.innerHTML = content;
621 function setDivContent(id, content) {
622 setSomeContent(id, content, document);
624 function setTitleContent(id, content) {
625 setSomeContent(id, content, parent.Title.document);
628 // This is called automatically when a new patient is set, to make sure
629 // there are no patient-specific documents showing stale data. If a frame
630 // was just loaded with data for the correct patient, its name is passed so
631 // that it will not be zapped. At this point the new server-side pid is not
632 // assumed to be set, so this function will only load global data.
633 function reloadPatient(frname) {
634 var f = document.forms[0];
635 if (topName.length > 3 && topName.substring(3) > '0' && frname != 'RTop') {
636 loadFrame('cal0','RTop', '<?php echo $primary_docs['cal'][2]; ?>');
637 setRadio('rb_top', 'cal');
639 if (botName.length > 3 && botName.substring(3) > '0' && frname != 'RBot') {
640 loadFrame('ens0','RBot', '<?php echo $primary_docs['ens'][2]; ?>');
641 setRadio('rb_bot', 'ens');
645 // Reload encounter-specific frames, excluding a specified frame. At this
646 // point the new server-side encounter ID may not be set and loading the same
647 // document for the new encounter will not work, so load patient info instead.
648 function reloadEncounter(frname) {
649 var f = document.forms[0];
650 if (topName.length > 3 && topName.substring(3) > '1' && frname != 'RTop') {
651 loadFrame('dem1','RTop', '<?php echo $primary_docs['dem'][2]; ?>');
652 setRadio('rb_top', 'dem');
654 if (botName.length > 3 && botName.substring(3) > '1' && frname != 'RBot') {
655 loadFrame('ens1','RBot', '<?php echo $primary_docs['ens'][2]; ?>');
656 setRadio('rb_bot', 'ens');
660 // Clear and reload issue-related menu items for active_pid.
661 // Currently this only applies to athletic teams, but might be implemented
662 // in the general menu at some future time.
664 function reloadIssues() {
665 <?php
666 if ($GLOBALS['athletic_team']) {
667 // Generates a menu item for each active issue that this patient
668 // has of each issue type. Each one looks like this:
669 // Onset-Date [Add] Issue-Title
670 // where the first part is a link to open the issue dialog,
671 // [Add] is a link that auto-creates and opens a new encounter, and
672 // Issue-Title is a link that shows related encounters.
673 foreach ($ISSUE_TYPES as $key => $value) {
675 $('#icontainer_<?php echo $key ?>').empty();
676 if (active_pid != 0) {
677 $('#icontainer_<?php echo $key ?>').append("<li>" +
678 "<a href='' id='xxx1' onclick='return repPopup(" +
679 "\"../patient_file/summary/add_edit_issue.php?thistype=" +
680 "<?php echo $key; ?>\")' " +
681 "title='<?php echo xl('Create new issue'); ?>'>" +
682 "<?php echo xl('New') . " " . $value[1]; ?></a></li>");
683 top.restoreSession();
684 $.getScript('../../library/ajax/left_nav_issues_ajax.php?type=<?php echo $key; ?>');
686 <?php
690 } // end function reloadIssues
692 // This is referenced in left_nav_issues_ajax.php and is called when [Add]
693 // is clicked for an issue menu item to add a new encounter for the issue.
694 // So far this only applies to the Athletic Team version of the menu.
696 function addEncNotes(issue) {
698 // top.restoreSession();
699 // $.getScript('../../library/ajax/left_nav_encounter_ajax.php?createvisit=1&issue=' + issue);
701 // The above AJAX call was to create the encounter right away, but we later
702 // (2012-07-03) decided it's better to present the New Encounter form instead.
703 // Note the issue ID is passed so it will be pre-selected in that form.
704 loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=&issue=' + issue);
706 return false;
709 // Call this to announce that the patient has changed. You must call this
710 // if you change the session PID, so that the navigation frame will show the
711 // correct patient and so that the other frame will be reloaded if it contains
712 // patient-specific information from the previous patient. frname is the name
713 // of the frame that the call came from, so we know to only reload content
714 // from the *other* frame if it is patient-specific.
715 function setPatient(pname, pid, pubpid, frname, str_dob) {
716 var str = '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentPatientFromTitle()" title="PID = ' + pid + '"><b>' + pname + ' (' + pubpid + ')<br /></b></a>';
717 setDivContent('current_patient', str);
718 setTitleContent('current_patient', str + str_dob);
719 if (pid == active_pid) return;
720 setDivContent('current_encounter', '<b><?php xl('None','e'); ?></b>');
721 active_pid = pid;
722 active_encounter = 0;
723 if (frname) reloadPatient(frname);
724 syncRadios();
725 $(parent.Title.document.getElementById('current_patient_block')).show();
726 var encounter_block = $(parent.Title.document.getElementById('current_encounter_block'));
727 $(encounter_block).hide();
729 // zero out the encounter frame, replace it with the encounter list frame
730 var f = document.forms[0];
731 if ( f.cb_top.checked && f.cb_bot.checked ) {
732 var encounter_frame = getEncounterTargetFrame('enc');
733 if ( encounter_frame != undefined ) {
734 loadFrame('ens0',encounter_frame, '<?php echo $primary_docs['ens'][2]; ?>');
735 setRadio(encounter_frame, 'ens');
739 reloadIssues(pid);
740 $(parent.Title.document.getElementById('clear_active')).show();//To display Clear Active Patient button on selecting a patient
742 function setPatientEncounter(EncounterIdArray,EncounterDateArray,CalendarCategoryArray) {
743 //This function lists all encounters of the patient.
744 //This function writes the drop down in the top frame.
745 //It is called when a new patient is create/selected from the search menu.
746 var str = '<Select class="text" id="EncounterHistory" onchange="{top.restoreSession();toencounter(this.options[this.selectedIndex].value)}">';
747 str+='<option value=""><?php echo htmlspecialchars( xl('Encounter History'), ENT_QUOTES) ?></option>';
748 str+='<option value="New Encounter"><?php echo htmlspecialchars( xl('New Encounter'), ENT_QUOTES) ?></option>';
749 str+='<option value="Past Encounter List"><?php echo htmlspecialchars( xl('Past Encounter List'), ENT_QUOTES) ?></option>';
750 for(CountEncounter=0;CountEncounter<EncounterDateArray.length;CountEncounter++)
752 str+='<option value="'+EncounterIdArray[CountEncounter]+'~'+EncounterDateArray[CountEncounter]+'">'+EncounterDateArray[CountEncounter]+'-'+CalendarCategoryArray[CountEncounter]+'</option>';
754 str+='</Select>';
755 $(parent.Title.document.getElementById('past_encounter_block')).show();
756 top.window.parent.Title.document.getElementById('past_encounter').innerHTML=str;
759 function loadCurrentPatientFromTitle() {
760 top.frames['RTop'].location='../patient_file/summary/demographics.php';
763 function getEncounterTargetFrame( name ) {
764 var bias = <?php echo $primary_docs[ 'enc' ][ 1 ]?>;
765 var f = document.forms[0];
766 var r = 'RTop';
767 if (f.cb_top.checked && f.cb_bot.checked) {
768 if ( bias == 2 ) {
769 r = 'RBot';
770 } else {
771 r = 'RTop';
773 } else {
774 if ( f.cb_top.checked ) {
775 r = 'RTop';
776 } else if ( f.cb_bot.checked ) {
777 r = 'RBot';
780 return r;
783 // Call this to announce that the encounter has changed. You must call this
784 // if you change the session encounter, so that the navigation frame will
785 // show the correct encounter and so that the other frame will be reloaded if
786 // it contains encounter-specific information from the previous encounter.
787 // frname is the name of the frame that the call came from, so we know to only
788 // reload encounter-specific content from the *other* frame.
789 function setEncounter(edate, eid, frname) {
790 if (eid == active_encounter) return;
791 if (!eid) edate = '<?php xl('None','e'); ?>';
792 var str = '<b>' + edate + '</b>';
793 setDivContent('current_encounter', str);
794 active_encounter = eid;
795 reloadEncounter(frname);
796 syncRadios();
797 var encounter_block = $(parent.Title.document.getElementById('current_encounter_block'));
798 var encounter = $(parent.Title.document.getElementById('current_encounter'));
799 var estr = '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentEncounterFromTitle()"><b>' + edate + ' (' + eid + ')</b></a>';
800 encounter.html( estr );
801 encounter_block.show();
804 function loadCurrentEncounterFromTitle() {
805 top.frames[ parent.left_nav.getEncounterTargetFrame('enc') ].location='../patient_file/encounter/encounter_top.php';
808 // You must call this if you delete the active patient (or if for any other
809 // reason you "close" the active patient without opening a new one), so that
810 // the appearance of the navigation frame will be correct and so that any
811 // stale content will be reloaded.
812 function clearPatient() {
813 if (active_pid == 0) return;
814 var f = document.forms[0];
815 active_pid = 0;
816 active_encounter = 0;
817 setDivContent('current_patient', '<b><?php xl('None','e'); ?></b>');
818 $(parent.Title.document.getElementById('current_patient_block')).hide();
819 top.window.parent.Title.document.getElementById('past_encounter').innerHTML='';
820 $(parent.Title.document.getElementById('current_encounter_block')).hide();
821 reloadPatient('');
822 syncRadios();
825 // You must call this if you delete the active encounter (or if for any other
826 // reason you "close" the active encounter without opening a new one), so that
827 // the appearance of the navigation frame will be correct and so that any
828 // stale content will be reloaded.
829 function clearEncounter() {
830 if (active_encounter == 0) return;
831 top.window.parent.Title.document.getElementById('current_encounter').innerHTML="<b><?php echo htmlspecialchars( xl('None'), ENT_QUOTES) ?></b>";
832 active_encounter = 0;
833 reloadEncounter('');
834 syncRadios();
836 function removeOptionSelected(EncounterId)
837 {//Removes an item from the Encounter drop down.
838 var elSel = top.window.parent.Title.document.getElementById('EncounterHistory');
839 var i;
840 for (i = elSel.length - 1; i>=2; i--) {
841 EncounterHistoryValue=elSel.options[i].value;
842 EncounterHistoryValueArray=EncounterHistoryValue.split('~');
843 if (EncounterHistoryValueArray[0]==EncounterId) {
844 elSel.remove(i);
849 // You can call this to make sure the session pid is what we expect.
850 function pidSanityCheck(pid) {
851 if (pid != active_pid) {
852 alert('Session patient ID is ' + pid + ', expecting ' + active_pid +
853 '. This session is unstable and should be abandoned. Do not use ' +
854 'OpenEMR in multiple browser windows!');
855 return false;
857 return true;
860 // You can call this to make sure the session encounter is what we expect.
861 function encounterSanityCheck(eid) {
862 if (eid != active_encounter) {
863 alert('Session encounter ID is ' + eid + ', expecting ' + active_encounter +
864 '. This session is unstable and should be abandoned. Do not use ' +
865 'OpenEMR in multiple browser windows!');
866 return false;
868 return true;
871 // Pop up a report.
872 function repPopup(aurl) {
873 top.restoreSession();
874 window.open('<?php echo "$web_root/interface/reports/" ?>' + aurl, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
875 return false;
878 // This is invoked to pop up some window when a popup item is selected.
879 function selpopup(selobj) {
880 var i = selobj.selectedIndex;
881 var opt = selobj.options[i];
882 if (i > 0) {
883 var width = 750;
884 var height = 550;
885 if (opt.text == 'Export' || opt.text == 'Import') {
886 width = 500;
887 height = 400;
889 else if (opt.text == 'Refer') {
890 width = 700;
891 height = 500;
893 dlgopen(opt.value, '_blank', width, height);
895 selobj.selectedIndex = 0;
897 // Treeview activation stuff:
898 $(document).ready(function(){
899 if(3 == <?php echo $GLOBALS['concurrent_layout'] ?>){
900 $("#navigation-slide > li > a.collapsed + ul").slideToggle("medium");
901 $("#navigation-slide > li > ul > li > a.collapsed_lv2 + ul").slideToggle("medium");
902 $("#navigation-slide > li > a.expanded").click(function() {
903 $("#navigation-slide > li > a.expanded").not(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
904 $(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
906 $("#navigation-slide > li > a.collapsed").click(function() {
907 $("#navigation-slide > li > a.expanded").not(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
908 $(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
910 $("#navigation-slide > li > ul > li > a.expanded_lv2").click(function() {
911 $("#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");
912 $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
914 $("#navigation-slide > li > ul > li > a.collapsed_lv2").click(function() {
915 $("#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");
916 $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
918 $("#navigation-slide > li > a#cal0").prepend('<img src="../../images/calendar.png" class="nav-menu-img" />');
919 $("#navigation-slide > li > a#msg0").prepend('<img src="../../images/messages.png" class="nav-menu-img" />');
920 $("#navigation-slide > li > a#patimg").prepend('<img src="../../images/patient.png" class="nav-menu-img" />');
921 $("#navigation-slide > li > a#app0").prepend('<img src="../../images/patient.png" class="nav-menu-img" />');
922 $("#navigation-slide > li > a#repimg").prepend('<img src="../../images/reports.png" class="nav-menu-img" />');
923 $("#navigation-slide > li > a#feeimg").prepend('<img src="../../images/fee.png" class="nav-menu-img" />');
924 $("#navigation-slide > li > a#adm0").prepend('<img src="../../images/inventory.png" class="nav-menu-img" />');
925 $("#navigation-slide > li > a#invimg").prepend('<img src="../../images/inventory.png" class="nav-menu-img" />');
926 $("#navigation-slide > li > a#admimg").prepend('<img src="../../images/admin.png" class="nav-menu-img" />');
927 $("#navigation-slide > li > a#misimg").prepend('<img src="../../images/misc.png" class="nav-menu-img" />');
928 $("#navigation-slide > li > a#proimg").prepend('<img src="../../images/procedures.png" class="nav-menu-img" />');
929 $("#navigation-slide > li").each(function(index) {
930 if($(" > ul > li", this).size() == 0){
931 $(" > a", this).addClass("collapsed");
934 }else if(2 == <?php echo $GLOBALS['concurrent_layout'] ?>){
936 //Remove the links (used by the sliding menu) that will break treeview
937 $('a.collapsed').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
938 $('a.collapsed_lv2').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
939 $('a.expanded').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
940 $('a.expanded_lv2').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
942 // Initiate treeview
943 $("#navigation").treeview({
944 animated: "fast",
945 collapsed: true,
946 unique: <?php echo $GLOBALS['athletic_team'] ? 'false' : 'true' ?>,
947 toggle: function() {
948 window.console && console.log("%o was toggled", this);
954 </script>
956 </head>
958 <body class="body_nav">
960 <form method='post' name='find_patient' target='RTop'
961 action='<?php echo $rootdir ?>/main/finder/patient_select.php'>
963 <?php
964 // Find widget is at the top for the athletic team layout.
965 if ($GLOBALS['athletic_team']) {
966 genFindBlock();
967 echo "<hr />\n";
971 <?php if ( ( $GLOBALS['concurrent_layout'] == 2) || ($GLOBALS['concurrent_layout'] == 3) ) { ?>
972 <center>
973 <select name='sel_frame' style='background-color:transparent;font-size:9pt;width:<?php echo $GLOBALS['athletic_team'] ? 47 : 100; ?>%;'>
974 <option value='0'><?php xl('Default','e'); ?></option>
975 <option value='1'><?php xl('Top','e'); ?></option>
976 <option value='2'><?php xl('Bottom','e'); ?></option>
977 </select>
978 <?php if ($GLOBALS['athletic_team']) genPopupsList('width:47%'); ?>
979 </center>
981 <table cellpadding='0' cellspacing='0' border='0' width='100%'>
982 <tr>
983 <td class='smalltext' nowrap>
984 <input type='checkbox' name='cb_top' onclick='toggleFrame(1)' checked />
985 <b><?php xl('Top','e') ?></b>
986 </td>
987 <td class='smalltext' align='right' nowrap>
988 <b><?php xl('Bot','e') ?></b>
989 <input type='checkbox' name='cb_bot' onclick='toggleFrame(2)' <?php if (empty($GLOBALS['athletic_team'])) echo 'checked '; ?>/>
990 </td>
991 </tr>
992 </table>
994 <?php if ( $GLOBALS['concurrent_layout'] == 3) { ?>
995 <ul id="navigation-slide">
996 <?php } else { // ($GLOBALS['concurrent_layout'] == 2) ?>
997 <ul id="navigation">
998 <?php } ?>
1000 <?php if ($GLOBALS['athletic_team']) { // Tree menu for athletic teams ?>
1002 <?php genTreeLink('RBot','msg',xl('Messages')); ?>
1003 <li><a class="collapsed" id="patimg" ><span><?php xl('View','e') ?></span></a>
1004 <ul>
1005 <?php genTreeLink('RTop','ros',xl('Weekly Exposures'),true); ?>
1006 <?php genMiscLink('RTop','ros','0',xl('Team Roster'),'reports/old_players_report.php?embed=1',true); ?>
1007 <?php if (!$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar'),true); ?>
1008 </ul>
1009 </li>
1010 <li class="open"><a class="collapsed" id="patimg" ><span><?php xl('Demographics','e') ?></span></a>
1011 <ul>
1012 <?php genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?>
1013 <?php genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ? xl('New/Search') : xl('New'))); ?>
1014 <?php genTreeLink('RTop','dem',xl('Current')); ?>
1015 </ul>
1016 </li>
1017 <li class="open"><a class="expanded" id="patimg" ><span><?php xl('Medical Records','e') ?></span></a>
1018 <ul>
1019 <?php genDualLink('iss','ens',xl('All Injuries/Problems/Issues')); // with ens on bottom ?>
1020 <?php
1021 // Add a container for each issue type.
1022 foreach ($ISSUE_TYPES as $key => $value) {
1023 echo " <li class='open'><a class='collapsed_lv2'><span>" . xl('Active') . " " . $value[0] . "</span></a>\n";
1024 echo " <ul id='icontainer_$key'>\n";
1025 echo " </ul>\n";
1026 echo " </li>\n";
1029 <?php genDualLink('nen','ens',xl('New Consultation')); // with ens on bottom ?>
1030 <?php // genDualLink('enc','ens','Current Consultation'); // with ens on bottom ?>
1031 <?php genTreeLink('RTop','enc',xl('Current Consultation')); // encounter_top will itself load ens on bottom ?>
1032 <?php // genDualLink('dem','ens',xl('Previous Consultations')); // with dem on top ?>
1033 <?php genTreeLink('RBot','ens',xl('Previous Consultations'),true); ?>
1034 <?php genDualLink('his','ens',xl('Prev Med/Surg Hx')); // with ens on bottom ?>
1035 <?php // genPopLink(xl('New Allergy'),'../patient_file/summary/add_edit_issue.php?thistype=allergy','xxx1'); ?>
1036 <?php // genTreeLink('RTop','iss',xl('View/Edit Allergies')); // somehow emphasizing allergies...? ?>
1037 <?php if (!$GLOBALS['disable_immunizations']) genDualLink('his','imm',xl('Immunizations')); // imm on bottom, his on top ?>
1038 <?php if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genDualLink('his','pre',xl('Prescriptions')); // pre on bottom, his on top ?>
1039 <?php genTreeLink('RTop','doc',xl('Document/Imaging Store'),true); ?>
1040 <?php genDualLink('dem','pno',xl('Additional Notes')); // with dem on top ?>
1041 </ul>
1042 </li>
1043 <li class="open"><a class="collapsed" id="patimg" ><span><?php xl('Medical Administration','e') ?></span></a>
1044 <ul>
1045 <?php genDualLink('tra','ens',xl('Transactions/Referrals')); // new transaction form on top and tra list on bottom (or ens if no tra) ?>
1046 <?php genPopLink(xl('Address Book'),'../usergroup/addrbook_list.php?popup=1'); ?>
1047 <li><a href='' onClick="return repPopup('../patient_file/letter.php')" id='prp1'>Letter</a></li>
1048 <?php genTreeLink('RTop','prp',xl('Patient Printed Report')); ?>
1049 </ul>
1050 </li>
1051 <li class="open"><a class="collapsed" id="repimg" ><span><?php xl('Reports','e') ?></span></a>
1052 <ul>
1053 <li class="open"><a class="collapsed_lv2"><span><?php xl('Athletic/Injury','e') ?></span></a>
1054 <ul>
1055 <?php genTreeLink('RTop','prp',xl('Patient Printed Report')); // also appears above ?>
1056 <?php genPopLink(xl('Games/Events Missed'),'absences_report.php'); ?>
1057 <?php genPopLink(xl('Injury Surveillance'),'football_injury_report.php'); ?>
1058 <?php genPopLink(xl('Team Injury Overview'),'injury_overview_report.php'); ?>
1059 </ul>
1060 </li>
1061 <li><a class="collapsed_lv2"><span><?php xl('Patient/Client','e') ?></span></a>
1062 <ul>
1063 <?php genPopLink(xl('List'),'patient_list.php'); ?>
1064 <?php if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genPopLink(xl('Prescriptions'),'prescriptions_report.php'); ?>
1065 <?php genPopLink(xl('Referrals'),'referrals_report.php'); ?>
1066 </ul>
1067 </li>
1068 <li><a class="collapsed_lv2"><span><?php xl('Visits','e') ?></span></a>
1069 <ul>
1070 <?php if (!$GLOBALS['disable_calendar']) genPopLink(xl('Appointments'),'appointments_report.php'); ?>
1071 <?php genPopLink(xl('Encounters'),'encounters_report.php'); ?>
1072 <?php if (!$GLOBALS['disable_calendar']) genPopLink(xl('Appt-Enc'),'appt_encounter_report.php'); ?>
1073 </ul>
1074 </li>
1075 <li><a class="collapsed_lv2"><span><?php xl('General','e') ?></span></a>
1076 <ul>
1077 <?php genPopLink(xl('Services'),'services_by_category.php'); ?>
1078 <?php if ($GLOBALS['inhouse_pharmacy']) genPopLink(xl('Inventory'),'inventory_list.php'); ?>
1079 <?php if ($GLOBALS['inhouse_pharmacy']) genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?>
1080 </ul>
1081 </li>
1082 </ul>
1083 </li>
1084 <?php // TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1085 <?php if(!isset($GLOBALS['enable_fees_in_left_menu']) || $GLOBALS['enable_fees_in_left_menu'] == 1){ ?>
1086 <li><a class="collapsed" id="feeimg" ><span><?php xl('Fees','e') ?></span></a>
1087 <ul>
1088 <?php genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?>
1089 <?php genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?>
1090 </ul>
1091 </li>
1092 <?php } ?>
1093 <?php if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?>
1094 <li><a class="collapsed" id="admimg" ><span><?php xl('Administration','e') ?></span></a>
1095 <ul>
1096 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?>
1097 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?>
1098 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?>
1099 <?php genTreeLink('RTop','pwd','Users Password Change'); ?>
1100 <?php if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings'); ?>
1101 <?php if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?>
1102 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?>
1103 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?>
1104 <?php if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?>
1105 <?php if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?>
1106 <?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'); ?>
1107 <li><a class="collapsed_lv2"><span><?php xl('Other','e') ?></span></a>
1108 <ul>
1109 <?php if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?>
1110 <?php if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?>
1111 <?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'); ?>
1112 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?>
1113 <?php if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?>
1114 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?>
1115 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?>
1116 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?>
1117 </ul>
1118 </li>
1119 </ul>
1120 </li>
1121 <li><a class="collapsed" id="misimg" ><span><?php xl('Miscellaneous','e') ?></span></a>
1122 <ul>
1123 <?php genTreeLink('RBot','aun',xl('Authorizations')); ?>
1124 <?php genTreeLink('RTop','fax',xl('Fax/Scan')); ?>
1125 <?php genTreeLink('RTop','adb',xl('Addr Book')); ?>
1126 <?php genTreeLink('RTop','ono',xl('Ofc Notes')); ?>
1127 <?php genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?>
1128 <?php genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?>
1129 <?php if(acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=0'); ?>
1130 </ul>
1131 </li>
1133 <?php } else { // not athletic team ?>
1135 <?php if (!$GLOBALS['disable_calendar'] && !$GLOBALS['ippf_specific']) genTreeLink('RTop','cal',xl('Calendar')); ?>
1136 <?php genTreeLink('RBot','msg',xl('Messages')); ?>
1137 <?php if ($GLOBALS['lab_exchange_enable']) genTreeLink('RTop', 'lab', xl('Check Lab Results'));?>
1138 <?php if($GLOBALS['portal_offsite_enable'] && $GLOBALS['portal_offsite_address'] && acl_check('patientportal','portal')) genTreeLink('RTop','app',xl('Portal Activity')); ?>
1139 <li class="open"><a class="expanded" id="patimg" ><span><?php xl('Patient/Client','e') ?></span></a>
1140 <ul>
1141 <?php genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?>
1142 <?php genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ? xl('New/Search') : xl('New'))); ?>
1143 <?php genTreeLink('RTop','dem',xl('Summary')); ?>
1144 <li class="open"><a class="expanded_lv2"><span><?php xl('Visits','e') ?></span></a>
1145 <ul>
1146 <?php if ($GLOBALS['ippf_specific'] && !$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar')); ?>
1147 <?php genTreeLink('RBot','nen',xl('Create Visit')); ?>
1148 <?php genTreeLink('RBot','enc',xl('Current')); ?>
1149 <?php genTreeLink('RBot','ens',xl('Visit History')); ?>
1150 </ul>
1151 </li>
1153 <li><a class="collapsed_lv2"><span><?php xl('Records','e') ?></span></a>
1154 <ul>
1155 <?php genTreeLink('RTop','prq',xl('Patient Record Request')); ?>
1156 </ul>
1157 </li>
1159 <?php if ($GLOBALS['gbl_nav_visit_forms']) { ?>
1160 <li><a class="collapsed_lv2"><span><?php xl('Visit Forms','e') ?></span></a>
1161 <ul>
1162 <?php
1163 // Generate the items for visit forms, both traditional and LBF.
1165 $lres = sqlStatement("SELECT * FROM list_options " .
1166 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
1167 if (sqlNumRows($lres)) {
1168 while ($lrow = sqlFetchArray($lres)) {
1169 $option_id = $lrow['option_id']; // should start with LBF
1170 $title = $lrow['title'];
1171 genMiscLink('RBot','cod','2',xl_form_title($title),
1172 "patient_file/encounter/load_form.php?formname=$option_id");
1175 include_once("$srcdir/registry.inc");
1176 $reg = getRegistered();
1177 if (!empty($reg)) {
1178 foreach ($reg as $entry) {
1179 $option_id = $entry['directory'];
1180 $title = trim($entry['nickname']);
1181 if ($option_id == 'fee_sheet' ) continue;
1182 if ($option_id == 'newpatient') continue;
1183 if (empty($title)) $title = $entry['name'];
1184 genMiscLink('RBot','cod','2',xl_form_title($title),
1185 "patient_file/encounter/load_form.php?formname=" .
1186 urlencode($option_id));
1190 </ul>
1191 </li>
1192 <?php } // end if gbl_nav_visit_forms ?>
1194 </ul>
1195 </li>
1196 <?php // TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1197 <?php if(!isset($GLOBALS['enable_fees_in_left_menu']) || $GLOBALS['enable_fees_in_left_menu'] == 1){ ?>
1198 <li><a class="collapsed" id="feeimg" ><span><?php xl('Fees','e') ?></span></a>
1199 <ul>
1200 <?php genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?>
1201 <?php if ($GLOBALS['use_charges_panel']) genTreeLink('RBot','cod',xl('Charges')); ?>
1202 <?php genMiscLink('RBot','pay','1',xl('Payment'),'patient_file/front_payment.php'); ?>
1203 <?php genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?>
1204 <?php if (! $GLOBALS['simplified_demographics']) genTreeLink('RTop','bil',xl('Billing')); ?>
1205 <?php genTreeLink('RTop','npa',xl('Batch Payments'),false,2);?>
1206 <?php if ($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob')) genTreeLink('RTop','edi',xl('EDI History'),false,2);?>
1207 </ul>
1208 </li>
1209 <?php } ?>
1210 <?php // if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?>
1211 <?php if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?>
1212 <li><a class="collapsed" id="invimg" ><span><?php xl('Inventory','e') ?></span></a>
1213 <ul>
1214 <?php genMiscLink('RTop','adm','0',xl('Management'),'drugs/drug_inventory.php'); ?>
1215 <?php genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?>
1216 </ul>
1217 </li>
1218 <?php } ?>
1219 <li><a class="collapsed" id="proimg" ><span><?php xl('Procedures','e') ?></span></a>
1220 <ul>
1221 <?php genTreeLink('RTop','orl',xl('Providers')); ?>
1222 <?php genTreeLink('RTop','ort',xl('Configuration')); ?>
1223 <?php genTreeLink('RTop','orc',xl('Load Compendium')); ?>
1224 <?php genTreeLink('RTop','orp',xl('Pending Review')); ?>
1225 <?php genTreeLink('RTop','orr',xl('Patient Results')); ?>
1226 <?php genTreeLink('RTop','orb',xl('Batch Results')); ?>
1227 <?php genTreeLink('RTop','ore',xl('Electronic Reports')); ?>
1228 </ul>
1229 </li>
1230 <?php
1231 $newcrop_user_role=sqlQuery("select newcrop_user_role from users where username='".$_SESSION['authUser']."'");
1232 if($newcrop_user_role['newcrop_user_role'] && $GLOBALS['erx_enable']) { ?>
1233 <li><a class="collapsed" id="feeimg" ><span><?php xl('New Crop','e') ?></span></a>
1234 <ul>
1235 <li><a class="collapsed_lv2"><span><?php xl('Status','e') ?></span></a>
1236 <ul>
1237 <?php genTreeLink('RTop','erx',xl('e-Rx')); ?>
1238 <?php //genTreeLink('RTop','err',xl('e-Rx Renewal')); ?>
1239 <?php genMiscLink('RTop','err','0',xl('e-Rx Renewal'),'eRx.php?page=status'); ?>
1240 </ul>
1241 </li>
1242 </ul>
1243 </li>
1244 <?php } ?>
1245 <?php if (!$disallowed['adm']) { ?>
1246 <li><a class="collapsed" id="admimg" ><span><?php xl('Administration','e') ?></span></a>
1247 <ul>
1248 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?>
1249 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?>
1250 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?>
1251 <?php if (acl_check('admin', 'practice' )) genTreeLink('RTop','adb',xl('Addr Book')); ?>
1252 <?php
1253 // Changed the target URL from practice settings -> Practice Settings - Pharmacy... Dec 09,09 .. Visolve ... This replaces empty frame with Pharmacy window
1254 if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings&pharmacy&action=list'); ?>
1255 <?php if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?>
1256 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?>
1257 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?>
1258 <?php if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?>
1259 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?>
1260 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?>
1261 <?php if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Rules'),'super/rules/index.php?action=browse!list'); ?>
1262 <?php if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Alerts'),'super/rules/index.php?action=alerts!listactmgr'); ?>
1263 <?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='); ?>
1264 <?php if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?>
1265 <?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'); ?>
1266 <?php if (acl_check('admin', 'super') && !empty($GLOBALS['code_types']['IPPF'])) genMiscLink('RTop','adm','0',xl('Export'),'main/ippf_export.php'); ?>
1267 <li><a class="collapsed_lv2"><span><?php xl('Other','e') ?></span></a>
1268 <ul>
1269 <?php if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?>
1270 <?php if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?>
1271 <?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'); ?>
1272 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?>
1273 <?php
1274 if($newcrop_user_role['newcrop_user_role'] || $GLOBALS['erx_enable']) {
1275 if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('eRx Logs'),'logview/erx_logview.php');
1278 <?php if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?>
1279 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?>
1280 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('External Data Loads'),'../interface/code_systems/dataloads_ajax.php'); ?>
1281 </ul>
1282 </li>
1283 </ul>
1284 </li>
1285 <?php } ?>
1286 <li><a class="collapsed" id="repimg" ><span><?php xl('Reports','e') ?></span></a>
1287 <ul>
1288 <li><a class="collapsed_lv2"><span><?php xl('Clients','e') ?></span></a>
1289 <ul>
1290 <?php genMiscLink('RTop','rep','0',xl('List'),'reports/patient_list.php'); ?>
1291 <?php if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genMiscLink('RTop','rep','0',xl('Rx'),'reports/prescriptions_report.php'); ?>
1292 <?php if (acl_check('patients', 'med')) genMiscLink('RTop','rep','0',xl('Clinical'),'reports/clinical_reports.php'); ?>
1293 <?php genMiscLink('RTop','rep','0',xl('Referrals'),'reports/referrals_report.php'); ?>
1294 <?php genMiscLink('RTop','rep','0',xl('Immunization Registry'),'reports/immunization_report.php'); ?>
1295 </ul>
1296 </li>
1297 <li><a class="collapsed_lv2"><span><?php xl('Clinic','e') ?></span></a>
1298 <ul>
1299 <?php if ($GLOBALS['enable_cdr'] || $GLOBALS['enable_cqm'] || $GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Report Results'),'reports/report_results.php'); ?>
1300 <?php if ($GLOBALS['enable_cdr']) genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?>
1301 <?php if ($GLOBALS['enable_cqm']) genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?>
1302 <?php if ($GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?>
1303 <?php if ($GLOBALS['enable_amc_tracking']) genMiscLink('RTop','rep','0',xl('AMC Tracking'),'reports/amc_tracking.php'); ?>
1304 </ul>
1305 </li>
1306 <li><a class="collapsed_lv2"><span><?php xl('Visits','e') ?></span></a>
1307 <ul>
1308 <?php if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appointments'),'reports/appointments_report.php'); ?>
1309 <?php genMiscLink('RTop','rep','0',xl('Encounters'),'reports/encounters_report.php'); ?>
1310 <?php if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appt-Enc'),'reports/appt_encounter_report.php'); ?>
1311 <?php if (empty($GLOBALS['code_types']['IPPF'])) { ?>
1312 <?php genMiscLink('RTop','rep','0',xl('Superbill'),'reports/custom_report_range.php'); ?>
1313 <?php } ?>
1314 <?php genMiscLink('RTop','rep','0',xl('Eligibility'),'reports/edi_270.php'); ?>
1315 <?php genMiscLink('RTop','rep','0',xl('Eligibility Response'),'reports/edi_271.php'); ?>
1318 <?php if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Chart Activity'),'reports/chart_location_activity.php'); ?>
1319 <?php if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Charts Out'),'reports/charts_checked_out.php'); ?>
1320 <?php genMiscLink('RTop','rep','0',xl('Services'), 'reports/services_by_category.php'); ?>
1321 <?php genMiscLink('RTop','rep','0',xl('Syndromic Surveillance'),'reports/non_reported.php'); ?>
1322 </ul>
1323 </li>
1324 <?php if (acl_check('acct', 'rep_a')) { ?>
1325 <li><a class="collapsed_lv2"><span><?php xl('Financial','e') ?></span></a>
1326 <ul>
1327 <?php genMiscLink('RTop','rep','0',xl('Sales'),'reports/sales_by_item.php'); ?>
1328 <?php genMiscLink('RTop','rep','0',xl('Cash Rec'), 'billing/sl_receipts_report.php'); ?>
1329 <?php genMiscLink('RTop','rep','0',xl('Front Rec'), 'reports/front_receipts_report.php'); ?>
1330 <?php genMiscLink('RTop','rep','0',xl('Pmt Method'), 'reports/receipts_by_method_report.php'); ?>
1331 <?php genMiscLink('RTop','rep','0',xl('Collections'), 'reports/collections_report.php'); ?>
1332 <?php genMiscLink('RTop','rep','0',xl('Financial Summary by Service Code'),'reports/svc_code_financial_report.php'); ?>
1333 </ul>
1334 </li>
1335 <?php } ?>
1336 <?php if ($GLOBALS['inhouse_pharmacy']) { ?>
1337 <li><a class="collapsed_lv2"><span><?php xl('Inventory','e') ?></span></a>
1338 <ul>
1339 <?php genMiscLink('RTop','rep','0',xl('List'),'reports/inventory_list.php'); ?>
1340 <?php genMiscLink('RTop','rep','0',xl('Activity'),'reports/inventory_activity.php'); ?>
1341 <?php genMiscLink('RTop','rep','0',xl('Transactions'),'reports/inventory_transactions.php'); ?>
1342 </ul>
1343 </li>
1344 <?php } ?>
1345 <li><a class="collapsed_lv2"><span><?php xl('Procedures','e') ?></span></a>
1346 <ul>
1347 <?php genPopLink(xl('Pending Res'),'../orders/pending_orders.php'); ?>
1348 <?php if (!empty($GLOBALS['code_types']['IPPF'])) genPopLink(xl('Pending F/U'),'../orders/pending_followup.php'); ?>
1349 <?php genPopLink(xl('Statistics'),'../orders/procedure_stats.php'); ?>
1350 </ul>
1351 </li>
1352 <?php if (! $GLOBALS['simplified_demographics']) { ?>
1353 <li><a class="collapsed_lv2"><span><?php xl('Insurance','e') ?></span></a>
1354 <ul>
1355 <?php genMiscLink('RTop','rep','0',xl('Distribution'),'reports/insurance_allocation_report.php'); ?>
1356 <?php genMiscLink('RTop','rep','0',xl('Indigents'),'billing/indigent_patients_report.php'); ?>
1357 <?php genMiscLink('RTop','rep','0',xl('Unique SP'),'reports/unique_seen_patients_report.php'); ?>
1358 </ul>
1359 </li>
1360 <?php } ?>
1361 <?php if (!empty($GLOBALS['code_types']['IPPF'])) { ?>
1362 <li><a class="collapsed_lv2"><span><?php xl('Statistics','e') ?></span></a>
1363 <ul>
1364 <?php genPopLink(xl('IPPF Stats'),'ippf_statistics.php?t=i'); ?>
1365 <?php genPopLink(xl('GCAC Stats'),'ippf_statistics.php?t=g'); ?>
1366 <?php genPopLink(xl('MA Stats'),'ippf_statistics.php?t=m'); ?>
1367 <?php genPopLink(xl('CYP'),'ippf_cyp_report.php'); ?>
1368 <?php genPopLink(xl('Daily Record'),'ippf_daily.php'); ?>
1369 </ul>
1370 </li>
1371 <?php } // end ippf-specific ?>
1372 <li><a class="collapsed_lv2"><span><?php xl('Blank Forms','e') ?></span></a>
1373 <ul>
1374 <?php genPopLink(xl('Demographics'),'../patient_file/summary/demographics_print.php'); ?>
1375 <?php genPopLink(xl('Superbill/Fee Sheet'),'../patient_file/printed_fee_sheet.php'); ?>
1376 <?php genPopLink(xl('Referral'),'../patient_file/transaction/print_referral.php'); ?>
1377 <?php
1378 $lres = sqlStatement("SELECT * FROM list_options " .
1379 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
1380 while ($lrow = sqlFetchArray($lres)) {
1381 $option_id = $lrow['option_id']; // should start with LBF
1382 $title = $lrow['title'];
1383 genPopLink($title, "../forms/LBF/printable.php?formname=$option_id");
1386 </ul>
1387 </li>
1388 <?php if (acl_check('admin','super')) { ?>
1389 <li><a class="collapsed_lv2"><span><?php echo xlt('Services') ?></span></a>
1390 <ul>
1391 <?php genMiscLink('RTop','rep','0',xl('Background Services'),'reports/background_services.php'); ?>
1392 <?php genMiscLink('RTop','rep','0',xl('Direct Message Log'),'reports/direct_message_log.php'); ?>
1393 </ul>
1394 </li>
1395 <?php } ?>
1397 <?php // genTreeLink('RTop','rep','Other'); ?>
1398 </ul>
1399 </li>
1400 <li><a class="collapsed" id="misimg" ><span><?php xl('Miscellaneous','e') ?></span></a>
1401 <ul>
1402 <?php genTreeLink('RTop','ped',xl('Patient Education')); ?>
1403 <?php genTreeLink('RBot','aun',xl('Authorizations')); ?>
1404 <?php genTreeLink('RTop','fax',xl('Fax/Scan')); ?>
1405 <?php genTreeLink('RTop','adb',xl('Addr Book')); ?>
1406 <?php genTreeLink('RTop','ort',xl('Order Catalog')); ?>
1407 <?php if (!$GLOBALS['disable_chart_tracker']) genTreeLink('RTop','cht',xl('Chart Tracker')); ?>
1408 <?php genTreeLink('RTop','ono',xl('Ofc Notes')); ?>
1409 <?php genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?>
1410 <?php genTreeLink('RTop','pwd',xl('Password')); ?>
1411 <?php genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?>
1412 <?php if(acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=00'); ?>
1413 </ul>
1414 </li>
1416 <?php } // end not athletic team ?>
1418 </ul>
1420 <?php } else { // end ($GLOBALS['concurrent_layout'] == 2 || $GLOBALS['concurrent_layout'] == 3) ?>
1422 <table cellpadding='0' cellspacing='0' border='0'>
1423 <tr>
1424 <td colspan='3'>
1425 <table cellpadding='0' cellspacing='0' border='0' width='100%'>
1426 <tr>
1427 <td class='smalltext' nowrap>
1428 <input type='checkbox' name='cb_top' onclick='toggleFrame(1)' checked /><b><?php xl('Top','e') ?></b>
1429 </td>
1430 <td class='smalltext' align='right' nowrap>
1431 <b><?php xl('Bot','e') ?></b><input type='checkbox' name='cb_bot' onclick='toggleFrame(2)' checked />
1432 </td>
1433 </tr>
1434 </table>
1435 </td>
1436 </tr>
1437 <?php
1438 // Builds the table of radio buttons and their labels. Radio button values
1439 // are comprised of the 3-character document id and the 1-digit usage type,
1440 // so that JavaScript can easily access this information.
1441 $default_top_rbid = $GLOBALS['athletic_team'] ? 'ros' : 'cal';
1442 foreach ($primary_docs as $key => $varr) {
1443 if (!empty($disallowed[$key])) continue;
1444 $label = $varr[0];
1445 $usage = $varr[1];
1446 $url = $varr[2];
1447 echo " <tr>\n";
1448 echo " <td class='smalltext'><input type='radio' name='rb_top' value='$key$usage' " .
1449 "onclick=\"loadFrame('$key$usage','RTop','$url')\"";
1450 if ($key == $default_top_rbid) echo " checked";
1451 echo " /></td>\n";
1452 echo " <td class='smalltext' id='lbl_$key'>$label</td>\n";
1453 echo " <td class='smalltext'><input type='radio' name='rb_bot' value='$key$usage' " .
1454 "onclick=\"loadFrame('$key$usage','RBot','$url')\"";
1455 if ($key == 'msg') echo " checked";
1456 echo " /></td>\n";
1457 echo " </tr>\n";
1460 </table>
1462 <?php } ?>
1464 <br /><hr />
1466 <?php
1467 // To use RelayHealth, see comments and parameters in includes/config.php.
1468 if (!empty($GLOBALS['ssi']['rh'])) {
1469 include_once("../../library/ssi.inc");
1470 echo getRelayHealthLink() ."<br /><hr />\n";
1474 <div id='current_patient' style = 'display:none'>
1475 <b><?php xl('None','e'); ?></b>
1476 </div>
1478 <div id='current_encounter' style = 'display:none'>
1479 <b><?php xl('None','e'); ?></b>
1480 </div>
1482 <?php
1483 if (!$GLOBALS['athletic_team']) {
1484 genPopupsList();
1485 echo "<hr />\n";
1486 genFindBlock();
1487 echo "<hr />\n";
1491 <?php if (!empty($GLOBALS['online_support_link'])) { ?>
1492 <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>
1493 <?php } ?>
1495 <input type='hidden' name='findBy' value='Last' />
1496 <input type="hidden" name="searchFields" id="searchFields"/>
1497 <input type="hidden" name="search_service_code" value='' />
1499 </form>
1501 <script language='JavaScript'>
1502 syncRadios();
1503 </script>
1505 </body>
1506 </html>