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