Import font-awesome via bower and change to font-awesome icons in left_nav menu.
[openemr.git] / interface / main / left_nav.php
blob28334d1d94557648708592aa8cb5bd0aa6a0e1c7
1 <?php
2 use ESign\Api;
3 /* Copyright (C) 2006-2012 Rod Roark <rod@sunsetsystems.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 */
11 // This provides the left navigation frame when $GLOBALS['concurrent_layout']
12 // is true. Following are notes as to what else was changed for this feature:
14 // * interface/main/main_screen.php: the top-level frameset.
15 // * interface/main/finder/patient_select.php: loads stuff when a new patient
16 // is selected.
17 // * interface/patient_file/summary/demographics.php: this is the first frame
18 // loaded when a new patient is chosen, and in turn sets the current pid and
19 // then loads the initial bottom frame.
20 // * interface/patient_file/summary/demographics_full.php: added support for
21 // setting a new pid, needed for going to demographics from billing.
22 // * interface/patient_file/summary/demographics_save.php: redisplay
23 // demographics.php and not the frameset.
24 // * interface/patient_file/summary/summary_bottom.php: new frameset for the
25 // summary, prescriptions and notes for a selected patient, cloned from
26 // patient_summary.php.
27 // * interface/patient_file/encounter/encounter_bottom.php: new frameset for
28 // the selected encounter, mosting coding/billing stuff, cloned from
29 // patient_encounter.php. This will also self-load the superbill pages
30 // as requested.
31 // * interface/usergroup/user_info.php: removed Back link.
32 // * interface/usergroup/admin_frameset.php: new frameset for Admin pages,
33 // cloned from usergroup.php.
34 // * interface/main/onotes/office_comments.php: removed Back link target.
35 // * interface/main/onotes/office_comments_full.php: changed Back link.
36 // * interface/billing/billing_report.php: removed Back link; added logic
37 // to properly go to demographics or to an encounter when requested.
38 // * interface/new/new.php: removed Back link and revised form target.
39 // * interface/new/new_patient_save.php: modified to load the demographics
40 // page to the current frame instead of loading a new frameset.
41 // * interface/patient_file/history/history.php: target change.
42 // * interface/patient_file/history/history_full.php: target changes.
43 // * interface/patient_file/history/history_save.php: target change.
44 // * interface/patient_file/history/encounters.php: link/target changes.
45 // * interface/patient_file/encounter/encounter_top.php: another new frameset
46 // cloned from patient_encounter.php.
47 // * interface/patient_file/encounter/forms.php: link target removal.
48 // * interface/patient_file/encounter/new_form.php: target change.
49 // * interface/forms/newpatient/new.php, view.php, save.php: link/target
50 // changes.
51 // * interface/patient_file/summary/immunizations.php: removed back link.
52 // * interface/patient_file/summary/pnotes.php: changed link targets.
53 // * interface/patient_file/summary/pnotes_full.php: changed back link and
54 // added set_pid logic.
55 // * interface/patient_file/transaction/transactions.php: various changes.
56 // * interface/patient_file/transaction/add_transaction.php: new return js.
57 // * interface/patient_file/encounter/superbill_codes.php: target and link
58 // changes.
59 // * interface/patient_file/encounter/superbill_custom_full.php: target and
60 // link changes.
61 // * interface/patient_file/encounter/diagnosis.php: target changes.
62 // * interface/patient_file/encounter/diagnosis_full.php: target and link
63 // changes.
64 // * interface/main/authorizations/authorizations.php: link and target changes.
65 // * library/api.inc: url change.
66 // * interface/patient_file/summary/rx_frameset.php: new frameset.
67 // * interface/patient_file/summary/rx_left.php: new for prescriptions.
68 // * all encounter forms: remove all instances of "target=Main" and change
69 // all instances of "patient_encounter.php" to "encounter_top.php".
71 // Our find_patient form, when submitted, invokes patient_select.php in the
72 // upper frame. When the patient is selected, demographics.php is invoked
73 // with the set_pid parameter, which establishes the new session pid and also
74 // calls the setPatient() function (below). In this case demographics.php
75 // will also load the summary frameset into the bottom frame, invoking our
76 // loadFrame() and setRadio() functions.
78 // Similarly, we have the concept of selecting an encounter from the
79 // Encounters list, and then having that "stick" until some other encounter
80 // or a new encounter is chosen. We also have a navigation item for creating
81 // a new encounter. interface/patient_file/encounter/encounter_top.php
82 // supports set_encounter to establish an encounter.
84 // TBD: Include active_pid and/or active_encounter in relevant submitted
85 // form data, and add logic to the save routines to make sure they match
86 // the corresponding session values.
88 require_once("../globals.php");
89 require_once($GLOBALS['fileroot']."/library/acl.inc");
90 require_once($GLOBALS['fileroot']."/custom/code_types.inc.php");
91 require_once($GLOBALS['fileroot']."/library/patient.inc");
92 require_once($GLOBALS['fileroot']."/library/lists.inc");
93 require_once $GLOBALS['srcdir'].'/ESign/Api.php';
95 // This array defines the list of primary documents that may be
96 // chosen. Each element value is an array of 3 values:
98 // * Name to appear in the navigation table
99 // * Usage: 0 = global, 1 = patient-specific, 2 = encounter-specific
100 // * The URL relative to the interface directory
103 $primary_docs = array(
104 'cal' => array(xl('Calendar') , 0, 'main/main_info.php'),
105 'pfb' => array(xl('Patient Flow Board') , 0, '../interface/patient_tracker/patient_tracker.php?skip_timeout_reset=1'),
106 'app' => array(xl('Portal Activity') , 0, '../myportal/index.php'),
107 'msg' => array(xl('Messages') , 0, 'main/messages/messages.php?form_active=1'),
108 'pwd' => array(xl('Password') , 0, 'usergroup/user_info.php'),
109 'prf' => array(xl('Preferences') , 0, 'super/edit_globals.php?mode=user'),
110 'adm' => array(xl('Admin') , 0, 'usergroup/admin_frameset.php'),
111 'rep' => array(xl('Reports') , 0, 'reports/index.php'),
112 'ono' => array(xl('Ofc Notes') , 0, 'main/onotes/office_comments.php'),
113 'fax' => array(xl('Fax/Scan') , 0, 'fax/faxq.php'),
114 'adb' => array(xl('Addr Bk') , 0, 'usergroup/addrbook_list.php'),
115 'orl' => array(xl('Proc Prov') , 0, 'orders/procedure_provider_list.php'),
116 'ort' => array(xl('Proc Cat') , 0, 'orders/types.php'),
117 'orc' => array(xl('Proc Load') , 0, 'orders/load_compendium.php'),
118 'orb' => array(xl('Proc Bat') , 0, 'orders/orders_results.php?batch=1'),
119 'ore' => array(xl('E-Reports') , 0, 'orders/list_reports.php'),
120 'ppo' => array(xl('CMS Portal'), 0, 'cmsportal/list_requests.php'),
121 'cht' => array(xl('Chart Trk') , 0, '../custom/chart_tracker.php'),
122 'imp' => array(xl('Import') , 0, '../custom/import.php'),
123 'bil' => array(xl('Billing') , 0, 'billing/billing_report.php'),
124 'sup' => array(xl('Superbill') , 0, 'patient_file/encounter/superbill_custom_full.php'),
125 'aun' => array(xl('Authorizations'), 0, 'main/authorizations/authorizations.php'),
126 'new' => array(xl('New Pt') , 0, 'new/new.php'),
127 'ped' => array(xl('Patient Education'), 0, 'reports/patient_edu_web_lookup.php'),
128 'lab' => array(xl('Check Lab Results') , 0, 'orders/lab_exchange.php'),
129 'dem' => array(xl('Patient') , 1, "patient_file/summary/demographics.php"),
130 'his' => array(xl('History') , 1, 'patient_file/history/history.php'),
131 'ens' => array(xl('Visit History'), 1, 'patient_file/history/encounters.php'),
132 'nen' => array(xl('Create Visit'), 1, 'forms/newpatient/new.php?autoloaded=1&calenc='),
133 'pre' => array(xl('Rx') , 1, 'patient_file/summary/rx_frameset.php'),
134 'iss' => array(xl('Issues') , 1, 'patient_file/summary/stats_full.php?active=all'),
135 'imm' => array(xl('Immunize') , 1, 'patient_file/summary/immunizations.php'),
136 'doc' => array(xl('Documents') , 1, '../controller.php?document&list&patient_id={PID}'),
137 'orp' => array(xl('Proc Pending Rev'), 1, 'orders/orders_results.php?review=1'),
138 'orr' => array(xl('Proc Res') , 1, 'orders/orders_results.php'),
139 'lda' => array(xl('Lab overview') , 1, 'patient_file/summary/labdata.php'),
140 'tan' => array(xl('Configure Tracks') , 0, 'forms/track_anything/create.php'),
141 'prp' => array(xl('Pt Report') , 1, 'patient_file/report/patient_report.php'),
142 'prq' => array(xl('Pt Rec Request') , 1, 'patient_file/transaction/record_request.php'),
143 'pno' => array(xl('Pt Notes') , 1, 'patient_file/summary/pnotes.php'),
144 'tra' => array(xl('Transact') , 1, 'patient_file/transaction/transactions.php'),
145 'sum' => array(xl('Summary') , 1, 'patient_file/summary/summary_bottom.php'),
146 'enc' => array(xl('Encounter') , 2, 'patient_file/encounter/encounter_top.php'),
147 'erx' => array(xl('e-Rx') , 1, 'eRx.php'),
148 'err' => array(xl('e-Rx Renewal') , 1, 'eRx.php?page=status'),
149 'ere' => array(xl('e-Rx EPCS') , 1, 'eRx.php?page=epcs-admin'),
150 'pay' => array(xl('Payment') , 1, '../patient_file/front_payment.php'),
151 'edi' => array(xl('EDI History') , 0, 'billing/edih_view.php'),
152 'eob' => array(xl('Posting') , 0, 'billing/sl_eob_search.php'),
153 'dld' => array(xl('Display Documents'), 0, 'main/display_documents.php')
155 $primary_docs['npa']=array(xl('Batch Payments') , 0, 'billing/new_payment.php');
156 if ($GLOBALS['use_charges_panel'] || $GLOBALS['concurrent_layout'] == 2) {
157 $primary_docs['cod'] = array(xl('Charges'), 2, 'patient_file/encounter/encounter_bottom.php');
160 $esignApi = new Api();
161 // This section decides which navigation items will not appear.
163 $disallowed = array();
164 $disallowed['edi'] = !($GLOBALS['enable_edihistory_in_left_menu'] || acl_check('acct', 'eob'));
165 $disallowed['adm'] = !(acl_check('admin', 'calendar') ||
166 acl_check('admin', 'database') || acl_check('admin', 'forms') ||
167 acl_check('admin', 'practice') || acl_check('admin', 'users') ||
168 acl_check('admin', 'acl') || acl_check('admin', 'super') ||
169 acl_check('admin', 'superbill') || acl_check('admin', 'drugs'));
171 $disallowed['bil'] = !(acl_check('acct', 'rep') || acl_check('acct', 'eob') ||
172 acl_check('acct', 'bill'));
174 $disallowed['new'] = !(acl_check('patients','demo','',array('write','addonly') ));
176 $disallowed['fax'] = !($GLOBALS['enable_hylafax'] || $GLOBALS['enable_scanner']);
178 $disallowed['iss'] = !((acl_check('encounters','notes','','write') ||
179 acl_check('encounters','notes_a','','write') ) &&
180 acl_check('patients','med','','write') );
182 $disallowed['imp'] = $disallowed['new'] ||
183 !is_readable("$webserver_root/custom/import.php");
185 $disallowed['cht'] = !is_readable("$webserver_root/custom/chart_tracker.php");
187 $disallowed['pre'] = !(acl_check('patients', 'med'));
188 $disallowed['eob'] = !(acl_check('acct', 'eob'));
190 // Helper functions for treeview generation.
191 function genTreeLink($frame, $name, $title, $mono=false) {
192 global $primary_docs, $disallowed;
193 if (empty($disallowed[$name])) {
194 $id = $name . $primary_docs[$name][1];
195 echo "<li><a href='' id='$id' onclick=\"";
196 if ($mono) {
197 if ($frame == 'RTop')
198 echo "forceSpec(true,false);";
199 else
200 echo "forceSpec(false,true);";
202 echo "return loadFrame2('$id','$frame','" .
203 $primary_docs[$name][2] . "')\">" . $title . ($name == 'msg' ? ' <span id="reminderCountSpan" class="bold"></span>' : '')."</a></li>";
206 function genMiscLink($frame, $name, $level, $title, $url, $mono=false) {
207 global $disallowed;
208 if (empty($disallowed[$name])) {
209 $id = $name . $level;
210 echo "<li><a href='' id='$id' onclick=\"";
211 if ($mono) {
212 if ($frame == 'RTop')
213 echo "forceSpec(true,false);";
214 else
215 echo "forceSpec(false,true);";
217 echo "return loadFrame2('$id','$frame','" .
218 $url . "')\">" . $title . "</a></li>";
221 function genMiscLink2($frame, $name, $level, $title, $url, $mono=false,$mouseovertext="") {
222 global $disallowed;
223 if (empty($disallowed[$name])) {
225 $id = $name . $level;
226 echo "<li><a href='' id='$id' title='$mouseovertext' onclick=\"";
227 if ($mono) {
228 if ($frame == 'RTop')
229 echo "forceSpec(true,false);";
230 else
231 echo "forceSpec(false,true);";
233 echo "return loadFrame3('$id','$frame','" .
234 $url . "')\">" . $title . "</a></li>";
237 function genPopLink($title, $url, $linkid='') {
238 echo "<li><a href='' ";
239 if ($linkid) echo "id='$linkid' ";
240 echo "onclick=\"return repPopup('$url')\"" .
241 ">" . $title . "</a></li>";
243 function genDualLink($topname, $botname, $title) {
244 global $primary_docs, $disallowed;
245 if (empty($disallowed[$topname]) && empty($disallowed[$botname])) {
246 $topid = $topname . $primary_docs[$topname][1];
247 $botid = $botname . $primary_docs[$botname][1];
248 echo "<li><a href='' id='$topid' " .
249 "onclick=\"return loadFrameDual('$topid','$botid','" .
250 $primary_docs[$topname][2] . "','" .
251 $primary_docs[$botname][2] . "')\">" . $title . "</a></li>";
255 function genPopupsList($style='') {
256 global $disallowed, $webserver_root;
258 <select name='popups' onchange='selpopup(this)' style='background-color:transparent;font-size:9pt;<?php echo $style; ?>'>
259 <option value=''><?php xl('Popups','e'); ?></option>
260 <?php if (!$disallowed['iss']) { ?>
261 <option value='../patient_file/problem_encounter.php'><?php xl('Issues','e'); ?></option>
262 <?php } ?>
263 <?php if (!$GLOBALS['ippf_specific']) { ?>
264 <option value='../../custom/export_xml.php'><?php xl('Export','e'); ?></option>
265 <option value='../../custom/import_xml.php'><?php xl('Import','e'); ?></option>
266 <?php }
267 if (!$GLOBALS['disable_calendar']) { ?>
268 <option value='../reports/appointments_report.php?patient=<?php if(isset($pid)) {echo $pid;} ?>'><?php xl('Appts','e'); ?></option>
269 <?php } ;
270 if (file_exists("$webserver_root/custom/refer.php")) { ?>
271 <option value='../../custom/refer.php'><?php xl('Refer','e'); ?></option>
272 <?php } ?>
273 <option value='../patient_file/printed_fee_sheet.php?fill=1'><?php xl('Superbill','e'); ?></option>
274 <option value='../patient_file/front_payment.php'><?php xl('Payment','e'); ?></option>
275 <?php if ($GLOBALS['inhouse_pharmacy']) { ?>
276 <option value='../patient_file/pos_checkout.php'><?php xl('Checkout','e'); ?></option>
277 <?php } ?>
278 <?php if (is_dir($GLOBALS['OE_SITE_DIR'] . "/letter_templates")) { ?>
279 <option value='../patient_file/letter.php'><?php xl('Letter','e'); ?></option>
280 <?php } ?>
281 <?php if ($GLOBALS['chart_label_type'] != '0') { ?>
282 <option value='../patient_file/label.php'><?php xl('Chart Label','e'); ?></option>
283 <?php } ?>
284 <?php if ($GLOBALS['barcode_label_type'] != '0') { ?>
285 <option value='../patient_file/barcode_label.php'><?php xl('Barcode Label','e'); ?></option>
286 <?php } ?>
287 <?php if ($GLOBALS['addr_label_type']) { ?>
288 <option value='../patient_file/addr_label.php'><?php xl('Address Label','e'); ?></option>
289 <?php } ?>
290 </select>
291 <?php
294 function genFindBlock() {
296 <table cellpadding='0' cellspacing='0' border='0'>
297 <tr>
298 <td class='smalltext'><?php xl('Find','e') ?>:&nbsp;</td>
299 <td class='smalltext' colspan='2'>
300 <input type="entry" size="7" name="patient" class='inputtext' style='width:65px;' />
301 </td>
302 </tr>
303 <tr>
304 <td class='smalltext'><?php xl('by','e') ?>:</td>
305 <td class='smalltext'>
306 <a href="javascript:findPatient('Last');" class="navitem"><?php xl('Name','e'); ?></a>
307 </td>
308 <td class='smalltext' align='right'>
309 <a href="javascript:findPatient('ID');" class="navitem"><?php xl('ID','e'); ?></a>
310 </td>
311 </tr>
312 <tr>
313 <td class='smalltext'>&nbsp;</td>
314 <td class='smalltext'>
315 <a href="javascript:findPatient('SSN');" class="navitem"><?php xl('SSN','e'); ?></a>
316 </td>
317 <td class='smalltext' align='right'>
318 <a href="javascript:findPatient('DOB');" class="navitem"><?php xl('DOB','e'); ?></a>
319 </td>
320 </tr>
321 <tr>
322 <td class='smalltext'>&nbsp;</td>
323 <td class='smalltext'>
324 <a href="javascript:findPatient('Any');" class="navitem"><?php xl('Any', 'e'); ?></a>
325 </td>
326 <td class='smalltext' align='right'>
327 <a href="javascript:initFilter();" class="navitem"><?php xl('Filter', 'e'); ?></a>
328 </td>
329 </tr>
330 </table>
331 <?php
332 } // End function genFindBlock()
335 <html>
336 <head>
337 <title>Navigation</title>
339 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
340 <link rel="stylesheet" href="<?php echo $GLOBALS['rootdir'];?>/static/font-awesome/css/font-awesome.css" type="text/css">
341 <style type="text/css">
342 body {
343 font-size:8pt;
344 font-weight:normal;
345 padding: 5px 3px 5px 3px;
347 .smalltext {
348 font-family:sans-serif;
349 font-size:8pt;
350 font-weight:normal;
352 a.navitem, a.navitem:visited {
353 color:#0000ff;
354 font-family:sans-serif;
355 font-size:8pt;
356 font-weight:bold;
358 .inputtext {
359 font-size:9pt;
360 font-weight:normal;
361 border-style:solid;
362 border-width:1px;
363 padding-left:2px;
364 padding-right:2px;
365 border-color: #000000;
366 background-color:transparent;
369 #navigation ul {
370 background-color:transparent;
372 #navigation-slide ul {
373 background-color:transparent;
375 #navigation-slide a{
376 width: 92%;
378 .nav-menu-img{
379 width:25px;
380 height:25px;
381 border:none;
382 margin-right:5px;
383 vertical-align:middle;
385 </style>
387 <link rel="stylesheet" href="../../library/js/jquery.treeview-1.4.1/jquery.treeview.css" />
388 <script src="../../library/js/jquery-1.6.4.min.js" type="text/javascript"></script>
389 <script src="../../library/js/jquery.treeview-1.4.1/jquery.treeview.js" type="text/javascript"></script>
391 <script type="text/javascript" src="../../library/dialog.js"></script>
393 <script language='JavaScript'>
395 // tajemo work by CB 2012/01/31 12:32:57 PM dated reminders counter
396 function getReminderCount(){
397 top.restoreSession();
398 // Send the skip_timeout_reset parameter to not count this as a manual entry in the
399 // timing out mechanism in OpenEMR.
400 $.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
401 { skip_timeout_reset: "1" },
402 function(data) {
403 $("#reminderCountSpan").html(data);
404 // run updater every 60 seconds
405 var repeater = setTimeout("getReminderCount()", 60000);
407 //piggy-back on this repeater to run other background-services
408 //this is a silent task manager that returns no output
409 $.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/execute_background_services.php",
410 { skip_timeout_reset: "1", ajax: "1" });
413 $(document).ready(function (){
414 getReminderCount();//
415 parent.loadedFrameCount += 1;
416 <?php if ($GLOBALS['drop_bottom'] ==1) { ?>
417 $("input[name=cb_bot]").trigger('click');
418 toggleFrame(2);
419 <?php } ?>
421 // end of tajemo work dated reminders counter
423 // Master values for current pid and encounter.
424 var active_pid = 0;
425 var active_encounter = 0;
426 var encounter_locked = false;
428 // Current selections in the top and bottom frames.
429 var topName = '';
430 var botName = '';
432 // Expand and/or collapse frames in response to checkbox clicks.
433 // fnum indicates which checkbox was clicked (1=left, 2=right).
434 function toggleFrame(fnum) {
435 var f = document.forms[0];
436 var fset = top.document.getElementById('fsright');
437 if (!f.cb_top.checked && !f.cb_bot.checked) {
438 if (fnum == 1) f.cb_bot.checked = true;
439 else f.cb_top.checked = true;
441 var rows = f.cb_top.checked ? '*' : '0';
442 rows += f.cb_bot.checked ? ',*' : ',0';
443 fset.rows = rows;
444 fset.rows = rows;
447 // Load the specified url into the specified frame (RTop or RBot).
448 // The URL provided must be relative to interface.
449 function loadFrame(fname, frame, url) {
450 top.restoreSession();
451 var i = url.indexOf('{PID}');
452 if (i >= 0) url = url.substring(0,i) + active_pid + url.substring(i+5);
453 top.frames[frame].location = '<?php echo "$web_root/interface/" ?>' + url;
454 if (frame == 'RTop') topName = fname; else botName = fname;
457 // Load the specified url into a frame to be determined, with the specified
458 // frame as the default; the url must be relative to interface.
459 function loadFrame2(fname, frame, url) {
460 var usage = fname.substring(3);
461 if (active_pid == 0 && usage > '0') {
462 alert('<?php xl('You must first select or add a patient.','e') ?>');
463 return false;
465 if (active_encounter == 0 && usage > '1') {
466 alert('<?php xl('You must first select or create an encounter.','e') ?>');
467 return false;
469 if (encounter_locked && usage > '1') {
470 alert('<?php echo xls('This encounter is locked. No new forms can be added.') ?>');
471 return false;
473 var f = document.forms[0];
474 top.restoreSession();
475 var i = url.indexOf('{PID}');
476 if (i >= 0) url = url.substring(0,i) + active_pid + url.substring(i+5);
477 if(f.sel_frame)
479 var fi = f.sel_frame.selectedIndex;
480 if (fi == 1) frame = 'RTop'; else if (fi == 2) frame = 'RBot';
482 if (!f.cb_bot.checked) frame = 'RTop'; else if (!f.cb_top.checked) frame = 'RBot';
483 top.frames[frame].location = '<?php echo "$web_root/interface/" ?>' + url;
484 if (frame == 'RTop') topName = fname; else botName = fname;
485 return false;
488 function loadFrame3(fname, frame, url) {
489 var f = document.forms[0];
490 top.restoreSession();
491 var i = url.indexOf('{PID}');
492 if (i >= 0) url = url.substring(0,i) + active_pid + url.substring(i+5);
493 if(f.sel_frame)
495 var fi = f.sel_frame.selectedIndex;
496 if (fi == 1) frame = 'RTop'; else if (fi == 2) frame = 'RBot';
498 if (!f.cb_bot.checked) frame = 'RTop'; else if (!f.cb_top.checked) frame = 'RBot';
499 top.frames[frame].location = '<?php echo "$web_root/interface/" ?>' + url;
500 if (frame == 'RTop') topName = fname; else botName = fname;
501 return false;
504 // Make sure the the top and bottom frames are open or closed, as specified.
505 function forceSpec(istop, isbot) {
506 var f = document.forms[0];
507 if (f.cb_top.checked != istop) {
508 f.cb_top.checked = istop;
509 toggleFrame(1);
511 if (f.cb_bot.checked != isbot) {
512 f.cb_bot.checked = isbot;
513 toggleFrame(2);
517 // Make sure both frames are open.
518 function forceDual() {
519 forceSpec(true, true);
522 // Load the specified url into a frame to be determined, with the specified
523 // frame as the default; the url must be relative to interface.
524 function loadFrameDual(tname, bname, topurl, boturl) {
525 var topusage = tname.substring(3);
526 var botusage = bname.substring(3);
527 if (active_pid == 0 && (topusage > '0' || botusage > '0')) {
528 alert('<?php xl('You must first select or add a patient.','e') ?>');
529 return false;
531 if (active_encounter == 0 && (topusage > '1' || botusage > '1')) {
532 alert('<?php xl('You must first select or create an encounter.','e') ?>');
533 return false;
535 if (encounter_locked && (topusage > '1' || botusage > '1')) {
536 alert('<?php echo xls('This encounter is locked. No new forms can be added.') ?>');
537 return false;
539 var f = document.forms[0];
540 forceDual();
541 top.restoreSession();
542 var i = topurl.indexOf('{PID}');
543 if (i >= 0) topurl = topurl.substring(0,i) + active_pid + topurl.substring(i+5);
544 i = boturl.indexOf('{PID}');
545 if (i >= 0) boturl = boturl.substring(0,i) + active_pid + boturl.substring(i+5);
546 top.frames.RTop.location = '<?php echo "$web_root/interface/" ?>' + topurl;
547 top.frames.RBot.location = '<?php echo "$web_root/interface/" ?>' + boturl;
548 topName = tname;
549 botName = bname;
550 return false;
553 // Select a designated radio button. raname may be either the radio button
554 // array name (rb_top or rb_bot), or the frame name (RTop or RBot).
555 // You should call this if you directly load a document that does not
556 // correspond to the current radio button setting.
557 function setRadio(raname, rbid) {
558 <?php if ($GLOBALS['concurrent_layout'] < 2) { ?>
559 var f = document.forms[0];
560 if (raname == 'RTop') raname = 'rb_top';
561 if (raname == 'RBot') raname = 'rb_bot';
562 for (var i = 0; i < f[raname].length; ++i) {
563 if (f[raname][i].value.substring(0,3) == rbid) {
564 f[raname][i].checked = true;
565 return true;
568 <?php } ?>
569 return false;
572 // Set disabled/enabled state of radio buttons and associated labels
573 // depending on whether there is an active patient or encounter.
574 function syncRadios() {
575 var f = document.forms[0];
576 encounter_locked = isEncounterLocked(active_encounter);
577 <?php if (($GLOBALS['concurrent_layout'] == 2)||($GLOBALS['concurrent_layout'] == 3)) { ?>
578 var nlinks = document.links.length;
579 for (var i = 0; i < nlinks; ++i) {
580 var lnk = document.links[i];
581 if (lnk.id.length != 4) continue;
582 var usage = lnk.id.substring(3);
583 if (usage == '1' || usage == '2') {
584 var da = false;
585 if (active_pid == 0) da = true;
586 if (active_encounter == 0 && usage > '1') da = true;
587 if (encounter_locked && usage > '1') da = true;
588 <?php
589 if ($GLOBALS['concurrent_layout'] == 2){
590 $color = "'#0000ff'";
591 }else{
592 $color = "'#000000'";
595 lnk.style.color = da ? '#888888' : <?php echo $color; ?>;
598 <?php } else if ($GLOBALS['concurrent_layout'] < 2) { ?>
599 for (var i = 0; i < f.rb_top.length; ++i) {
600 var da = false;
601 var rb1 = f.rb_top[i];
602 var rb2 = f.rb_bot[i];
603 var rbid = rb1.value.substring(0,3);
604 var usage = rb1.value.substring(3);
605 if (active_pid == 0 && usage > '0') da = true;
606 if (active_encounter == 0 && usage > '1') da = true;
607 if (encounter_locked && usage > '1') da = true;
608 // daemon_frame can also set special label colors, so don't mess with
609 // them unless we have to.
610 if (rb1.disabled != da) {
611 rb1.disabled = da;
612 rb2.disabled = da;
613 document.getElementById('lbl_' + rbid).style.color = da ? '#888888' : '#000000';
616 <?php } ?>
617 f.popups.disabled = (active_pid == 0);
620 function goHome() {
621 top.frames['RTop'].location='<?php echo $GLOBALS['default_top_pane']?>';
622 top.frames['RBot'].location='messages/messages.php?form_active=1';
625 //Function to clear active patient and encounter in the server side
626 function clearactive() {
627 top.restoreSession();
628 //Ajax call to clear active patient in session
629 $.ajax({
630 type: "POST",
631 url: "<?php echo $GLOBALS['webroot'] ?>/library/ajax/unset_session_ajax.php",
632 data: { func: "unset_pid"},
633 success:function( msg ) {
634 clearPatient();
635 top.frames['RTop'].location='<?php echo $GLOBALS['default_top_pane']?>';
636 top.frames['RBot'].location='messages/messages.php?form_active=1';
640 $(parent.Title.document.getElementById('clear_active')).hide();
642 // Reference to the search.php window.
643 var my_window;
645 // Open the search.php window.
646 function initFilter() {
647 my_window = window.open("../../custom/search.php", "mywindow","status=1");
650 // This is called by the search.php (Filter) window.
651 function processFilter(fieldString, serviceCode) {
652 var f = document.forms[0];
653 document.getElementById('searchFields').value = fieldString;
654 f.search_service_code.value = serviceCode;
655 findPatient("Filter");
656 f.search_service_code.value = '';
657 my_window.close();
660 // Process the click to find a patient by name, id, ssn or dob.
661 function findPatient(findby) {
662 var f = document.forms[0];
663 if (! f.cb_top.checked) {
664 f.cb_top.checked = true;
665 toggleFrame(1);
667 f.findBy.value = findby;
668 setRadio('rb_top', 'dem');
669 top.restoreSession();
670 document.find_patient.submit();
673 // Helper function to set the contents of a div.
674 function setSomeContent(id, content, doc) {
675 if (doc.getElementById) {
676 var x = doc.getElementById(id);
677 x.innerHTML = '';
678 x.innerHTML = content;
680 else if (doc.all) {
681 var x = doc.all[id];
682 x.innerHTML = content;
685 function setDivContent(id, content) {
686 setSomeContent(id, content, document);
688 function setTitleContent(id, content) {
689 setSomeContent(id, content, parent.Title.document);
692 // This is called automatically when a new patient is set, to make sure
693 // there are no patient-specific documents showing stale data. If a frame
694 // was just loaded with data for the correct patient, its name is passed so
695 // that it will not be zapped. At this point the new server-side pid is not
696 // assumed to be set, so this function will only load global data.
697 function reloadPatient(frname) {
698 var f = document.forms[0];
699 if (topName.length > 3 && topName.substring(3) > '0' && frname != 'RTop') {
700 loadFrame('cal0','RTop', '<?php echo $primary_docs['cal'][2]; ?>');
701 setRadio('rb_top', 'cal');
703 if (botName.length > 3 && botName.substring(3) > '0' && frname != 'RBot') {
704 loadFrame('ens0','RBot', '<?php echo $primary_docs['ens'][2]; ?>');
705 setRadio('rb_bot', 'ens');
709 // Reload encounter-specific frames, excluding a specified frame. At this
710 // point the new server-side encounter ID may not be set and loading the same
711 // document for the new encounter will not work, so load patient info instead.
712 function reloadEncounter(frname) {
713 var f = document.forms[0];
714 if (topName.length > 3 && topName.substring(3) > '1' && frname != 'RTop') {
715 loadFrame('dem1','RTop', '<?php echo $primary_docs['dem'][2]; ?>');
716 setRadio('rb_top', 'dem');
718 if (botName.length > 3 && botName.substring(3) > '1' && frname != 'RBot') {
719 loadFrame('ens1','RBot', '<?php echo $primary_docs['ens'][2]; ?>');
720 setRadio('rb_bot', 'ens');
725 // Commented out this code block are part of the removal of the athletic team code TLH
727 // Clear and reload issue-related menu items for active_pid.
728 // Currently this only applies to athletic teams, but might be implemented
729 // in the general menu at some future time.
731 //function reloadIssues() {
732 //<?php
733 //if ($GLOBALS['athletic_team']) {
734 // Generates a menu item for each active issue that this patient
735 // has of each issue type. Each one looks like this:
736 // Onset-Date [Add] Issue-Title
737 // where the first part is a link to open the issue dialog,
738 // [Add] is a link that auto-creates and opens a new encounter, and
739 // Issue-Title is a link that shows related encounters.
740 //foreach ($ISSUE_TYPES as $key => $value) {
741 //?>
742 //$('#icontainer_<?php echo $key ?>').empty();
743 //if (active_pid != 0) {
744 // $('#icontainer_<?php echo $key ?>').append("<li>" +
745 // "<a href='' id='xxx1' onclick='return repPopup(" +
746 // "\"../patient_file/summary/add_edit_issue.php?thistype=" +
747 // "<?php echo $key; ?>\")' " +
748 // "title='<?php echo xl('Create new issue'); ?>'>" +
749 // "<?php echo xl('New') . " " . $value[1]; ?></a></li>");
750 // top.restoreSession();
751 // $.getScript('../../library/ajax/left_nav_issues_ajax.php?type=<?php echo $key; ?>');
752 // }
753 //<?php
754 // }
755 // }
756 //?>
757 //} // end function reloadIssues
759 // This is referenced in left_nav_issues_ajax.php and is called when [Add]
760 // is clicked for an issue menu item to add a new encounter for the issue.
761 // So far this only applies to the Athletic Team version of the menu.
763 //function addEncNotes(issue) {
765 // top.restoreSession();
766 // $.getScript('../../library/ajax/left_nav_encounter_ajax.php?createvisit=1&issue=' + issue);
768 // The above AJAX call was to create the encounter right away, but we later
769 // (2012-07-03) decided it's better to present the New Encounter form instead.
770 // Note the issue ID is passed so it will be pre-selected in that form.
771 //loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=&issue=' + issue);
773 //return false;
776 // Commented out the above code block are part of the removal of the athletic team code TLH
780 // Call this to announce that the patient has changed. You must call this
781 // if you change the session PID, so that the navigation frame will show the
782 // correct patient and so that the other frame will be reloaded if it contains
783 // patient-specific information from the previous patient. frname is the name
784 // of the frame that the call came from, so we know to only reload content
785 // from the *other* frame if it is patient-specific.
786 function setPatient(pname, pid, pubpid, frname, str_dob) {
787 var str = '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentPatientFromTitle()" title="PID = ' + pid + '"><b>' + pname + ' (' + pubpid + ')<br /></b></a>';
788 setDivContent('current_patient', str);
789 setTitleContent('current_patient', str + str_dob);
790 if (pid == active_pid) return;
791 setDivContent('current_encounter', '<b><?php xl('None','e'); ?></b>');
792 active_pid = pid;
793 active_encounter = 0;
794 encounter_locked = false;
795 if (frname) reloadPatient(frname);
796 syncRadios();
797 $(parent.Title.document.getElementById('current_patient_block')).show();
798 var encounter_block = $(parent.Title.document.getElementById('current_encounter_block'));
799 $(encounter_block).hide();
801 // zero out the encounter frame, replace it with the encounter list frame
802 var f = document.forms[0];
803 if ( f.cb_top.checked && f.cb_bot.checked ) {
804 var encounter_frame = getEncounterTargetFrame('enc');
805 if ( encounter_frame != undefined ) {
806 loadFrame('ens0',encounter_frame, '<?php echo $primary_docs['ens'][2]; ?>');
807 setRadio(encounter_frame, 'ens');
811 $(parent.Title.document.getElementById('clear_active')).show();//To display Clear Active Patient button on selecting a patient
813 function setPatientEncounter(EncounterIdArray,EncounterDateArray,CalendarCategoryArray) {
814 //This function lists all encounters of the patient.
815 //This function writes the drop down in the top frame.
816 //It is called when a new patient is create/selected from the search menu.
817 var str = '<Select class="text" id="EncounterHistory" onchange="{top.restoreSession();toencounter(this.options[this.selectedIndex].value)}">';
818 str+='<option value=""><?php echo htmlspecialchars( xl('Encounter History'), ENT_QUOTES) ?></option>';
819 str+='<option value="New Encounter"><?php echo htmlspecialchars( xl('New Encounter'), ENT_QUOTES) ?></option>';
820 str+='<option value="Past Encounter List"><?php echo htmlspecialchars( xl('Past Encounter List'), ENT_QUOTES) ?></option>';
821 for(CountEncounter=0;CountEncounter<EncounterDateArray.length;CountEncounter++)
823 str+='<option value="'+EncounterIdArray[CountEncounter]+'~'+EncounterDateArray[CountEncounter]+'">'+EncounterDateArray[CountEncounter]+'-'+CalendarCategoryArray[CountEncounter]+'</option>';
825 str+='</Select>';
826 $(parent.Title.document.getElementById('past_encounter_block')).show();
827 top.window.parent.Title.document.getElementById('past_encounter').innerHTML=str;
830 function loadCurrentPatientFromTitle() {
831 top.restoreSession();
832 top.frames['RTop'].location='../patient_file/summary/demographics.php';
835 function getEncounterTargetFrame( name ) {
836 var bias = <?php echo $primary_docs[ 'enc' ][ 1 ]?>;
837 var f = document.forms[0];
838 var r = 'RTop';
839 if (f.cb_top.checked && f.cb_bot.checked) {
840 if ( bias == 2 ) {
841 r = 'RBot';
842 } else {
843 r = 'RTop';
845 } else {
846 if ( f.cb_top.checked ) {
847 r = 'RTop';
848 } else if ( f.cb_bot.checked ) {
849 r = 'RBot';
852 return r;
854 function isEncounterLocked( encounterId ) {
855 <?php if ( $esignApi->lockEncounters() ) { ?>
856 // If encounter locking is enabled, make a syncronous call (async=false) to check the
857 // DB to see if the encounter is locked.
858 // Call restore session, just in case
859 top.restoreSession();
860 $.ajax({
861 type: 'POST',
862 url: '<?php echo $GLOBALS['webroot']?>/interface/esign/index.php?module=encounter&method=esign_is_encounter_locked',
863 data: { encounterId : encounterId },
864 success: function( data ) {
865 encounter_locked = data;
867 dataType: 'json',
868 async:false
869 });
870 return encounter_locked;
871 <?php } else { ?>
872 // If encounter locking isn't enabled, just tell the left_nav that the encounter
873 // isn't locked.
874 return false;
875 <?php } ?>
877 // Call this to announce that the encounter has changed. You must call this
878 // if you change the session encounter, so that the navigation frame will
879 // show the correct encounter and so that the other frame will be reloaded if
880 // it contains encounter-specific information from the previous encounter.
881 // frname is the name of the frame that the call came from, so we know to only
882 // reload encounter-specific content from the *other* frame.
883 function setEncounter(edate, eid, frname) {
884 if (eid == active_encounter) return;
885 if (!eid) edate = '<?php xl('None','e'); ?>';
886 var str = '<b>' + edate + '</b>';
887 setDivContent('current_encounter', str);
888 active_encounter = eid;
889 encounter_locked=isEncounterLocked(active_encounter);
890 reloadEncounter(frname);
891 syncRadios();
892 var encounter_block = $(parent.Title.document.getElementById('current_encounter_block'));
893 var encounter = $(parent.Title.document.getElementById('current_encounter'));
894 var estr = '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentEncounterFromTitle()"><b>' + edate + ' (' + eid + ')</b></a>';
895 encounter.html( estr );
896 encounter_block.show();
899 function loadCurrentEncounterFromTitle() {
900 top.restoreSession();
901 top.frames[ parent.left_nav.getEncounterTargetFrame('enc') ].location='../patient_file/encounter/encounter_top.php';
904 // You must call this if you delete the active patient (or if for any other
905 // reason you "close" the active patient without opening a new one), so that
906 // the appearance of the navigation frame will be correct and so that any
907 // stale content will be reloaded.
908 function clearPatient() {
909 if (active_pid == 0) return;
910 var f = document.forms[0];
911 active_pid = 0;
912 active_encounter = 0;
913 encounter_locked = false;
914 setDivContent('current_patient', '<b><?php xl('None','e'); ?></b>');
915 $(parent.Title.document.getElementById('current_patient_block')).hide();
916 top.window.parent.Title.document.getElementById('past_encounter').innerHTML='';
917 $(parent.Title.document.getElementById('current_encounter_block')).hide();
918 reloadPatient('');
919 syncRadios();
922 // You must call this if you delete the active encounter (or if for any other
923 // reason you "close" the active encounter without opening a new one), so that
924 // the appearance of the navigation frame will be correct and so that any
925 // stale content will be reloaded.
926 function clearEncounter() {
927 if (active_encounter == 0) return;
928 top.window.parent.Title.document.getElementById('current_encounter').innerHTML="<b><?php echo htmlspecialchars( xl('None'), ENT_QUOTES) ?></b>";
929 active_encounter = 0;
930 encounter_locked = false;
931 reloadEncounter('');
932 syncRadios();
934 function removeOptionSelected(EncounterId)
935 {//Removes an item from the Encounter drop down.
936 var elSel = top.window.parent.Title.document.getElementById('EncounterHistory');
937 var i;
938 for (i = elSel.length - 1; i>=2; i--) {
939 EncounterHistoryValue=elSel.options[i].value;
940 EncounterHistoryValueArray=EncounterHistoryValue.split('~');
941 if (EncounterHistoryValueArray[0]==EncounterId) {
942 elSel.remove(i);
947 // You can call this to make sure the session pid is what we expect.
948 function pidSanityCheck(pid) {
949 if (pid != active_pid) {
950 alert('Session patient ID is ' + pid + ', expecting ' + active_pid +
951 '. This session is unstable and should be abandoned. Do not use ' +
952 'OpenEMR in multiple browser windows!');
953 return false;
955 return true;
958 // You can call this to make sure the session encounter is what we expect.
959 function encounterSanityCheck(eid) {
960 if (eid != active_encounter) {
961 alert('Session encounter ID is ' + eid + ', expecting ' + active_encounter +
962 '. This session is unstable and should be abandoned. Do not use ' +
963 'OpenEMR in multiple browser windows!');
964 return false;
966 return true;
969 // Pop up a report.
970 function repPopup(aurl) {
971 top.restoreSession();
972 window.open('<?php echo "$web_root/interface/reports/" ?>' + aurl, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
973 return false;
976 // This is invoked to pop up some window when a popup item is selected.
977 function selpopup(selobj) {
978 var i = selobj.selectedIndex;
979 var opt = selobj.options[i];
980 if (i > 0) {
981 var width = 750;
982 var height = 550;
983 if (opt.text == 'Export' || opt.text == 'Import') {
984 width = 500;
985 height = 400;
987 else if (opt.text == 'Refer') {
988 width = 700;
989 height = 500;
991 dlgopen(opt.value, '_blank', width, height);
993 selobj.selectedIndex = 0;
995 // Treeview activation stuff:
996 $(document).ready(function(){
997 if(3 == <?php echo $GLOBALS['concurrent_layout'] ?>){
998 $("#navigation-slide > li > a.collapsed + ul").slideToggle("medium");
999 $("#navigation-slide > li > ul > li > a.collapsed_lv2 + ul").slideToggle("medium");
1000 $("#navigation-slide > li > a.expanded").click(function() {
1001 $("#navigation-slide > li > a.expanded").not(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1002 $(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1004 $("#navigation-slide > li > a.collapsed").click(function() {
1005 $("#navigation-slide > li > a.expanded").not(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1006 $(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
1008 $("#navigation-slide > li > ul > li > a.expanded_lv2").click(function() {
1009 $("#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");
1010 $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
1012 $("#navigation-slide > li > ul > li > a.collapsed_lv2").click(function() {
1013 $("#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");
1014 $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
1016 $("#navigation-slide > li > a#cal0").prepend('<i class="fa fa-fw fa-calendar"></i>&nbsp;');
1017 $("#navigation-slide > li > a#pfb0").prepend('<i class="fa fa-fw fa-list-alt"></i>&nbsp;');
1018 $("#navigation-slide > li > a#msg0").prepend('<i class="fa fa-fw fa-envelope-o"></i>&nbsp;');
1019 $("#navigation-slide > li > a#app0").prepend('<i class="fa fa-fw fa-user"></i>&nbsp;');
1020 $("#navigation-slide > li > a#ppo0").prepend('<i class="fa fa-fw fa-user"></i>&nbsp;');
1021 $("#navigation-slide > li > a#repimg").prepend('<i class="fa fa-fw fa-area-chart"></i>&nbsp;');
1022 $("#navigation-slide > li > a#feeimg").prepend('<i class="fa fa-fw fa-dollar"></i>&nbsp;');
1023 $("#navigation-slide > li > a#adm0").prepend('<i class="fa fa-fw fa-list-ol"></i>&nbsp;');
1024 $("#navigation-slide > li > a#invimg").prepend('<i class="fa fa-fw fa-list-ol"></i>&nbsp;');
1025 $("#navigation-slide > li > a#admimg").prepend('<i class="fa fa-fw fa-cogs"></i>&nbsp;');
1026 $("#navigation-slide > li > a#misimg").prepend('<i class="fa fa-fw fa-cog"></i>&nbsp;');
1027 $("#navigation-slide > li > a#proimg").prepend('<i class="fa fa-fw fa-stethoscope"></i>&nbsp;');
1028 $("#navigation-slide > li > a#modimg").prepend('<i class="fa fa-fw fa-puzzle-piece"></i>&nbsp;');
1029 $("#navigation-slide > li").each(function(index) {
1030 if($(" > ul > li", this).size() == 0){
1031 $(" > a", this).addClass("collapsed");
1034 }else if(2 == <?php echo $GLOBALS['concurrent_layout'] ?>){
1036 //Remove the links (used by the sliding menu) that will break treeview
1037 $('a.collapsed').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
1038 $('a.collapsed_lv2').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
1039 $('a.expanded').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
1040 $('a.expanded_lv2').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
1042 // Initiate treeview
1043 $("#navigation").treeview({
1044 animated: "fast",
1045 collapsed: true,
1046 unique: true,
1047 toggle: function() {
1048 window.console && console.log("%o was toggled", this);
1054 </script>
1056 </head>
1058 <body class="body_nav main-left">
1060 <form method='post' name='find_patient' target='RTop'
1061 action='<?php echo $rootdir ?>/main/finder/patient_select.php'>
1063 <?php if ( ( $GLOBALS['concurrent_layout'] == 2) || ($GLOBALS['concurrent_layout'] == 3) ) { ?>
1064 <center>
1065 <select name='sel_frame' style='background-color:transparent;font-size:9pt;width:100;'>
1066 <option value='0'><?php xl('Default','e'); ?></option>
1067 <option value='1'><?php xl('Top','e'); ?></option>
1068 <option value='2'><?php xl('Bottom','e'); ?></option>
1069 </select>
1070 </center>
1072 <table cellpadding='0' cellspacing='0' border='0' width='100%'>
1073 <tr>
1074 <td class='smalltext' nowrap>
1075 <input type='checkbox' name='cb_top' onclick='toggleFrame(1)' checked />
1076 <b><?php xl('Top','e') ?></b>
1077 </td>
1078 <td class='smalltext' align='right' nowrap>
1079 <b><?php xl('Bot','e') ?></b>
1080 <input type='checkbox' name='cb_bot' onclick='toggleFrame(2)' checked />
1081 </td>
1082 </tr>
1083 </table>
1085 <?php if ( $GLOBALS['concurrent_layout'] == 3) { ?>
1086 <ul id="navigation-slide">
1087 <?php } else { // ($GLOBALS['concurrent_layout'] == 2) ?>
1088 <ul id="navigation">
1089 <?php } ?>
1091 <?php if (!$GLOBALS['disable_calendar'] && !$GLOBALS['ippf_specific']) genTreeLink('RTop','cal',xl('Calendar')); ?>
1092 <?php if (!$GLOBALS['disable_pat_trkr'] && !$GLOBALS['disable_calendar']) genTreeLink('RTop','pfb',xl('Flow Board')); ?>
1093 <?php genTreeLink('RBot','msg',xl('Messages')); ?>
1094 <?php if ($GLOBALS['lab_exchange_enable']) genTreeLink('RTop', 'lab', xl('Check Lab Results'));?>
1095 <?php if($GLOBALS['portal_offsite_enable'] && $GLOBALS['portal_offsite_address'] && acl_check('patientportal','portal')) genTreeLink('RTop','app',xl('Portal Activity')); ?>
1096 <?php
1097 if ($GLOBALS['gbl_portal_cms_enable'] && acl_check('patientportal','portal')) {
1098 // genTreeLink('RTop','ppo',xl('WordPress Portal'));
1099 genPopLink(xl('CMS Portal'),'../cmsportal/list_requests.php','ppo0');
1103 <li class="open"><a class="expanded" id="patimg" ><i class="fa fa-fw fa-user"></i>&nbsp;<span><?php xl('Patient/Client','e') ?></span></a>
1104 <ul>
1105 <?php genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?>
1106 <?php genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ? xl('New/Search') : xl('New'))); ?>
1107 <?php genTreeLink('RTop','dem',xl('Summary')); ?>
1108 <li class="open"><a class="expanded_lv2"><span><?php xl('Visits','e') ?></span></a>
1109 <ul>
1110 <?php if ($GLOBALS['ippf_specific'] && !$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar')); ?>
1111 <?php genTreeLink('RBot','nen',xl('Create Visit')); ?>
1112 <?php genTreeLink('RBot','enc',xl('Current')); ?>
1113 <?php genTreeLink('RBot','ens',xl('Visit History')); ?>
1114 </ul>
1115 </li>
1117 <li><a class="collapsed_lv2"><span><?php xl('Records','e') ?></span></a>
1118 <ul>
1119 <?php genTreeLink('RTop','prq',xl('Patient Record Request')); ?>
1120 </ul>
1121 </li>
1123 <?php if ($GLOBALS['gbl_nav_visit_forms']) { ?>
1124 <li><a class="collapsed_lv2"><span><?php xl('Visit Forms','e') ?></span></a>
1125 <ul>
1126 <?php
1127 // Generate the items for visit forms, both traditional and LBF.
1130 $lres = sqlStatement("SELECT * FROM list_options " .
1131 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
1132 if (sqlNumRows($lres)) {
1133 while ($lrow = sqlFetchArray($lres)) {
1134 $option_id = $lrow['option_id']; // should start with LBF
1135 $title = $lrow['title'];
1136 genMiscLink('RBot','cod','2',xl_form_title($title),
1137 "patient_file/encounter/load_form.php?formname=$option_id");
1140 include_once("$srcdir/registry.inc");
1141 $reg = getRegistered();
1142 if (!empty($reg)) {
1143 foreach ($reg as $entry) {
1144 $option_id = $entry['directory'];
1145 $title = trim($entry['nickname']);
1146 if ($option_id == 'fee_sheet' ) continue;
1147 if ($option_id == 'newpatient') continue;
1148 if (empty($title)) $title = $entry['name'];
1149 genMiscLink('RBot','cod','2',xl_form_title($title),
1150 "patient_file/encounter/load_form.php?formname=" .
1151 urlencode($option_id));
1155 </ul>
1156 </li>
1157 <li class="collapsed" ><a class="collapsed_lv2"><span><?php echo xlt('Import') ?></span></a>
1158 <ul>
1159 <?php genMiscLink('RTop','ccr','0',xlt('Upload'),'patient_file/ccr_import.php'); ?>
1160 <?php genMiscLink('RTop','apr','0',xlt('Pending Approval'),'patient_file/ccr_pending_approval.php'); ?>
1161 </ul>
1162 </li>
1163 <?php } // end if gbl_nav_visit_forms ?>
1165 </ul>
1166 </li>
1167 <?php // TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1168 <?php if(!isset($GLOBALS['enable_fees_in_left_menu']) || $GLOBALS['enable_fees_in_left_menu'] == 1){ ?>
1169 <li><a class="collapsed" id="feeimg" ><span><?php xl('Fees','e') ?></span></a>
1170 <ul>
1171 <?php genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?>
1172 <?php if ($GLOBALS['use_charges_panel']) genTreeLink('RBot','cod',xl('Charges')); ?>
1173 <?php genMiscLink('RBot','pay','1',xl('Payment'),'patient_file/front_payment.php'); ?>
1174 <?php genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?>
1175 <?php if (! $GLOBALS['simplified_demographics']) genTreeLink('RTop','bil',xl('Billing')); ?>
1176 <?php genTreeLink('RTop','npa',xl('Batch Payments'),false,2);?>
1177 <?php genMiscLink('RTop','eob','0',xl('Posting'), 'billing/sl_eob_search.php'); ?>
1178 <?php if ($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob')) genTreeLink('RTop','edi',xl('EDI History'),false,2);?>
1179 </ul>
1180 </li>
1181 <?php } ?>
1182 <?php if (acl_check('menus', 'modle')) {?>
1183 <li><a class="collapsed" id="modimg" ><span><?php echo xlt('Modules') ?></span></a>
1184 <ul>
1185 <?php genMiscLink('RTop','adm','0',xl('Manage Modules'),'modules/zend_modules/public/Installer'); ?>
1186 <?php //genTreeLink('RTop','ort',xl('Settings')); ?>
1188 <?php
1189 $module_query = sqlStatement("select mod_directory,mod_name,mod_nick_name,mod_relative_link,type from modules where mod_active = 1 AND sql_run= 1 order by mod_ui_order asc");
1190 if (sqlNumRows($module_query)) {
1191 while ($modulerow = sqlFetchArray($module_query)) {
1192 $acl_section = strtolower($modulerow['mod_directory']);
1193 $disallowed[$acl_section] = zh_acl_check($_SESSION['authUserID'],$acl_section) ? "" : "1";
1194 $modulePath = "";
1195 $added = "";
1196 if($modulerow['type'] == 0) {
1197 $modulePath = $GLOBALS['customModDir'];
1198 $added = "";
1200 else{
1201 $added = "index";
1202 $modulePath = $GLOBALS['zendModDir'];
1205 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$added;
1206 $mod_nick_name = $modulerow['mod_nick_name'] ? $modulerow['mod_nick_name'] : $modulerow['mod_name'];
1208 <?php genMiscLink2('RTop',$acl_section,'0',xlt($mod_nick_name),$relative_link);?>
1209 <?php }
1210 } ?>
1211 </ul>
1212 </li>
1213 <?php }?>
1214 <?php // if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?>
1215 <?php if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?>
1216 <li><a class="collapsed" id="invimg" ><span><?php xl('Inventory','e') ?></span></a>
1217 <ul>
1218 <?php genMiscLink('RTop','adm','0',xl('Management'),'drugs/drug_inventory.php'); ?>
1219 <?php genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?>
1220 </ul>
1221 </li>
1222 <?php } ?>
1223 <li><a class="collapsed" id="proimg" ><span><?php xl('Procedures','e') ?></span></a>
1224 <ul>
1225 <?php genTreeLink('RTop','orl',xl('Providers')); ?>
1226 <?php genTreeLink('RTop','ort',xl('Configuration')); ?>
1227 <?php genTreeLink('RTop','orc',xl('Load Compendium')); ?>
1228 <?php genTreeLink('RTop','orp',xl('Pending Review')); ?>
1229 <?php genTreeLink('RTop','orr',xl('Patient Results')); ?>
1230 <?php genTreeLink('RTop','lda',xl('Lab Overview')); ?>
1231 <?php genTreeLink('RTop','orb',xl('Batch Results')); ?>
1232 <?php genTreeLink('RTop','ore',xl('Electronic Reports')); ?>
1233 <?php genTreeLink('RTop','dld',xl('Lab Documents'));?>
1234 </ul>
1235 </li>
1236 <?php
1237 if($GLOBALS['erx_enable']) {
1238 $newcrop_user_role = sqlQuery("SELECT newcrop_user_role FROM users WHERE username = '".$_SESSION['authUser']."'");
1239 if($newcrop_user_role['newcrop_user_role']) {
1241 <li><a class="collapsed" id="feeimg" ><span><?php xl('New Crop','e') ?></span></a>
1242 <ul>
1243 <li><a class="collapsed_lv2"><span><?php xl('Status','e') ?></span></a>
1244 <ul>
1245 <?php genTreeLink('RTop','erx',xl('e-Rx')); ?>
1246 <?php genMiscLink('RTop','err','0',xl('e-Rx Renewal'),'eRx.php?page=status'); ?>
1247 <?php if($newcrop_user_role['newcrop_user_role'] === 'erxadmin') genMiscLink('RTop','ere','0',xl('e-Rx EPCS'),'eRx.php?page=epcs-admin'); ?>
1248 </ul>
1249 </li>
1250 </ul>
1251 </li>
1252 <?php
1256 <?php if (!$disallowed['adm']) { ?>
1257 <li><a class="collapsed" id="admimg" ><span><?php xl('Administration','e') ?></span></a>
1258 <ul>
1259 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?>
1260 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?>
1261 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?>
1262 <?php if (acl_check('admin', 'practice' )) genTreeLink('RTop','adb',xl('Addr Book')); ?>
1263 <?php
1264 // Changed the target URL from practice settings -> Practice Settings - Pharmacy... Dec 09,09 .. Visolve ... This replaces empty frame with Pharmacy window
1265 if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings&pharmacy&action=list'); ?>
1266 <?php if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?>
1267 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?>
1268 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?>
1269 <?php if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?>
1270 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?>
1271 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?>
1272 <?php if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Rules'),'super/rules/index.php?action=browse!list'); ?>
1273 <?php if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Alerts'),'super/rules/index.php?action=alerts!listactmgr'); ?>
1274 <?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='); ?>
1275 <?php if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?>
1276 <?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'); ?>
1277 <?php if (acl_check('admin', 'super') && !empty($GLOBALS['code_types']['IPPF'])) genMiscLink('RTop','adm','0',xl('Export'),'main/ippf_export.php'); ?>
1278 <li><a class="collapsed_lv2"><span><?php xl('Other','e') ?></span></a>
1279 <ul>
1280 <?php if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?>
1281 <?php if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?>
1282 <?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'); ?>
1283 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?>
1284 <?php
1285 if($newcrop_user_role['newcrop_user_role'] || $GLOBALS['erx_enable']) {
1286 if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('eRx Logs'),'logview/erx_logview.php');
1289 <?php if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?>
1290 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?>
1291 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Native Data Loads'),'../interface/super/load_codes.php'); ?>
1292 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('External Data Loads'),'../interface/code_systems/dataloads_ajax.php'); ?>
1293 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Merge Patients'),'patient_file/merge_patients.php'); ?>
1294 <?php if ($GLOBALS['enable_auditlog_encryption']) genMiscLink('RTop','rep','0',xl('Audit Log Tamper'),'reports/audit_log_tamper_report.php'); ?>
1295 </ul>
1296 </li>
1297 </ul>
1298 </li>
1299 <?php } ?>
1300 <li><a class="collapsed" id="repimg" ><span><?php xl('Reports','e') ?></span></a>
1301 <ul>
1302 <?php
1303 $module_query = sqlStatement("SELECT msh.*,ms.menu_name,ms.path,m.mod_ui_name,m.type FROM modules_hooks_settings AS msh LEFT OUTER JOIN modules_settings AS ms ON
1304 obj_name=enabled_hooks AND ms.mod_id=msh.mod_id LEFT OUTER JOIN modules AS m ON m.mod_id=ms.mod_id
1305 WHERE fld_type=3 AND mod_active=1 AND sql_run=1 AND attached_to='reports' ORDER BY mod_id");
1306 if (sqlNumRows($module_query)) {
1307 $jid = 0;
1308 $modid = '';
1309 while ($modulerow = sqlFetchArray($module_query)) {
1310 $modulePath = "";
1311 $added = "";
1312 if($modulerow['type'] == 0) {
1313 $modulePath = $GLOBALS['customModDir'];
1314 $added = "";
1316 else{
1317 $added = "index";
1318 $modulePath = $GLOBALS['zendModDir'];
1321 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$modulerow['path'];
1322 $mod_nick_name = $modulerow['menu_name'] ? $modulerow['menu_name'] : 'NoName';
1324 if($jid==0 || ($modid!=$modulerow['mod_id'])){
1325 if($modid!='')
1326 echo "</ul>";
1328 <li><a class="collapsed_lv2"><span><?php echo xlt($modulerow['mod_ui_name']); ?></span></a>
1329 <ul>
1330 <?php
1332 $jid++;
1333 $modid = $modulerow['mod_id'];
1334 genMiscLink('RTop','adm','0',xlt($mod_nick_name),$relative_link);
1336 echo "</ul>";
1337 } ?>
1338 <li><a class="collapsed_lv2"><span><?php xl('Clients','e') ?></span></a>
1339 <ul>
1340 <?php genMiscLink('RTop','rep','0',xl('List'),'reports/patient_list.php'); ?>
1341 <?php if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genMiscLink('RTop','rep','0',xl('Rx'),'reports/prescriptions_report.php'); ?>
1342 <?php if (acl_check('patients', 'med')) genMiscLink('RTop','rep','0',xl('Patient List Creation'),'reports/patient_list_creation.php'); ?>
1343 <?php if (acl_check('patients', 'med')) genMiscLink('RTop','rep','0',xl('Clinical'),'reports/clinical_reports.php'); ?>
1344 <?php genMiscLink('RTop','rep','0',xl('Referrals'),'reports/referrals_report.php'); ?>
1345 <?php genMiscLink('RTop','rep','0',xl('Immunization Registry'),'reports/immunization_report.php'); ?>
1346 </ul>
1347 </li>
1348 <li><a class="collapsed_lv2"><span><?php xl('Clinic','e') ?></span></a>
1349 <ul>
1350 <?php if ($GLOBALS['enable_cdr'] || $GLOBALS['enable_cqm'] || $GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Report Results'),'reports/report_results.php'); ?>
1351 <?php if ($GLOBALS['enable_cdr']) genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?>
1352 <?php if ($GLOBALS['enable_cqm']) genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?>
1353 <?php if ($GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?>
1354 <?php if ($GLOBALS['enable_amc_tracking']) genMiscLink('RTop','rep','0',xl('AMC Tracking'),'reports/amc_tracking.php'); ?>
1355 <?php if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_alert_log'] ) genMiscLink('RTop','rep','0',xl('Alerts Log'),'reports/cdr_log.php'); ?>
1356 </ul>
1357 </li>
1358 <li><a class="collapsed_lv2"><span><?php xl('Visits','e') ?></span></a>
1359 <ul>
1360 <?php if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appointments'),'reports/appointments_report.php'); ?>
1361 <?php if (!$GLOBALS['disable_pat_trkr'] && !$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Patient Flow Board'),'reports/patient_flow_board_report.php'); ?>
1362 <?php genMiscLink('RTop','rep','0',xl('Encounters'),'reports/encounters_report.php'); ?>
1363 <?php if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appt-Enc'),'reports/appt_encounter_report.php'); ?>
1364 <?php if (empty($GLOBALS['code_types']['IPPF'])) { ?>
1365 <?php genMiscLink('RTop','rep','0',xl('Superbill'),'reports/custom_report_range.php'); ?>
1366 <?php } ?>
1367 <?php genMiscLink('RTop','rep','0',xl('Eligibility'),'reports/edi_270.php'); ?>
1368 <?php genMiscLink('RTop','rep','0',xl('Eligibility Response'),'reports/edi_271.php'); ?>
1371 <?php if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Chart Activity'),'reports/chart_location_activity.php'); ?>
1372 <?php if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Charts Out'),'reports/charts_checked_out.php'); ?>
1373 <?php genMiscLink('RTop','rep','0',xl('Services'), 'reports/services_by_category.php'); ?>
1374 <?php genMiscLink('RTop','rep','0',xl('Syndromic Surveillance'),'reports/non_reported.php'); ?>
1375 </ul>
1376 </li>
1377 <?php if (acl_check('acct', 'rep_a')) { ?>
1378 <li><a class="collapsed_lv2"><span><?php xl('Financial','e') ?></span></a>
1379 <ul>
1380 <?php genMiscLink('RTop','rep','0',xl('Sales'),'reports/sales_by_item.php'); ?>
1381 <?php genMiscLink('RTop','rep','0',xl('Cash Rec'), 'billing/sl_receipts_report.php'); ?>
1382 <?php genMiscLink('RTop','rep','0',xl('Front Rec'), 'reports/front_receipts_report.php'); ?>
1383 <?php genMiscLink('RTop','rep','0',xl('Pmt Method'), 'reports/receipts_by_method_report.php'); ?>
1384 <?php genMiscLink('RTop','rep','0',xl('Collections'), 'reports/collections_report.php'); ?>
1385 <?php genMiscLink('RTop','rep','0',xl('Pat Ledger'),'reports/pat_ledger.php?form=0'); ?>
1386 <?php genMiscLink('RTop','rep','0',xl('Financial Summary by Service Code'),'reports/svc_code_financial_report.php'); ?>
1387 </ul>
1388 </li>
1389 <?php } ?>
1390 <?php if ($GLOBALS['inhouse_pharmacy']) { ?>
1391 <li><a class="collapsed_lv2"><span><?php xl('Inventory','e') ?></span></a>
1392 <ul>
1393 <?php genMiscLink('RTop','rep','0',xl('List'),'reports/inventory_list.php'); ?>
1394 <?php genMiscLink('RTop','rep','0',xl('Activity'),'reports/inventory_activity.php'); ?>
1395 <?php genMiscLink('RTop','rep','0',xl('Transactions'),'reports/inventory_transactions.php'); ?>
1396 </ul>
1397 </li>
1398 <?php } ?>
1399 <li><a class="collapsed_lv2"><span><?php xl('Procedures','e') ?></span></a>
1400 <ul>
1401 <?php genPopLink(xl('Pending Res'),'../orders/pending_orders.php'); ?>
1402 <?php if (!empty($GLOBALS['code_types']['IPPF'])) genPopLink(xl('Pending F/U'),'../orders/pending_followup.php'); ?>
1403 <?php genPopLink(xl('Statistics'),'../orders/procedure_stats.php'); ?>
1404 </ul>
1405 </li>
1406 <?php if (! $GLOBALS['simplified_demographics']) { ?>
1407 <li><a class="collapsed_lv2"><span><?php xl('Insurance','e') ?></span></a>
1408 <ul>
1409 <?php genMiscLink('RTop','rep','0',xl('Distribution'),'reports/insurance_allocation_report.php'); ?>
1410 <?php genMiscLink('RTop','rep','0',xl('Indigents'),'billing/indigent_patients_report.php'); ?>
1411 <?php genMiscLink('RTop','rep','0',xl('Unique SP'),'reports/unique_seen_patients_report.php'); ?>
1412 </ul>
1413 </li>
1414 <?php } ?>
1415 <?php if (!empty($GLOBALS['code_types']['IPPF'])) { ?>
1416 <li><a class="collapsed_lv2"><span><?php xl('Statistics','e') ?></span></a>
1417 <ul>
1418 <?php genPopLink(xl('IPPF Stats'),'ippf_statistics.php?t=i'); ?>
1419 <?php genPopLink(xl('GCAC Stats'),'ippf_statistics.php?t=g'); ?>
1420 <?php genPopLink(xl('MA Stats'),'ippf_statistics.php?t=m'); ?>
1421 <?php genPopLink(xl('CYP'),'ippf_cyp_report.php'); ?>
1422 <?php genPopLink(xl('Daily Record'),'ippf_daily.php'); ?>
1423 </ul>
1424 </li>
1425 <?php } // end ippf-specific ?>
1426 <li><a class="collapsed_lv2"><span><?php xl('Blank Forms','e') ?></span></a>
1427 <ul>
1428 <?php genPopLink(xl('Demographics'),'../patient_file/summary/demographics_print.php'); ?>
1429 <?php genPopLink(xl('Superbill/Fee Sheet'),'../patient_file/printed_fee_sheet.php'); ?>
1430 <?php genPopLink(xl('Referral'),'../patient_file/transaction/print_referral.php'); ?>
1431 <?php
1432 $lres = sqlStatement("SELECT * FROM list_options " .
1433 "WHERE list_id = 'lbfnames' ORDER BY seq, title");
1434 while ($lrow = sqlFetchArray($lres)) {
1435 $option_id = $lrow['option_id']; // should start with LBF
1436 $title = $lrow['title'];
1437 genPopLink($title, "../forms/LBF/printable.php?formname=$option_id");
1440 </ul>
1441 </li>
1442 <?php if (acl_check('admin','super')) { ?>
1443 <li><a class="collapsed_lv2"><span><?php echo xlt('Services') ?></span></a>
1444 <ul>
1445 <?php genMiscLink('RTop','rep','0',xl('Background Services'),'reports/background_services.php'); ?>
1446 <?php genMiscLink('RTop','rep','0',xl('Direct Message Log'),'reports/direct_message_log.php'); ?>
1447 </ul>
1448 </li>
1449 <?php } ?>
1451 <?php // genTreeLink('RTop','rep','Other'); ?>
1452 </ul>
1453 </li>
1454 <li><a class="collapsed" id="misimg" ><span><?php xl('Miscellaneous','e') ?></span></a>
1455 <ul>
1456 <?php genTreeLink('RTop','ped',xl('Patient Education')); ?>
1457 <?php genTreeLink('RBot','aun',xl('Authorizations')); ?>
1458 <?php genTreeLink('RTop','fax',xl('Fax/Scan')); ?>
1459 <?php genTreeLink('RTop','adb',xl('Addr Book')); ?>
1460 <?php genTreeLink('RTop','ort',xl('Order Catalog')); ?>
1461 <?php if (!$GLOBALS['disable_chart_tracker']) genTreeLink('RTop','cht',xl('Chart Tracker')); ?>
1462 <?php genTreeLink('RTop','ono',xl('Ofc Notes')); ?>
1463 <?php genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?>
1464 <?php $myrow = sqlQuery("SELECT state FROM registry WHERE directory = 'track_anything'");
1465 if($myrow['state']=='1') { genTreeLink('RTop','tan',xl('Configure Tracks')); } ?>
1466 <?php genTreeLink('RTop','pwd',xl('Password')); ?>
1467 <?php genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?>
1468 <?php if(acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=00'); ?>
1469 <?php if (acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('Document Templates'),'super/manage_document_templates.php'); ?>
1470 </ul>
1471 </li>
1473 </ul>
1475 <?php } else { // end ($GLOBALS['concurrent_layout'] == 2 || $GLOBALS['concurrent_layout'] == 3) ?>
1477 <table cellpadding='0' cellspacing='0' border='0'>
1478 <tr>
1479 <td colspan='3'>
1480 <table cellpadding='0' cellspacing='0' border='0' width='100%'>
1481 <tr>
1482 <td class='smalltext' nowrap>
1483 <input type='checkbox' name='cb_top' onclick='toggleFrame(1)' checked /><b><?php xl('Top','e') ?></b>
1484 </td>
1485 <td class='smalltext' align='right' nowrap>
1486 <b><?php xl('Bot','e') ?></b><input type='checkbox' name='cb_bot' onclick='toggleFrame(2)' checked />
1487 </td>
1488 </tr>
1489 </table>
1490 </td>
1491 </tr>
1492 <?php
1493 // Builds the table of radio buttons and their labels. Radio button values
1494 // are comprised of the 3-character document id and the 1-digit usage type,
1495 // so that JavaScript can easily access this information.
1496 $default_top_rbid = 'cal';
1497 foreach ($primary_docs as $key => $varr) {
1498 if (!empty($disallowed[$key])) continue;
1499 $label = $varr[0];
1500 $usage = $varr[1];
1501 $url = $varr[2];
1502 echo " <tr>\n";
1503 echo " <td class='smalltext'><input type='radio' name='rb_top' value='$key$usage' " .
1504 "onclick=\"loadFrame('$key$usage','RTop','$url')\"";
1505 if ($key == $default_top_rbid) echo " checked";
1506 echo " /></td>\n";
1507 echo " <td class='smalltext' id='lbl_$key'>$label</td>\n";
1508 echo " <td class='smalltext'><input type='radio' name='rb_bot' value='$key$usage' " .
1509 "onclick=\"loadFrame('$key$usage','RBot','$url')\"";
1510 if ($key == 'msg') echo " checked";
1511 echo " /></td>\n";
1512 echo " </tr>\n";
1515 </table>
1517 <?php } ?>
1519 <br /><hr />
1521 <?php
1522 // To use RelayHealth, see comments and parameters in includes/config.php.
1523 if (!empty($GLOBALS['ssi']['rh'])) {
1524 include_once("../../library/ssi.inc");
1525 echo getRelayHealthLink() ."<br /><hr />\n";
1529 <div id='current_patient' style = 'display:none'>
1530 <b><?php xl('None','e'); ?></b>
1531 </div>
1533 <div id='current_encounter' style = 'display:none'>
1534 <b><?php xl('None','e'); ?></b>
1535 </div>
1536 <?php
1537 genPopupsList();
1538 echo "<hr />\n";
1539 genFindBlock();
1540 echo "<hr />\n";
1543 <input type='hidden' name='findBy' value='Last' />
1544 <input type="hidden" name="searchFields" id="searchFields"/>
1545 <input type="hidden" name="search_service_code" value='' />
1547 </form>
1549 <script language='JavaScript'>
1550 syncRadios();
1551 </script>
1553 </body>
1554 </html>