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