Visolve: Clear Active Patient Changes
[openemr.git] / interface / main / left_nav.php
blob8703d08400a2decdb1172d640079f17170f4f17a
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 'ort' => array(xl('Proc Cat') , 0, 'orders/types.php'),
113 'orb' => array(xl('Proc Bat') , 0, 'orders/orders_results.php?batch=1'),
114 'cht' => array(xl('Chart Trk') , 0, '../custom/chart_tracker.php'),
115 'imp' => array(xl('Import') , 0, '../custom/import.php'),
116 'bil' => array(xl('Billing') , 0, 'billing/billing_report.php'),
117 'sup' => array(xl('Superbill') , 0, 'patient_file/encounter/superbill_custom_full.php'),
118 'aun' => array(xl('Authorizations'), 0, 'main/authorizations/authorizations.php'),
119 'new' => array(xl('New Pt') , 0, 'new/new.php'),
120 'ped' => array(xl('Patient Education'), 0, 'reports/patient_edu_web_lookup.php'),
121 'lab' => array(xl('Check Lab Results') , 0, 'orders/lab_exchange.php'),
122 'dem' => array(xl('Patient') , 1, "patient_file/summary/demographics.php"),
123 'his' => array(xl('History') , 1, 'patient_file/history/history.php'),
124 'ens' => array(xl('Visit History'), 1, 'patient_file/history/encounters.php'),
125 'nen' => array(xl('Create Visit'), 1, 'forms/newpatient/new.php?autoloaded=1&calenc='),
126 'pre' => array(xl('Rx') , 1, 'patient_file/summary/rx_frameset.php'),
127 'iss' => array(xl('Issues') , 1, 'patient_file/summary/stats_full.php?active=all'),
128 'imm' => array(xl('Immunize') , 1, 'patient_file/summary/immunizations.php'),
129 'doc' => array(xl('Documents') , 1, '../controller.php?document&list&patient_id={PID}'),
130 'orp' => array(xl('Proc Pending Rev'), 1, 'orders/orders_results.php?review=1'),
131 'orr' => array(xl('Proc Res') , 1, 'orders/orders_results.php'),
132 'prp' => array(xl('Pt Report') , 1, 'patient_file/report/patient_report.php'),
133 'prq' => array(xl('Pt Rec Request') , 1, 'patient_file/transaction/record_request.php'),
134 'pno' => array(xl('Pt Notes') , 1, 'patient_file/summary/pnotes.php'),
135 'tra' => array(xl('Transact') , 1, 'patient_file/transaction/transactions.php'),
136 'sum' => array(xl('Summary') , 1, 'patient_file/summary/summary_bottom.php'),
137 'enc' => array(xl('Encounter') , 2, 'patient_file/encounter/encounter_top.php'),
138 'erx' => array(xl('e-Rx') , 1, 'eRx.php'),
139 'err' => array(xl('e-Rx Renewal') , 1, 'eRx.php?page=status'),
140 'pay' => array(xl('Payment') , 1, '../patient_file/front_payment.php'),
141 'edi' => array(xl('EDI History') , 0, 'billing/edih_view.php')
143 $primary_docs['npa']=array(xl('Batch Payments') , 0, 'billing/new_payment.php');
144 if ($GLOBALS['use_charges_panel'] || $GLOBALS['concurrent_layout'] == 2) {
145 $primary_docs['cod'] = array(xl('Charges'), 2, 'patient_file/encounter/encounter_bottom.php');
148 // This section decides which navigation items will not appear.
150 $disallowed = array();
151 $disallowed['edi'] = !($GLOBALS['enable_edihistory_in_left_menu'] || acl_check('acct', 'eob'));
152 $disallowed['adm'] = !(acl_check('admin', 'calendar') ||
153 acl_check('admin', 'database') || acl_check('admin', 'forms') ||
154 acl_check('admin', 'practice') || acl_check('admin', 'users') ||
155 acl_check('admin', 'acl') || acl_check('admin', 'super') ||
156 acl_check('admin', 'superbill'));
158 $disallowed['bil'] = !(acl_check('acct', 'rep') || acl_check('acct', 'eob') ||
159 acl_check('acct', 'bill'));
161 $disallowed['new'] = !(acl_check('patients','demo','',array('write','addonly') ));
163 $disallowed['fax'] = !($GLOBALS['enable_hylafax'] || $GLOBALS['enable_scanner']);
165 $disallowed['ros'] = !$GLOBALS['athletic_team'];
167 $disallowed['iss'] = !((acl_check('encounters','notes','','write') ||
168 acl_check('encounters','notes_a','','write') ) &&
169 acl_check('patients','med','','write') );
171 $disallowed['imp'] = $disallowed['new'] ||
172 !is_readable("$webserver_root/custom/import.php");
174 $disallowed['cht'] = !is_readable("$webserver_root/custom/chart_tracker.php");
176 $disallowed['pre'] = !(acl_check('patients', 'med'));
178 // Helper functions for treeview generation.
179 function genTreeLink($frame, $name, $title, $mono=false) {
180 global $primary_docs, $disallowed;
181 if (empty($disallowed[$name])) {
182 $id = $name . $primary_docs[$name][1];
183 echo "<li><a href='' id='$id' onclick=\"";
184 if ($mono) {
185 if ($frame == 'RTop')
186 echo "forceSpec(true,false);";
187 else
188 echo "forceSpec(false,true);";
190 echo "return loadFrame2('$id','$frame','" .
191 $primary_docs[$name][2] . "')\">" . $title . ($name == 'msg' ? ' <span id="reminderCountSpan" class="bold"></span>' : '')."</a></li>";
194 function genMiscLink($frame, $name, $level, $title, $url, $mono=false) {
195 global $disallowed;
196 if (empty($disallowed[$name])) {
197 $id = $name . $level;
198 echo "<li><a href='' id='$id' onclick=\"";
199 if ($mono) {
200 if ($frame == 'RTop')
201 echo "forceSpec(true,false);";
202 else
203 echo "forceSpec(false,true);";
205 echo "return loadFrame2('$id','$frame','" .
206 $url . "')\">" . $title . "</a></li>";
209 function genPopLink($title, $url, $linkid='') {
210 echo "<li><a href='' ";
211 if ($linkid) echo "id='$linkid' ";
212 echo "onclick=\"return repPopup('$url')\"" .
213 ">" . $title . "</a></li>";
215 function genDualLink($topname, $botname, $title) {
216 global $primary_docs, $disallowed;
217 if (empty($disallowed[$topname]) && empty($disallowed[$botname])) {
218 $topid = $topname . $primary_docs[$topname][1];
219 $botid = $botname . $primary_docs[$botname][1];
220 echo "<li><a href='' id='$topid' " .
221 "onclick=\"return loadFrameDual('$topid','$botid','" .
222 $primary_docs[$topname][2] . "','" .
223 $primary_docs[$botname][2] . "')\">" . $title . "</a></li>";
227 function genPopupsList($style='') {
228 global $disallowed, $webserver_root;
230 <select name='popups' onchange='selpopup(this)' style='background-color:transparent;font-size:9pt;<?php echo $style; ?>'>
231 <option value=''><?php xl('Popups','e'); ?></option>
232 <?php if (!$disallowed['iss']) { ?>
233 <option value='../patient_file/problem_encounter.php'><?php xl('Issues','e'); ?></option>
234 <?php } ?>
235 <?php if (!$GLOBALS['ippf_specific']) { ?>
236 <option value='../../custom/export_xml.php'><?php xl('Export','e'); ?></option>
237 <option value='../../custom/import_xml.php'><?php xl('Import','e'); ?></option>
238 <?php } ?>
239 <?php if ($GLOBALS['athletic_team']) { ?>
240 <option value='../reports/players_report.php'><?php xl('Roster','e'); ?></option>
241 <?php } ;
242 if (!$GLOBALS['disable_calendar']) { ?>
243 <option value='../reports/appointments_report.php?patient=<?php if(isset($pid)) {echo $pid;} ?>'><?php xl('Appts','e'); ?></option>
244 <?php } ;
245 if (file_exists("$webserver_root/custom/refer.php")) { ?>
246 <option value='../../custom/refer.php'><?php xl('Refer','e'); ?></option>
247 <?php } ?>
248 <option value='../patient_file/printed_fee_sheet.php?fill=1'><?php xl('Superbill','e'); ?></option>
249 <option value='../patient_file/front_payment.php'><?php xl('Payment','e'); ?></option>
250 <?php if ($GLOBALS['inhouse_pharmacy']) { ?>
251 <option value='../patient_file/pos_checkout.php'><?php xl('Checkout','e'); ?></option>
252 <?php } ?>
253 <?php if (is_dir($GLOBALS['OE_SITE_DIR'] . "/letter_templates")) { ?>
254 <option value='../patient_file/letter.php'><?php xl('Letter','e'); ?></option>
255 <?php } ?>
256 </select>
257 <?php
260 function genFindBlock() {
262 <table cellpadding='0' cellspacing='0' border='0'>
263 <tr>
264 <td class='smalltext'><?php xl('Find','e') ?>:&nbsp;</td>
265 <td class='smalltext' colspan='2'>
266 <input type="entry" size="7" name="patient" class='inputtext' style='width:65px;' />
267 </td>
268 </tr>
269 <tr>
270 <td class='smalltext'><?php xl('by','e') ?>:</td>
271 <td class='smalltext'>
272 <a href="javascript:findPatient('Last');" class="navitem"><?php xl('Name','e'); ?></a>
273 </td>
274 <td class='smalltext' align='right'>
275 <a href="javascript:findPatient('ID');" class="navitem"><?php xl('ID','e'); ?></a>
276 </td>
277 </tr>
278 <tr>
279 <td class='smalltext'>&nbsp;</td>
280 <td class='smalltext'>
281 <a href="javascript:findPatient('SSN');" class="navitem"><?php xl('SSN','e'); ?></a>
282 </td>
283 <td class='smalltext' align='right'>
284 <a href="javascript:findPatient('DOB');" class="navitem"><?php xl('DOB','e'); ?></a>
285 </td>
286 </tr>
287 <tr>
288 <td class='smalltext'>&nbsp;</td>
289 <td class='smalltext'>
290 <a href="javascript:findPatient('Any');" class="navitem"><?php xl('Any', 'e'); ?></a>
291 </td>
292 <td class='smalltext' align='right'>
293 <a href="javascript:initFilter();" class="navitem"><?php xl('Filter', 'e'); ?></a>
294 </td>
295 </tr>
296 </table>
297 <?php
298 } // End function genFindBlock()
301 <html>
302 <head>
303 <title>Navigation</title>
304 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
306 <style type="text/css">
307 body {
308 font-size:8pt;
309 font-weight:normal;
310 padding: 5px 3px 5px 3px;
312 .smalltext {
313 font-family:sans-serif;
314 font-size:8pt;
315 font-weight:normal;
317 a.navitem, a.navitem:visited {
318 color:#0000ff;
319 font-family:sans-serif;
320 font-size:8pt;
321 font-weight:bold;
323 .inputtext {
324 font-size:9pt;
325 font-weight:normal;
326 border-style:solid;
327 border-width:1px;
328 padding-left:2px;
329 padding-right:2px;
330 border-color: #000000;
331 background-color:transparent;
334 #navigation ul {
335 background-color:transparent;
337 #navigation-slide ul {
338 background-color:transparent;
340 #navigation-slide a{
341 width: 92%;
343 .nav-menu-img{
344 width:25px;
345 height:25px;
346 border:none;
347 margin-right:5px;
348 vertical-align:middle;
350 </style>
352 <link rel="stylesheet" href="../../library/js/jquery.treeview-1.4.1/jquery.treeview.css" />
353 <script src="../../library/js/jquery-1.6.4.min.js" type="text/javascript"></script>
354 <script src="../../library/js/jquery.treeview-1.4.1/jquery.treeview.js" type="text/javascript"></script>
356 <script type="text/javascript" src="../../library/dialog.js"></script>
358 <script language='JavaScript'>
360 // tajemo work by CB 2012/01/31 12:32:57 PM dated reminders counter
361 function getReminderCount(){
362 top.restoreSession();
363 // Send the skip_timeout_reset parameter to not count this as a manual entry in the
364 // timing out mechanism in OpenEMR.
365 $.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
366 { skip_timeout_reset: "1" },
367 function(data) {
368 $("#reminderCountSpan").html(data);
369 // run updater every 60 seconds
370 var repeater = setTimeout("getReminderCount()", 60000);
374 $(document).ready(function (){
375 getReminderCount();//
376 parent.loadedFrameCount += 1;
378 // end of tajemo work dated reminders counter
380 // Master values for current pid and encounter.
381 var active_pid = 0;
382 var active_encounter = 0;
384 // Current selections in the top and bottom frames.
385 var topName = '';
386 var botName = '';
388 // Expand and/or collapse frames in response to checkbox clicks.
389 // fnum indicates which checkbox was clicked (1=left, 2=right).
390 function toggleFrame(fnum) {
391 var f = document.forms[0];
392 var fset = top.document.getElementById('fsright');
393 if (!f.cb_top.checked && !f.cb_bot.checked) {
394 if (fnum == 1) f.cb_bot.checked = true;
395 else f.cb_top.checked = true;
397 var rows = f.cb_top.checked ? '*' : '0';
398 rows += f.cb_bot.checked ? ',*' : ',0';
399 fset.rows = rows;
400 fset.rows = rows;
403 // Load the specified url into the specified frame (RTop or RBot).
404 // The URL provided must be relative to interface.
405 function loadFrame(fname, frame, url) {
406 top.restoreSession();
407 var i = url.indexOf('{PID}');
408 if (i >= 0) url = url.substring(0,i) + active_pid + url.substring(i+5);
409 top.frames[frame].location = '<?php echo "$web_root/interface/" ?>' + url;
410 if (frame == 'RTop') topName = fname; else botName = fname;
413 // Load the specified url into a frame to be determined, with the specified
414 // frame as the default; the url must be relative to interface.
415 function loadFrame2(fname, frame, url) {
416 var usage = fname.substring(3);
417 if (active_pid == 0 && usage > '0') {
418 alert('<?php xl('You must first select or add a patient.','e') ?>');
419 return false;
421 if (active_encounter == 0 && usage > '1') {
422 alert('<?php xl('You must first select or create an encounter.','e') ?>');
423 return false;
425 var f = document.forms[0];
426 top.restoreSession();
427 var i = url.indexOf('{PID}');
428 if (i >= 0) url = url.substring(0,i) + active_pid + url.substring(i+5);
429 if(f.sel_frame)
431 var fi = f.sel_frame.selectedIndex;
432 if (fi == 1) frame = 'RTop'; else if (fi == 2) frame = 'RBot';
434 if (!f.cb_bot.checked) frame = 'RTop'; else if (!f.cb_top.checked) frame = 'RBot';
435 top.frames[frame].location = '<?php echo "$web_root/interface/" ?>' + url;
436 if (frame == 'RTop') topName = fname; else botName = fname;
437 return false;
440 // Make sure the the top and bottom frames are open or closed, as specified.
441 function forceSpec(istop, isbot) {
442 var f = document.forms[0];
443 if (f.cb_top.checked != istop) {
444 f.cb_top.checked = istop;
445 toggleFrame(1);
447 if (f.cb_bot.checked != isbot) {
448 f.cb_bot.checked = isbot;
449 toggleFrame(2);
453 // Make sure both frames are open.
454 function forceDual() {
455 forceSpec(true, true);
458 // Load the specified url into a frame to be determined, with the specified
459 // frame as the default; the url must be relative to interface.
460 function loadFrameDual(tname, bname, topurl, boturl) {
461 var topusage = tname.substring(3);
462 var botusage = bname.substring(3);
463 if (active_pid == 0 && (topusage > '0' || botusage > '0')) {
464 alert('<?php xl('You must first select or add a patient.','e') ?>');
465 return false;
467 if (active_encounter == 0 && (topusage > '1' || botusage > '1')) {
468 alert('<?php xl('You must first select or create an encounter.','e') ?>');
469 return false;
471 var f = document.forms[0];
472 forceDual();
473 top.restoreSession();
474 var i = topurl.indexOf('{PID}');
475 if (i >= 0) topurl = topurl.substring(0,i) + active_pid + topurl.substring(i+5);
476 i = boturl.indexOf('{PID}');
477 if (i >= 0) boturl = boturl.substring(0,i) + active_pid + boturl.substring(i+5);
478 top.frames.RTop.location = '<?php echo "$web_root/interface/" ?>' + topurl;
479 top.frames.RBot.location = '<?php echo "$web_root/interface/" ?>' + boturl;
480 topName = tname;
481 botName = bname;
482 return false;
485 // Select a designated radio button. raname may be either the radio button
486 // array name (rb_top or rb_bot), or the frame name (RTop or RBot).
487 // You should call this if you directly load a document that does not
488 // correspond to the current radio button setting.
489 function setRadio(raname, rbid) {
490 <?php if ($GLOBALS['concurrent_layout'] < 2) { ?>
491 var f = document.forms[0];
492 if (raname == 'RTop') raname = 'rb_top';
493 if (raname == 'RBot') raname = 'rb_bot';
494 for (var i = 0; i < f[raname].length; ++i) {
495 if (f[raname][i].value.substring(0,3) == rbid) {
496 f[raname][i].checked = true;
497 return true;
500 <?php } ?>
501 return false;
504 // Set disabled/enabled state of radio buttons and associated labels
505 // depending on whether there is an active patient or encounter.
506 function syncRadios() {
507 var f = document.forms[0];
508 <?php if (($GLOBALS['concurrent_layout'] == 2)||($GLOBALS['concurrent_layout'] == 3)) { ?>
509 var nlinks = document.links.length;
510 for (var i = 0; i < nlinks; ++i) {
511 var lnk = document.links[i];
512 if (lnk.id.length != 4) continue;
513 var usage = lnk.id.substring(3);
514 if (usage == '1' || usage == '2') {
515 var da = false;
516 if (active_pid == 0) da = true;
517 if (active_encounter == 0 && usage > '1') da = true;
518 <?php
519 if ($GLOBALS['concurrent_layout'] == 2){
520 $color = "'#0000ff'";
521 }else{
522 $color = "'#000000'";
525 lnk.style.color = da ? '#888888' : <?php echo $color; ?>;
528 <?php } else if ($GLOBALS['concurrent_layout'] < 2) { ?>
529 for (var i = 0; i < f.rb_top.length; ++i) {
530 var da = false;
531 var rb1 = f.rb_top[i];
532 var rb2 = f.rb_bot[i];
533 var rbid = rb1.value.substring(0,3);
534 var usage = rb1.value.substring(3);
535 if (active_pid == 0 && usage > '0') da = true;
536 if (active_encounter == 0 && usage > '1') da = true;
537 // daemon_frame can also set special label colors, so don't mess with
538 // them unless we have to.
539 if (rb1.disabled != da) {
540 rb1.disabled = da;
541 rb2.disabled = da;
542 document.getElementById('lbl_' + rbid).style.color = da ? '#888888' : '#000000';
545 <?php } ?>
546 f.popups.disabled = (active_pid == 0);
549 function goHome() {
550 top.frames['RTop'].location='<?php echo $GLOBALS['default_top_pane']?>';
551 top.frames['RBot'].location='messages/messages.php?form_active=1';
554 //Function to clear active patient and encounter in the server side
555 function clearactive() {
556 top.restoreSession();
557 //Ajax call to clear active patient in session
558 $.ajax({
559 type: "POST",
560 url: "<?php echo $GLOBALS['webroot'] ?>/library/ajax/unset_session_ajax.php",
561 data: { func: "unset_pid"},
562 success:function( msg ) {
563 clearPatient();
564 top.frames['RTop'].location='<?php echo $GLOBALS['default_top_pane']?>';
565 top.frames['RBot'].location='messages/messages.php?form_active=1';
569 $(parent.Title.document.getElementById('clear_active')).hide();
571 // Reference to the search.php window.
572 var my_window;
574 // Open the search.php window.
575 function initFilter() {
576 my_window = window.open("../../custom/search.php", "mywindow","status=1");
579 // This is called by the search.php (Filter) window.
580 function processFilter(fieldString, serviceCode) {
581 var f = document.forms[0];
582 document.getElementById('searchFields').value = fieldString;
583 f.search_service_code.value = serviceCode;
584 findPatient("Filter");
585 f.search_service_code.value = '';
586 my_window.close();
589 // Process the click to find a patient by name, id, ssn or dob.
590 function findPatient(findby) {
591 var f = document.forms[0];
592 if (! f.cb_top.checked) {
593 f.cb_top.checked = true;
594 toggleFrame(1);
596 f.findBy.value = findby;
597 setRadio('rb_top', 'dem');
598 top.restoreSession();
599 document.find_patient.submit();
602 // Helper function to set the contents of a div.
603 function setSomeContent(id, content, doc) {
604 if (doc.getElementById) {
605 var x = doc.getElementById(id);
606 x.innerHTML = '';
607 x.innerHTML = content;
609 else if (doc.all) {
610 var x = doc.all[id];
611 x.innerHTML = content;
614 function setDivContent(id, content) {
615 setSomeContent(id, content, document);
617 function setTitleContent(id, content) {
618 setSomeContent(id, content, parent.Title.document);
621 // This is called automatically when a new patient is set, to make sure
622 // there are no patient-specific documents showing stale data. If a frame
623 // was just loaded with data for the correct patient, its name is passed so
624 // that it will not be zapped. At this point the new server-side pid is not
625 // assumed to be set, so this function will only load global data.
626 function reloadPatient(frname) {
627 var f = document.forms[0];
628 if (topName.length > 3 && topName.substring(3) > '0' && frname != 'RTop') {
629 loadFrame('cal0','RTop', '<?php echo $primary_docs['cal'][2]; ?>');
630 setRadio('rb_top', 'cal');
632 if (botName.length > 3 && botName.substring(3) > '0' && frname != 'RBot') {
633 loadFrame('ens0','RBot', '<?php echo $primary_docs['ens'][2]; ?>');
634 setRadio('rb_bot', 'ens');
638 // Reload encounter-specific frames, excluding a specified frame. At this
639 // point the new server-side encounter ID may not be set and loading the same
640 // document for the new encounter will not work, so load patient info instead.
641 function reloadEncounter(frname) {
642 var f = document.forms[0];
643 if (topName.length > 3 && topName.substring(3) > '1' && frname != 'RTop') {
644 loadFrame('dem1','RTop', '<?php echo $primary_docs['dem'][2]; ?>');
645 setRadio('rb_top', 'dem');
647 if (botName.length > 3 && botName.substring(3) > '1' && frname != 'RBot') {
648 loadFrame('ens1','RBot', '<?php echo $primary_docs['ens'][2]; ?>');
649 setRadio('rb_bot', 'ens');
653 // Clear and reload issue-related menu items for active_pid.
654 // Currently this only applies to athletic teams, but might be implemented
655 // in the general menu at some future time.
657 function reloadIssues() {
658 <?php
659 if ($GLOBALS['athletic_team']) {
660 // Generates a menu item for each active issue that this patient
661 // has of each issue type. Each one looks like this:
662 // Onset-Date [Add] Issue-Title
663 // where the first part is a link to open the issue dialog,
664 // [Add] is a link that auto-creates and opens a new encounter, and
665 // Issue-Title is a link that shows related encounters.
666 foreach ($ISSUE_TYPES as $key => $value) {
668 $('#icontainer_<?php echo $key ?>').empty();
669 if (active_pid != 0) {
670 $('#icontainer_<?php echo $key ?>').append("<li>" +
671 "<a href='' id='xxx1' onclick='return repPopup(" +
672 "\"../patient_file/summary/add_edit_issue.php?thistype=" +
673 "<?php echo $key; ?>\")' " +
674 "title='<?php echo xl('Create new issue'); ?>'>" +
675 "<?php echo xl('New') . " " . $value[1]; ?></a></li>");
676 top.restoreSession();
677 $.getScript('../../library/ajax/left_nav_issues_ajax.php?type=<?php echo $key; ?>');
679 <?php
683 } // end function reloadIssues
685 // This is referenced in left_nav_issues_ajax.php and is called when [Add]
686 // is clicked for an issue menu item to add a new encounter for the issue.
687 // So far this only applies to the Athletic Team version of the menu.
689 function addEncNotes(issue) {
691 // top.restoreSession();
692 // $.getScript('../../library/ajax/left_nav_encounter_ajax.php?createvisit=1&issue=' + issue);
694 // The above AJAX call was to create the encounter right away, but we later
695 // (2012-07-03) decided it's better to present the New Encounter form instead.
696 // Note the issue ID is passed so it will be pre-selected in that form.
697 loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=&issue=' + issue);
699 return false;
702 // Call this to announce that the patient has changed. You must call this
703 // if you change the session PID, so that the navigation frame will show the
704 // correct patient and so that the other frame will be reloaded if it contains
705 // patient-specific information from the previous patient. frname is the name
706 // of the frame that the call came from, so we know to only reload content
707 // from the *other* frame if it is patient-specific.
708 function setPatient(pname, pid, pubpid, frname, str_dob) {
709 var str = '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentPatientFromTitle()" title="PID = ' + pid + '"><b>' + pname + ' (' + pubpid + ')<br /></b></a>';
710 setDivContent('current_patient', str);
711 setTitleContent('current_patient', str + str_dob);
712 if (pid == active_pid) return;
713 setDivContent('current_encounter', '<b><?php xl('None','e'); ?></b>');
714 active_pid = pid;
715 active_encounter = 0;
716 if (frname) reloadPatient(frname);
717 syncRadios();
718 $(parent.Title.document.getElementById('current_patient_block')).show();
719 var encounter_block = $(parent.Title.document.getElementById('current_encounter_block'));
720 $(encounter_block).hide();
722 // zero out the encounter frame, replace it with the encounter list frame
723 var f = document.forms[0];
724 if ( f.cb_top.checked && f.cb_bot.checked ) {
725 var encounter_frame = getEncounterTargetFrame('enc');
726 if ( encounter_frame != undefined ) {
727 loadFrame('ens0',encounter_frame, '<?php echo $primary_docs['ens'][2]; ?>');
728 setRadio(encounter_frame, 'ens');
732 reloadIssues(pid);
733 $(parent.Title.document.getElementById('clear_active')).show();//To display Clear Active Patient button on selecting a patient
735 function setPatientEncounter(EncounterIdArray,EncounterDateArray,CalendarCategoryArray) {
736 //This function lists all encounters of the patient.
737 //This function writes the drop down in the top frame.
738 //It is called when a new patient is create/selected from the search menu.
739 var str = '<Select class="text" id="EncounterHistory" onchange="{top.restoreSession();toencounter(this.options[this.selectedIndex].value)}">';
740 str+='<option value=""><?php echo htmlspecialchars( xl('Encounter History'), ENT_QUOTES) ?></option>';
741 str+='<option value="New Encounter"><?php echo htmlspecialchars( xl('New Encounter'), ENT_QUOTES) ?></option>';
742 str+='<option value="Past Encounter List"><?php echo htmlspecialchars( xl('Past Encounter List'), ENT_QUOTES) ?></option>';
743 for(CountEncounter=0;CountEncounter<EncounterDateArray.length;CountEncounter++)
745 str+='<option value="'+EncounterIdArray[CountEncounter]+'~'+EncounterDateArray[CountEncounter]+'">'+EncounterDateArray[CountEncounter]+'-'+CalendarCategoryArray[CountEncounter]+'</option>';
747 str+='</Select>';
748 $(parent.Title.document.getElementById('past_encounter_block')).show();
749 top.window.parent.Title.document.getElementById('past_encounter').innerHTML=str;
752 function loadCurrentPatientFromTitle() {
753 top.frames['RTop'].location='../patient_file/summary/demographics.php';
756 function getEncounterTargetFrame( name ) {
757 var bias = <?php echo $primary_docs[ 'enc' ][ 1 ]?>;
758 var f = document.forms[0];
759 var r = 'RTop';
760 if (f.cb_top.checked && f.cb_bot.checked) {
761 if ( bias == 2 ) {
762 r = 'RBot';
763 } else {
764 r = 'RTop';
766 } else {
767 if ( f.cb_top.checked ) {
768 r = 'RTop';
769 } else if ( f.cb_bot.checked ) {
770 r = 'RBot';
773 return r;
776 // Call this to announce that the encounter has changed. You must call this
777 // if you change the session encounter, so that the navigation frame will
778 // show the correct encounter and so that the other frame will be reloaded if
779 // it contains encounter-specific information from the previous encounter.
780 // frname is the name of the frame that the call came from, so we know to only
781 // reload encounter-specific content from the *other* frame.
782 function setEncounter(edate, eid, frname) {
783 if (eid == active_encounter) return;
784 if (!eid) edate = '<?php xl('None','e'); ?>';
785 var str = '<b>' + edate + '</b>';
786 setDivContent('current_encounter', str);
787 active_encounter = eid;
788 reloadEncounter(frname);
789 syncRadios();
790 var encounter_block = $(parent.Title.document.getElementById('current_encounter_block'));
791 var encounter = $(parent.Title.document.getElementById('current_encounter'));
792 var estr = '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentEncounterFromTitle()"><b>' + edate + ' (' + eid + ')</b></a>';
793 encounter.html( estr );
794 encounter_block.show();
797 function loadCurrentEncounterFromTitle() {
798 top.frames[ parent.left_nav.getEncounterTargetFrame('enc') ].location='../patient_file/encounter/encounter_top.php';
801 // You must call this if you delete the active patient (or if for any other
802 // reason you "close" the active patient without opening a new one), so that
803 // the appearance of the navigation frame will be correct and so that any
804 // stale content will be reloaded.
805 function clearPatient() {
806 if (active_pid == 0) return;
807 var f = document.forms[0];
808 active_pid = 0;
809 active_encounter = 0;
810 setDivContent('current_patient', '<b><?php xl('None','e'); ?></b>');
811 $(parent.Title.document.getElementById('current_patient_block')).hide();
812 top.window.parent.Title.document.getElementById('past_encounter').innerHTML='';
813 $(parent.Title.document.getElementById('current_encounter_block')).hide();
814 reloadPatient('');
815 syncRadios();
818 // You must call this if you delete the active encounter (or if for any other
819 // reason you "close" the active encounter without opening a new one), so that
820 // the appearance of the navigation frame will be correct and so that any
821 // stale content will be reloaded.
822 function clearEncounter() {
823 if (active_encounter == 0) return;
824 top.window.parent.Title.document.getElementById('current_encounter').innerHTML="<b><?php echo htmlspecialchars( xl('None'), ENT_QUOTES) ?></b>";
825 active_encounter = 0;
826 reloadEncounter('');
827 syncRadios();
829 function removeOptionSelected(EncounterId)
830 {//Removes an item from the Encounter drop down.
831 var elSel = top.window.parent.Title.document.getElementById('EncounterHistory');
832 var i;
833 for (i = elSel.length - 1; i>=2; i--) {
834 EncounterHistoryValue=elSel.options[i].value;
835 EncounterHistoryValueArray=EncounterHistoryValue.split('~');
836 if (EncounterHistoryValueArray[0]==EncounterId) {
837 elSel.remove(i);
842 // You can call this to make sure the session pid is what we expect.
843 function pidSanityCheck(pid) {
844 if (pid != active_pid) {
845 alert('Session patient ID is ' + pid + ', expecting ' + active_pid +
846 '. This session is unstable and should be abandoned. Do not use ' +
847 'OpenEMR in multiple browser windows!');
848 return false;
850 return true;
853 // You can call this to make sure the session encounter is what we expect.
854 function encounterSanityCheck(eid) {
855 if (eid != active_encounter) {
856 alert('Session encounter ID is ' + eid + ', expecting ' + active_encounter +
857 '. This session is unstable and should be abandoned. Do not use ' +
858 'OpenEMR in multiple browser windows!');
859 return false;
861 return true;
864 // Pop up a report.
865 function repPopup(aurl) {
866 top.restoreSession();
867 window.open('<?php echo "$web_root/interface/reports/" ?>' + aurl, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
868 return false;
871 // This is invoked to pop up some window when a popup item is selected.
872 function selpopup(selobj) {
873 var i = selobj.selectedIndex;
874 var opt = selobj.options[i];
875 if (i > 0) {
876 var width = 750;
877 var height = 550;
878 if (opt.text == 'Export' || opt.text == 'Import') {
879 width = 500;
880 height = 400;
882 else if (opt.text == 'Refer') {
883 width = 700;
884 height = 500;
886 dlgopen(opt.value, '_blank', width, height);
888 selobj.selectedIndex = 0;
890 // Treeview activation stuff:
891 $(document).ready(function(){
892 if(3 == <?php echo $GLOBALS['concurrent_layout'] ?>){
893 $("#navigation-slide > li > a.collapsed + ul").slideToggle("medium");
894 $("#navigation-slide > li > ul > li > a.collapsed_lv2 + ul").slideToggle("medium");
895 $("#navigation-slide > li > a.expanded").click(function() {
896 $("#navigation-slide > li > a.expanded").not(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
897 $(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
899 $("#navigation-slide > li > a.collapsed").click(function() {
900 $("#navigation-slide > li > a.expanded").not(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
901 $(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
903 $("#navigation-slide > li > ul > li > a.expanded_lv2").click(function() {
904 $("#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");
905 $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
907 $("#navigation-slide > li > ul > li > a.collapsed_lv2").click(function() {
908 $("#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");
909 $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
911 $("#navigation-slide > li > a#cal0").prepend('<img src="../../images/calendar.png" class="nav-menu-img" />');
912 $("#navigation-slide > li > a#msg0").prepend('<img src="../../images/messages.png" class="nav-menu-img" />');
913 $("#navigation-slide > li > a#patimg").prepend('<img src="../../images/patient.png" class="nav-menu-img" />');
914 $("#navigation-slide > li > a#app0").prepend('<img src="../../images/patient.png" class="nav-menu-img" />');
915 $("#navigation-slide > li > a#repimg").prepend('<img src="../../images/reports.png" class="nav-menu-img" />');
916 $("#navigation-slide > li > a#feeimg").prepend('<img src="../../images/fee.png" class="nav-menu-img" />');
917 $("#navigation-slide > li > a#adm0").prepend('<img src="../../images/inventory.png" class="nav-menu-img" />');
918 $("#navigation-slide > li > a#invimg").prepend('<img src="../../images/inventory.png" class="nav-menu-img" />');
919 $("#navigation-slide > li > a#admimg").prepend('<img src="../../images/admin.png" class="nav-menu-img" />');
920 $("#navigation-slide > li > a#misimg").prepend('<img src="../../images/misc.png" class="nav-menu-img" />');
921 $("#navigation-slide > li > a#proimg").prepend('<img src="../../images/procedures.png" class="nav-menu-img" />');
922 $("#navigation-slide > li").each(function(index) {
923 if($(" > ul > li", this).size() == 0){
924 $(" > a", this).addClass("collapsed");
927 }else if(2 == <?php echo $GLOBALS['concurrent_layout'] ?>){
929 //Remove the links (used by the sliding menu) that will break treeview
930 $('a.collapsed').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
931 $('a.collapsed_lv2').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
932 $('a.expanded').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
933 $('a.expanded_lv2').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
935 // Initiate treeview
936 $("#navigation").treeview({
937 animated: "fast",
938 collapsed: true,
939 unique: <?php echo $GLOBALS['athletic_team'] ? 'false' : 'true' ?>,
940 toggle: function() {
941 window.console && console.log("%o was toggled", this);
947 </script>
949 </head>
951 <body class="body_nav">
953 <form method='post' name='find_patient' target='RTop'
954 action='<?php echo $rootdir ?>/main/finder/patient_select.php'>
956 <?php
957 // Find widget is at the top for the athletic team layout.
958 if ($GLOBALS['athletic_team']) {
959 genFindBlock();
960 echo "<hr />\n";
964 <?php if ( ( $GLOBALS['concurrent_layout'] == 2) || ($GLOBALS['concurrent_layout'] == 3) ) { ?>
965 <center>
966 <select name='sel_frame' style='background-color:transparent;font-size:9pt;width:<?php echo $GLOBALS['athletic_team'] ? 47 : 100; ?>%;'>
967 <option value='0'><?php xl('Default','e'); ?></option>
968 <option value='1'><?php xl('Top','e'); ?></option>
969 <option value='2'><?php xl('Bottom','e'); ?></option>
970 </select>
971 <?php if ($GLOBALS['athletic_team']) genPopupsList('width:47%'); ?>
972 </center>
974 <table cellpadding='0' cellspacing='0' border='0' width='100%'>
975 <tr>
976 <td class='smalltext' nowrap>
977 <input type='checkbox' name='cb_top' onclick='toggleFrame(1)' checked />
978 <b><?php xl('Top','e') ?></b>
979 </td>
980 <td class='smalltext' align='right' nowrap>
981 <b><?php xl('Bot','e') ?></b>
982 <input type='checkbox' name='cb_bot' onclick='toggleFrame(2)' <?php if (empty($GLOBALS['athletic_team'])) echo 'checked '; ?>/>
983 </td>
984 </tr>
985 </table>
987 <?php if ( $GLOBALS['concurrent_layout'] == 3) { ?>
988 <ul id="navigation-slide">
989 <?php } else { // ($GLOBALS['concurrent_layout'] == 2) ?>
990 <ul id="navigation">
991 <?php } ?>
993 <?php if ($GLOBALS['athletic_team']) { // Tree menu for athletic teams ?>
995 <?php genTreeLink('RBot','msg',xl('Messages')); ?>
996 <li><a class="collapsed" id="patimg" ><span><?php xl('View','e') ?></span></a>
997 <ul>
998 <?php genTreeLink('RTop','ros',xl('Weekly Exposures'),true); ?>
999 <?php genMiscLink('RTop','ros','0',xl('Team Roster'),'reports/old_players_report.php?embed=1',true); ?>
1000 <?php if (!$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar'),true); ?>
1001 </ul>
1002 </li>
1003 <li class="open"><a class="collapsed" id="patimg" ><span><?php xl('Demographics','e') ?></span></a>
1004 <ul>
1005 <?php genMiscLink('RTop','new','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?>
1006 <?php genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ? xl('New/Search') : xl('New'))); ?>
1007 <?php genTreeLink('RTop','dem',xl('Current')); ?>
1008 </ul>
1009 </li>
1010 <li class="open"><a class="expanded" id="patimg" ><span><?php xl('Medical Records','e') ?></span></a>
1011 <ul>
1012 <?php genDualLink('iss','ens',xl('All Injuries/Problems/Issues')); // with ens on bottom ?>
1013 <?php
1014 // Add a container for each issue type.
1015 foreach ($ISSUE_TYPES as $key => $value) {
1016 echo " <li class='open'><a class='collapsed_lv2'><span>" . xl('Active') . " " . $value[0] . "</span></a>\n";
1017 echo " <ul id='icontainer_$key'>\n";
1018 echo " </ul>\n";
1019 echo " </li>\n";
1022 <?php genDualLink('nen','ens',xl('New Consultation')); // with ens on bottom ?>
1023 <?php // genDualLink('enc','ens','Current Consultation'); // with ens on bottom ?>
1024 <?php genTreeLink('RTop','enc',xl('Current Consultation')); // encounter_top will itself load ens on bottom ?>
1025 <?php // genDualLink('dem','ens',xl('Previous Consultations')); // with dem on top ?>
1026 <?php genTreeLink('RBot','ens',xl('Previous Consultations'),true); ?>
1027 <?php genDualLink('his','ens',xl('Prev Med/Surg Hx')); // with ens on bottom ?>
1028 <?php // genPopLink(xl('New Allergy'),'../patient_file/summary/add_edit_issue.php?thistype=allergy','xxx1'); ?>
1029 <?php // genTreeLink('RTop','iss',xl('View/Edit Allergies')); // somehow emphasizing allergies...? ?>
1030 <?php if (!$GLOBALS['disable_immunizations']) genDualLink('his','imm',xl('Immunizations')); // imm on bottom, his on top ?>
1031 <?php if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genDualLink('his','pre',xl('Prescriptions')); // pre on bottom, his on top ?>
1032 <?php genTreeLink('RTop','doc',xl('Document/Imaging Store'),true); ?>
1033 <?php genDualLink('dem','pno',xl('Additional Notes')); // with dem on top ?>
1034 </ul>
1035 </li>
1036 <li class="open"><a class="collapsed" id="patimg" ><span><?php xl('Medical Administration','e') ?></span></a>
1037 <ul>
1038 <?php genDualLink('tra','ens',xl('Transactions/Referrals')); // new transaction form on top and tra list on bottom (or ens if no tra) ?>
1039 <?php genPopLink(xl('Address Book'),'../usergroup/addrbook_list.php?popup=1'); ?>
1040 <li><a href='' onClick="return repPopup('../patient_file/letter.php')" id='prp1'>Letter</a></li>
1041 <?php genTreeLink('RTop','prp',xl('Patient Printed Report')); ?>
1042 </ul>
1043 </li>
1044 <li class="open"><a class="collapsed" id="repimg" ><span><?php xl('Reports','e') ?></span></a>
1045 <ul>
1046 <li class="open"><a class="collapsed_lv2"><span><?php xl('Athletic/Injury','e') ?></span></a>
1047 <ul>
1048 <?php genTreeLink('RTop','prp',xl('Patient Printed Report')); // also appears above ?>
1049 <?php genPopLink(xl('Games/Events Missed'),'absences_report.php'); ?>
1050 <?php genPopLink(xl('Injury Surveillance'),'football_injury_report.php'); ?>
1051 <?php genPopLink(xl('Team Injury Overview'),'injury_overview_report.php'); ?>
1052 </ul>
1053 </li>
1054 <li><a class="collapsed_lv2"><span><?php xl('Patient/Client','e') ?></span></a>
1055 <ul>
1056 <?php genPopLink(xl('List'),'patient_list.php'); ?>
1057 <?php if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genPopLink(xl('Prescriptions'),'prescriptions_report.php'); ?>
1058 <?php genPopLink(xl('Referrals'),'referrals_report.php'); ?>
1059 </ul>
1060 </li>
1061 <li><a class="collapsed_lv2"><span><?php xl('Visits','e') ?></span></a>
1062 <ul>
1063 <?php if (!$GLOBALS['disable_calendar']) genPopLink(xl('Appointments'),'appointments_report.php'); ?>
1064 <?php genPopLink(xl('Encounters'),'encounters_report.php'); ?>
1065 <?php if (!$GLOBALS['disable_calendar']) genPopLink(xl('Appt-Enc'),'appt_encounter_report.php'); ?>
1066 </ul>
1067 </li>
1068 <li><a class="collapsed_lv2"><span><?php xl('General','e') ?></span></a>
1069 <ul>
1070 <?php genPopLink(xl('Services'),'services_by_category.php'); ?>
1071 <?php if ($GLOBALS['inhouse_pharmacy']) genPopLink(xl('Inventory'),'inventory_list.php'); ?>
1072 <?php if ($GLOBALS['inhouse_pharmacy']) genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?>
1073 </ul>
1074 </li>
1075 </ul>
1076 </li>
1077 <?php // TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1078 <?php if(!isset($GLOBALS['enable_fees_in_left_menu']) || $GLOBALS['enable_fees_in_left_menu'] == 1){ ?>
1079 <li><a class="collapsed" id="feeimg" ><span><?php xl('Fees','e') ?></span></a>
1080 <ul>
1081 <?php genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?>
1082 <?php genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?>
1083 </ul>
1084 </li>
1085 <?php } ?>
1086 <?php if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?>
1087 <li><a class="collapsed" id="admimg" ><span><?php xl('Administration','e') ?></span></a>
1088 <ul>
1089 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?>
1090 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?>
1091 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?>
1092 <?php genTreeLink('RTop','pwd','Users Password Change'); ?>
1093 <?php if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings'); ?>
1094 <?php if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Services')); ?>
1095 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?>
1096 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?>
1097 <?php if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?>
1098 <?php if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?>
1099 <?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'); ?>
1100 <li><a class="collapsed_lv2"><span><?php xl('Other','e') ?></span></a>
1101 <ul>
1102 <?php if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?>
1103 <?php if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?>
1104 <?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'); ?>
1105 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?>
1106 <?php if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?>
1107 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?>
1108 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?>
1109 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?>
1110 </ul>
1111 </li>
1112 </ul>
1113 </li>
1114 <li><a class="collapsed" id="misimg" ><span><?php xl('Miscellaneous','e') ?></span></a>
1115 <ul>
1116 <?php genTreeLink('RBot','aun',xl('Authorizations')); ?>
1117 <?php genTreeLink('RTop','fax',xl('Fax/Scan')); ?>
1118 <?php genTreeLink('RTop','adb',xl('Addr Book')); ?>
1119 <?php genTreeLink('RTop','ono',xl('Ofc Notes')); ?>
1120 <?php genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?>
1121 <?php genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?>
1122 </ul>
1123 </li>
1125 <?php } else { // not athletic team ?>
1127 <?php if (!$GLOBALS['disable_calendar'] && !$GLOBALS['ippf_specific']) genTreeLink('RTop','cal',xl('Calendar')); ?>
1128 <?php genTreeLink('RBot','msg',xl('Messages')); ?>
1129 <?php if ($GLOBALS['lab_exchange_enable']) genTreeLink('RTop', 'lab', xl('Check Lab Results'));?>
1130 <?php if($GLOBALS['portal_offsite_enable'] && $GLOBALS['portal_offsite_address'] && acl_check('patientportal','portal')) genTreeLink('RTop','app',xl('Portal Activity')); ?>
1131 <li class="open"><a class="expanded" id="patimg" ><span><?php xl('Patient/Client','e') ?></span></a>
1132 <ul>
1133 <?php genMiscLink('RTop','new','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?>
1134 <?php genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ? xl('New/Search') : xl('New'))); ?>
1135 <?php genTreeLink('RTop','dem',xl('Summary')); ?>
1136 <li class="open"><a class="expanded_lv2"><span><?php xl('Visits','e') ?></span></a>
1137 <ul>
1138 <?php if ($GLOBALS['ippf_specific'] && !$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar')); ?>
1139 <?php genTreeLink('RBot','nen',xl('Create Visit')); ?>
1140 <?php genTreeLink('RBot','enc',xl('Current')); ?>
1141 <?php genTreeLink('RBot','ens',xl('Visit History')); ?>
1142 </ul>
1143 </li>
1145 <li><a class="collapsed_lv2"><span><?php xl('Records','e') ?></span></a>
1146 <ul>
1147 <?php genTreeLink('RTop','prq',xl('Patient Record Request')); ?>
1148 </ul>
1149 </li>
1151 <?php if ($GLOBALS['gbl_nav_visit_forms']) { ?>
1152 <li><a class="collapsed_lv2"><span><?php xl('Visit Forms','e') ?></span></a>
1153 <ul>
1154 <?php
1155 // Generate the items for visit forms, both traditional and LBF.
1157 $lres = sqlStatement("SELECT * FROM list_options " .
1158 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
1159 if (sqlNumRows($lres)) {
1160 while ($lrow = sqlFetchArray($lres)) {
1161 $option_id = $lrow['option_id']; // should start with LBF
1162 $title = $lrow['title'];
1163 genMiscLink('RBot','cod','2',xl_form_title($title),
1164 "patient_file/encounter/load_form.php?formname=$option_id");
1167 include_once("$srcdir/registry.inc");
1168 $reg = getRegistered();
1169 if (!empty($reg)) {
1170 foreach ($reg as $entry) {
1171 $option_id = $entry['directory'];
1172 $title = trim($entry['nickname']);
1173 if ($option_id == 'fee_sheet' ) continue;
1174 if ($option_id == 'newpatient') continue;
1175 if (empty($title)) $title = $entry['name'];
1176 genMiscLink('RBot','cod','2',xl_form_title($title),
1177 "patient_file/encounter/load_form.php?formname=" .
1178 urlencode($option_id));
1182 </ul>
1183 </li>
1184 <?php } // end if gbl_nav_visit_forms ?>
1186 </ul>
1187 </li>
1188 <?php // TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1189 <?php if(!isset($GLOBALS['enable_fees_in_left_menu']) || $GLOBALS['enable_fees_in_left_menu'] == 1){ ?>
1190 <li><a class="collapsed" id="feeimg" ><span><?php xl('Fees','e') ?></span></a>
1191 <ul>
1192 <?php genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?>
1193 <?php if ($GLOBALS['use_charges_panel']) genTreeLink('RBot','cod',xl('Charges')); ?>
1194 <?php genMiscLink('RBot','pay','1',xl('Payment'),'patient_file/front_payment.php'); ?>
1195 <?php genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?>
1196 <?php if (! $GLOBALS['simplified_demographics']) genTreeLink('RTop','bil',xl('Billing')); ?>
1197 <?php genTreeLink('RTop','npa',xl('Batch Payments'),false,2);?>
1198 <?php if ($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob')) genTreeLink('RTop','edi',xl('EDI History'),false,2);?>
1199 </ul>
1200 </li>
1201 <?php } ?>
1202 <?php // if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?>
1203 <?php if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?>
1204 <li><a class="collapsed" id="invimg" ><span><?php xl('Inventory','e') ?></span></a>
1205 <ul>
1206 <?php genMiscLink('RTop','adm','0',xl('Management'),'drugs/drug_inventory.php'); ?>
1207 <?php genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?>
1208 </ul>
1209 </li>
1210 <?php } ?>
1211 <li><a class="collapsed" id="proimg" ><span><?php xl('Procedures','e') ?></span></a>
1212 <ul>
1213 <?php genTreeLink('RTop','ort',xl('Configuration')); ?>
1214 <?php genTreeLink('RTop','orp',xl('Pending Review')); ?>
1215 <?php genTreeLink('RTop','orr',xl('Patient Results')); ?>
1216 <?php genTreeLink('RTop','orb',xl('Batch Results')); ?>
1217 </ul>
1218 </li>
1219 <?php
1220 $newcrop_user_role=sqlQuery("select newcrop_user_role from users where username='".$_SESSION['authUser']."'");
1221 if($newcrop_user_role['newcrop_user_role'] && $GLOBALS['erx_enable']) { ?>
1222 <li><a class="collapsed" id="feeimg" ><span><?php xl('New Crop','e') ?></span></a>
1223 <ul>
1224 <li><a class="collapsed_lv2"><span><?php xl('Status','e') ?></span></a>
1225 <ul>
1226 <?php genTreeLink('RTop','erx',xl('e-Rx')); ?>
1227 <?php //genTreeLink('RTop','err',xl('e-Rx Renewal')); ?>
1228 <?php genMiscLink('RTop','err','0',xl('e-Rx Renewal'),'eRx.php?page=status'); ?>
1229 </ul>
1230 </li>
1231 </ul>
1232 </li>
1233 <?php } ?>
1234 <?php if (!$disallowed['adm']) { ?>
1235 <li><a class="collapsed" id="admimg" ><span><?php xl('Administration','e') ?></span></a>
1236 <ul>
1237 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?>
1238 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?>
1239 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?>
1240 <?php if (acl_check('admin', 'practice' )) genTreeLink('RTop','adb',xl('Addr Book')); ?>
1241 <?php
1242 // Changed the target URL from practice settings -> Practice Settings - Pharmacy... Dec 09,09 .. Visolve ... This replaces empty frame with Pharmacy window
1243 if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings&pharmacy&action=list'); ?>
1244 <?php if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Services')); ?>
1245 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?>
1246 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?>
1247 <?php if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?>
1248 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?>
1249 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?>
1250 <?php if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Rules'),'super/rules/index.php?action=browse!list'); ?>
1251 <?php if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Alerts'),'super/rules/index.php?action=alerts!listactmgr'); ?>
1252 <?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='); ?>
1253 <?php if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?>
1254 <?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'); ?>
1255 <?php if (acl_check('admin', 'super') && !empty($GLOBALS['code_types']['IPPF'])) genMiscLink('RTop','adm','0',xl('Export'),'main/ippf_export.php'); ?>
1256 <li><a class="collapsed_lv2"><span><?php xl('Other','e') ?></span></a>
1257 <ul>
1258 <?php if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?>
1259 <?php if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?>
1260 <?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'); ?>
1261 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?>
1262 <?php
1263 if($newcrop_user_role['newcrop_user_role'] || $GLOBALS['erx_enable']) {
1264 if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('eRx Logs'),'logview/erx_logview.php');
1267 <?php if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?>
1268 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?>
1269 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('External Data Loads'),'../interface/code_systems/dataloads_ajax.php'); ?>
1270 </ul>
1271 </li>
1272 </ul>
1273 </li>
1274 <?php } ?>
1275 <li><a class="collapsed" id="repimg" ><span><?php xl('Reports','e') ?></span></a>
1276 <ul>
1277 <li><a class="collapsed_lv2"><span><?php xl('Clients','e') ?></span></a>
1278 <ul>
1279 <?php genMiscLink('RTop','rep','0',xl('List'),'reports/patient_list.php'); ?>
1280 <?php if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genMiscLink('RTop','rep','0',xl('Rx'),'reports/prescriptions_report.php'); ?>
1281 <?php if (acl_check('patients', 'med')) genMiscLink('RTop','rep','0',xl('Clinical'),'reports/clinical_reports.php'); ?>
1282 <?php genMiscLink('RTop','rep','0',xl('Referrals'),'reports/referrals_report.php'); ?>
1283 <?php genMiscLink('RTop','rep','0',xl('Immunization Registry'),'reports/immunization_report.php'); ?>
1284 </ul>
1285 </li>
1286 <li><a class="collapsed_lv2"><span><?php xl('Clinic','e') ?></span></a>
1287 <ul>
1288 <?php if ($GLOBALS['enable_cdr'] || $GLOBALS['enable_cqm'] || $GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Report Results'),'reports/report_results.php'); ?>
1289 <?php if ($GLOBALS['enable_cdr']) genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?>
1290 <?php if ($GLOBALS['enable_cqm']) genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?>
1291 <?php if ($GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?>
1292 <?php if ($GLOBALS['enable_amc_tracking']) genMiscLink('RTop','rep','0',xl('AMC Tracking'),'reports/amc_tracking.php'); ?>
1293 </ul>
1294 </li>
1295 <li class="open"><a class="expanded_lv2"><span><?php xl('Visits','e') ?></span></a>
1296 <ul>
1297 <?php if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appointments'),'reports/appointments_report.php'); ?>
1298 <?php genMiscLink('RTop','rep','0',xl('Encounters'),'reports/encounters_report.php'); ?>
1299 <?php if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appt-Enc'),'reports/appt_encounter_report.php'); ?>
1300 <?php if (empty($GLOBALS['code_types']['IPPF'])) { ?>
1301 <?php genMiscLink('RTop','rep','0',xl('Superbill'),'reports/custom_report_range.php'); ?>
1302 <?php } ?>
1303 <?php genMiscLink('RTop','rep','0',xl('Eligibility'),'reports/edi_270.php'); ?>
1304 <?php genMiscLink('RTop','rep','0',xl('Eligibility Response'),'reports/edi_271.php'); ?>
1307 <?php if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Chart Activity'),'reports/chart_location_activity.php'); ?>
1308 <?php if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Charts Out'),'reports/charts_checked_out.php'); ?>
1309 <?php genMiscLink('RTop','rep','0',xl('Services'), 'reports/services_by_category.php'); ?>
1310 <?php genMiscLink('RTop','rep','0',xl('Syndromic Surveillance'),'reports/non_reported.php'); ?>
1311 </ul>
1312 </li>
1313 <?php if (acl_check('acct', 'rep_a')) { ?>
1314 <li><a class="collapsed_lv2"><span><?php xl('Financial','e') ?></span></a>
1315 <ul>
1316 <?php genMiscLink('RTop','rep','0',xl('Sales'),'reports/sales_by_item.php'); ?>
1317 <?php genMiscLink('RTop','rep','0',xl('Cash Rec'), 'billing/sl_receipts_report.php'); ?>
1318 <?php genMiscLink('RTop','rep','0',xl('Front Rec'), 'reports/front_receipts_report.php'); ?>
1319 <?php genMiscLink('RTop','rep','0',xl('Pmt Method'), 'reports/receipts_by_method_report.php'); ?>
1320 <?php genMiscLink('RTop','rep','0',xl('Collections'), 'reports/collections_report.php'); ?>
1321 <?php genMiscLink('RTop','rep','0',xl('Financial Summary by Service Code'),'reports/svc_code_financial_report.php'); ?>
1322 </ul>
1323 </li>
1324 <?php } ?>
1325 <?php if ($GLOBALS['inhouse_pharmacy']) { ?>
1326 <li><a class="collapsed_lv2"><span><?php xl('Inventory','e') ?></span></a>
1327 <ul>
1328 <?php genMiscLink('RTop','rep','0',xl('List'),'reports/inventory_list.php'); ?>
1329 <?php genMiscLink('RTop','rep','0',xl('Activity'),'reports/inventory_activity.php'); ?>
1330 <?php genMiscLink('RTop','rep','0',xl('Transactions'),'reports/inventory_transactions.php'); ?>
1331 </ul>
1332 </li>
1333 <?php } ?>
1334 <li><a class="collapsed_lv2"><span><?php xl('Procedures','e') ?></span></a>
1335 <ul>
1336 <?php genPopLink(xl('Pending Res'),'../orders/pending_orders.php'); ?>
1337 <?php if (!empty($GLOBALS['code_types']['IPPF'])) genPopLink(xl('Pending F/U'),'../orders/pending_followup.php'); ?>
1338 <?php genPopLink(xl('Statistics'),'../orders/procedure_stats.php'); ?>
1339 </ul>
1340 </li>
1341 <?php if (! $GLOBALS['simplified_demographics']) { ?>
1342 <li><a class="collapsed_lv2"><span><?php xl('Insurance','e') ?></span></a>
1343 <ul>
1344 <?php genMiscLink('RTop','rep','0',xl('Distribution'),'reports/insurance_allocation_report.php'); ?>
1345 <?php genMiscLink('RTop','rep','0',xl('Indigents'),'billing/indigent_patients_report.php'); ?>
1346 <?php genMiscLink('RTop','rep','0',xl('Unique SP'),'reports/unique_seen_patients_report.php'); ?>
1347 </ul>
1348 </li>
1349 <?php } ?>
1350 <?php if (!empty($GLOBALS['code_types']['IPPF'])) { ?>
1351 <li><a class="collapsed_lv2"><span><?php xl('Statistics','e') ?></span></a>
1352 <ul>
1353 <?php genPopLink(xl('IPPF Stats'),'ippf_statistics.php?t=i'); ?>
1354 <?php genPopLink(xl('GCAC Stats'),'ippf_statistics.php?t=g'); ?>
1355 <?php genPopLink(xl('MA Stats'),'ippf_statistics.php?t=m'); ?>
1356 <?php genPopLink(xl('CYP'),'ippf_cyp_report.php'); ?>
1357 <?php genPopLink(xl('Daily Record'),'ippf_daily.php'); ?>
1358 </ul>
1359 </li>
1360 <?php } // end ippf-specific ?>
1361 <li><a class="collapsed_lv2"><span><?php xl('Blank Forms','e') ?></span></a>
1362 <ul>
1363 <?php genPopLink(xl('Demographics'),'../patient_file/summary/demographics_print.php'); ?>
1364 <?php genPopLink(xl('Superbill/Fee Sheet'),'../patient_file/printed_fee_sheet.php'); ?>
1365 <?php genPopLink(xl('Referral'),'../patient_file/transaction/print_referral.php'); ?>
1366 <?php
1367 $lres = sqlStatement("SELECT * FROM list_options " .
1368 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
1369 while ($lrow = sqlFetchArray($lres)) {
1370 $option_id = $lrow['option_id']; // should start with LBF
1371 $title = $lrow['title'];
1372 genPopLink($title, "../forms/LBF/printable.php?formname=$option_id");
1375 </ul>
1376 </li>
1377 <?php // genTreeLink('RTop','rep','Other'); ?>
1378 </ul>
1379 </li>
1380 <li><a class="collapsed" id="misimg" ><span><?php xl('Miscellaneous','e') ?></span></a>
1381 <ul>
1382 <?php genTreeLink('RTop','ped',xl('Patient Education')); ?>
1383 <?php genTreeLink('RBot','aun',xl('Authorizations')); ?>
1384 <?php genTreeLink('RTop','fax',xl('Fax/Scan')); ?>
1385 <?php genTreeLink('RTop','adb',xl('Addr Book')); ?>
1386 <?php genTreeLink('RTop','ort',xl('Order Catalog')); ?>
1387 <?php if (!$GLOBALS['disable_chart_tracker']) genTreeLink('RTop','cht',xl('Chart Tracker')); ?>
1388 <?php genTreeLink('RTop','ono',xl('Ofc Notes')); ?>
1389 <?php genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?>
1390 <?php genTreeLink('RTop','pwd',xl('Password')); ?>
1391 <?php genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?>
1392 </ul>
1393 </li>
1395 <?php } // end not athletic team ?>
1397 </ul>
1399 <?php } else { // end ($GLOBALS['concurrent_layout'] == 2 || $GLOBALS['concurrent_layout'] == 3) ?>
1401 <table cellpadding='0' cellspacing='0' border='0'>
1402 <tr>
1403 <td colspan='3'>
1404 <table cellpadding='0' cellspacing='0' border='0' width='100%'>
1405 <tr>
1406 <td class='smalltext' nowrap>
1407 <input type='checkbox' name='cb_top' onclick='toggleFrame(1)' checked /><b><?php xl('Top','e') ?></b>
1408 </td>
1409 <td class='smalltext' align='right' nowrap>
1410 <b><?php xl('Bot','e') ?></b><input type='checkbox' name='cb_bot' onclick='toggleFrame(2)' checked />
1411 </td>
1412 </tr>
1413 </table>
1414 </td>
1415 </tr>
1416 <?php
1417 // Builds the table of radio buttons and their labels. Radio button values
1418 // are comprised of the 3-character document id and the 1-digit usage type,
1419 // so that JavaScript can easily access this information.
1420 $default_top_rbid = $GLOBALS['athletic_team'] ? 'ros' : 'cal';
1421 foreach ($primary_docs as $key => $varr) {
1422 if (!empty($disallowed[$key])) continue;
1423 $label = $varr[0];
1424 $usage = $varr[1];
1425 $url = $varr[2];
1426 echo " <tr>\n";
1427 echo " <td class='smalltext'><input type='radio' name='rb_top' value='$key$usage' " .
1428 "onclick=\"loadFrame('$key$usage','RTop','$url')\"";
1429 if ($key == $default_top_rbid) echo " checked";
1430 echo " /></td>\n";
1431 echo " <td class='smalltext' id='lbl_$key'>$label</td>\n";
1432 echo " <td class='smalltext'><input type='radio' name='rb_bot' value='$key$usage' " .
1433 "onclick=\"loadFrame('$key$usage','RBot','$url')\"";
1434 if ($key == 'msg') echo " checked";
1435 echo " /></td>\n";
1436 echo " </tr>\n";
1439 </table>
1441 <?php } ?>
1443 <br /><hr />
1445 <?php
1446 // To use RelayHealth, see comments and parameters in includes/config.php.
1447 if (!empty($GLOBALS['ssi']['rh'])) {
1448 include_once("../../library/ssi.inc");
1449 echo getRelayHealthLink() ."<br /><hr />\n";
1453 <div id='current_patient' style = 'display:none'>
1454 <b><?php xl('None','e'); ?></b>
1455 </div>
1457 <div id='current_encounter' style = 'display:none'>
1458 <b><?php xl('None','e'); ?></b>
1459 </div>
1461 <?php
1462 if (!$GLOBALS['athletic_team']) {
1463 genPopupsList();
1464 echo "<hr />\n";
1465 genFindBlock();
1466 echo "<hr />\n";
1470 <?php if (!empty($GLOBALS['online_support_link'])) { ?>
1471 <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>
1472 <?php } ?>
1474 <input type='hidden' name='findBy' value='Last' />
1475 <input type="hidden" name="searchFields" id="searchFields"/>
1476 <input type="hidden" name="search_service_code" value='' />
1478 </form>
1480 <script language='JavaScript'>
1481 syncRadios();
1482 </script>
1484 </body>
1485 </html>