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