More complete support for activity flag in list_options table. (#274)
[openemr.git] / interface / main / left_nav.php
blob20d86d69e75681f915b6b9633ee23bdbd410915b
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.
12 // 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() function.
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';
94 require_once $GLOBALS['srcdir'].'/user.inc';
96 // Fetch user preferences saved from prior session
97 $uspfx = substr(__FILE__, strlen($GLOBALS['fileroot']."/")) . '.';
98 $cb_top_chk = prevSetting($uspfx, 'cb_top', 'frame0_chk', 'checked');
99 $cb_bot_chk = prevSetting($uspfx, 'cb_bot', 'frame1_chk', 'checked');
100 $usrval = json_encode( array ( $cb_top_chk, $cb_bot_chk ) );
102 // This array defines the list of primary documents that may be
103 // chosen. Each element value is an array of 3 values:
105 // * Name to appear in the navigation table
106 // * Usage: 0 = global, 1 = patient-specific, 2 = encounter-specific
107 // * The URL relative to the interface directory
110 $primary_docs = array(
111 'cal' => array(xl('Calendar') , 0, 'main/main_info.php'),
112 'pfb' => array(xl('Patient Flow Board') , 0, '../interface/patient_tracker/patient_tracker.php?skip_timeout_reset=1'),
113 'app' => array(xl('Portal Activity') , 0, '../myportal/index.php'),
114 'msg' => array(xl('Messages') , 0, 'main/messages/messages.php?form_active=1'),
115 'pwd' => array(xl('Password') , 0, 'usergroup/user_info.php'),
116 'prf' => array(xl('Preferences') , 0, 'super/edit_globals.php?mode=user'),
117 'adm' => array(xl('Admin') , 0, 'usergroup/admin_frameset.php'),
118 'rep' => array(xl('Reports') , 0, 'reports/index.php'),
119 'ono' => array(xl('Ofc Notes') , 0, 'main/onotes/office_comments.php'),
120 'fax' => array(xl('Fax/Scan') , 0, 'fax/faxq.php'),
121 'adb' => array(xl('Addr Bk') , 0, 'usergroup/addrbook_list.php'),
122 'orl' => array(xl('Proc Prov') , 0, 'orders/procedure_provider_list.php'),
123 'ort' => array(xl('Proc Cat') , 0, 'orders/types.php'),
124 'orc' => array(xl('Proc Load') , 0, 'orders/load_compendium.php'),
125 'orb' => array(xl('Proc Bat') , 0, 'orders/orders_results.php?batch=1'),
126 'ore' => array(xl('E-Reports') , 0, 'orders/list_reports.php'),
127 'ppo' => array(xl('CMS Portal'), 0, 'cmsportal/list_requests.php'),
128 'cht' => array(xl('Chart Trk') , 0, '../custom/chart_tracker.php'),
129 'imp' => array(xl('Import') , 0, '../custom/import.php'),
130 'bil' => array(xl('Billing') , 0, 'billing/billing_report.php'),
131 'sup' => array(xl('Superbill') , 0, 'patient_file/encounter/superbill_custom_full.php'),
132 'aun' => array(xl('Authorizations'), 0, 'main/authorizations/authorizations.php'),
133 'new' => array(xl('New Pt') , 0, 'new/new.php'),
134 'ped' => array(xl('Patient Education'), 0, 'reports/patient_edu_web_lookup.php'),
135 'lab' => array(xl('Check Lab Results') , 0, 'orders/lab_exchange.php'),
136 'dem' => array(xl('Patient') , 1, "patient_file/summary/demographics.php"),
137 'his' => array(xl('History') , 1, 'patient_file/history/history.php'),
138 'ens' => array(xl('Visit History'), 1, 'patient_file/history/encounters.php'),
139 'nen' => array(xl('Create Visit'), 1, 'forms/newpatient/new.php?autoloaded=1&calenc='),
140 'pre' => array(xl('Rx') , 1, 'patient_file/summary/rx_frameset.php'),
141 'iss' => array(xl('Issues') , 1, 'patient_file/summary/stats_full.php?active=all'),
142 'imm' => array(xl('Immunize') , 1, 'patient_file/summary/immunizations.php'),
143 'doc' => array(xl('Documents') , 1, '../controller.php?document&list&patient_id={PID}'),
144 'orp' => array(xl('Proc Pending Rev'), 1, 'orders/orders_results.php?review=1'),
145 'orr' => array(xl('Proc Res') , 1, 'orders/orders_results.php'),
146 'lda' => array(xl('Lab overview') , 1, 'patient_file/summary/labdata.php'),
147 'tan' => array(xl('Configure Tracks') , 0, 'forms/track_anything/create.php'),
148 'prp' => array(xl('Pt Report') , 1, 'patient_file/report/patient_report.php'),
149 'prq' => array(xl('Pt Rec Request') , 1, 'patient_file/transaction/record_request.php'),
150 'pno' => array(xl('Pt Notes') , 1, 'patient_file/summary/pnotes.php'),
151 'tra' => array(xl('Transact') , 1, 'patient_file/transaction/transactions.php'),
152 'sum' => array(xl('Summary') , 1, 'patient_file/summary/summary_bottom.php'),
153 'enc' => array(xl('Encounter') , 2, 'patient_file/encounter/encounter_top.php'),
154 'erx' => array(xl('e-Rx') , 1, 'eRx.php'),
155 'err' => array(xl('e-Rx Renewal') , 1, 'eRx.php?page=status'),
156 'ere' => array(xl('e-Rx EPCS') , 1, 'eRx.php?page=epcs-admin'),
157 'pay' => array(xl('Payment') , 1, '../patient_file/front_payment.php'),
158 'edi' => array(xl('EDI History') , 0, 'billing/edih_view.php'),
159 'eob' => array(xl('Posting') , 0, 'billing/sl_eob_search.php'),
160 'dld' => array(xl('Display Documents'), 0, 'main/display_documents.php')
162 $primary_docs['npa']=array(xl('Batch Payments') , 0, 'billing/new_payment.php');
163 if ($GLOBALS['use_charges_panel'] || $GLOBALS['menu_styling_vertical'] == 0) {
164 $primary_docs['cod'] = array(xl('Charges'), 2, 'patient_file/encounter/encounter_bottom.php');
167 $esignApi = new Api();
168 // This section decides which navigation items will not appear.
170 $disallowed = array();
171 $disallowed['edi'] = !($GLOBALS['enable_edihistory_in_left_menu'] || acl_check('acct', 'eob'));
172 $disallowed['adm'] = !(acl_check('admin', 'calendar') ||
173 acl_check('admin', 'database') || acl_check('admin', 'forms') ||
174 acl_check('admin', 'practice') || acl_check('admin', 'users') ||
175 acl_check('admin', 'acl') || acl_check('admin', 'super') ||
176 acl_check('admin', 'superbill') || acl_check('admin', 'drugs'));
178 $disallowed['bil'] = !(acl_check('acct', 'rep') || acl_check('acct', 'eob') ||
179 acl_check('acct', 'bill'));
181 $disallowed['new'] = !(acl_check('patients','demo','',array('write','addonly') ));
183 $disallowed['fax'] = !($GLOBALS['enable_hylafax'] || $GLOBALS['enable_scanner']);
185 $disallowed['iss'] = !((acl_check('encounters','notes','','write') ||
186 acl_check('encounters','notes_a','','write') ) &&
187 acl_check('patients','med','','write') );
189 $disallowed['imp'] = $disallowed['new'] ||
190 !is_readable("$webserver_root/custom/import.php");
192 $disallowed['cht'] = !is_readable("$webserver_root/custom/chart_tracker.php");
194 $disallowed['pre'] = !(acl_check('patients', 'med'));
195 $disallowed['eob'] = !(acl_check('acct', 'eob'));
197 // Helper functions for treeview generation.
198 function genTreeLink($frame, $name, $title, $mono=false) {
199 global $primary_docs, $disallowed;
200 if (empty($disallowed[$name])) {
201 $id = $name . $primary_docs[$name][1];
202 echo "<li><a href='' id='$id' onclick=\"";
203 if ($mono) {
204 if ($frame == 'RTop')
205 echo "forceSpec(true,false);";
206 else
207 echo "forceSpec(false,true);";
209 echo "return loadFrame2('$id','$frame','" .
210 $primary_docs[$name][2] . "')\">" . $title . ($name == 'msg' ? ' <span id="reminderCountSpan" class="bold"></span>' : '')."</a></li>";
213 function genMiscLink($frame, $name, $level, $title, $url, $mono=false) {
214 global $disallowed;
215 if (empty($disallowed[$name])) {
216 $id = $name . $level;
217 echo "<li><a href='' id='$id' onclick=\"";
218 if ($mono) {
219 if ($frame == 'RTop')
220 echo "forceSpec(true,false);";
221 else
222 echo "forceSpec(false,true);";
224 echo "return loadFrame2('$id','$frame','" .
225 $url . "')\">" . $title . "</a></li>";
228 function genMiscLink2($frame, $name, $level, $title, $url, $mono=false,$mouseovertext="") {
229 global $disallowed;
230 if (empty($disallowed[$name])) {
232 $id = $name . $level;
233 echo "<li><a href='' id='$id' title='$mouseovertext' onclick=\"";
234 if ($mono) {
235 if ($frame == 'RTop')
236 echo "forceSpec(true,false);";
237 else
238 echo "forceSpec(false,true);";
240 echo "return loadFrame3('$id','$frame','" .
241 $url . "')\">" . $title . "</a></li>";
244 function genPopLink($title, $url, $linkid='') {
245 echo "<li><a href='' ";
246 if ($linkid) echo "id='$linkid' ";
247 echo "onclick=\"return repPopup('$url')\"" .
248 ">" . $title . "</a></li>";
250 function genDualLink($topname, $botname, $title) {
251 global $primary_docs, $disallowed;
252 if (empty($disallowed[$topname]) && empty($disallowed[$botname])) {
253 $topid = $topname . $primary_docs[$topname][1];
254 $botid = $botname . $primary_docs[$botname][1];
255 echo "<li><a href='' id='$topid' " .
256 "onclick=\"return loadFrameDual('$topid','$botid','" .
257 $primary_docs[$topname][2] . "','" .
258 $primary_docs[$botname][2] . "')\">" . $title . "</a></li>";
262 function genPopupsList($style='') {
263 global $disallowed, $webserver_root;
265 <select name='popups' onchange='selpopup(this)' style='background-color:transparent;font-size:9pt;<?php echo $style; ?>'>
266 <option value=''><?php xl('Popups','e'); ?></option>
267 <?php if (!$disallowed['iss']) { ?>
268 <option value='../patient_file/problem_encounter.php'><?php xl('Issues','e'); ?></option>
269 <?php } ?>
270 <?php if (!$GLOBALS['ippf_specific']) { ?>
271 <option value='../../custom/export_xml.php'><?php xl('Export','e'); ?></option>
272 <option value='../../custom/import_xml.php'><?php xl('Import','e'); ?></option>
273 <?php }
274 if (!$GLOBALS['disable_calendar']) { ?>
275 <option value='../reports/appointments_report.php?patient=<?php if(isset($pid)) {echo $pid;} ?>'><?php xl('Appts','e'); ?></option>
276 <?php } ?>
277 <option value='../patient_file/printed_fee_sheet.php?fill=1'><?php xl('Superbill','e'); ?></option>
278 <option value='../patient_file/front_payment.php'><?php xl('Payment','e'); ?></option>
279 <?php if ($GLOBALS['inhouse_pharmacy']) { ?>
280 <option value='../patient_file/pos_checkout.php'><?php xl('Checkout','e'); ?></option>
281 <?php } ?>
282 <?php if (is_dir($GLOBALS['OE_SITE_DIR'] . "/letter_templates")) { ?>
283 <option value='../patient_file/letter.php'><?php xl('Letter','e'); ?></option>
284 <?php } ?>
285 <?php if ($GLOBALS['chart_label_type'] != '0') { ?>
286 <option value='../patient_file/label.php'><?php xl('Chart Label','e'); ?></option>
287 <?php } ?>
288 <?php if ($GLOBALS['barcode_label_type'] != '0') { ?>
289 <option value='../patient_file/barcode_label.php'><?php xl('Barcode Label','e'); ?></option>
290 <?php } ?>
291 <?php if ($GLOBALS['addr_label_type']) { ?>
292 <option value='../patient_file/addr_label.php'><?php xl('Address Label','e'); ?></option>
293 <?php } ?>
294 </select>
295 <?php
298 function genFindBlock() {
300 <table cellpadding='0' cellspacing='0' border='0'>
301 <tr>
302 <td class='smalltext'><?php xl('Find','e') ?>:&nbsp;</td>
303 <td class='smalltext' colspan='2'>
304 <input type="entry" size="7" name="patient" class='inputtext' style='width:65px;' />
305 </td>
306 </tr>
307 <tr>
308 <td class='smalltext'><?php xl('by','e') ?>:</td>
309 <td class='smalltext'>
310 <a href="javascript:findPatient('Last');" class="navitem"><?php xl('Name','e'); ?></a>
311 </td>
312 <td class='smalltext' align='right'>
313 <a href="javascript:findPatient('ID');" class="navitem"><?php xl('ID','e'); ?></a>
314 </td>
315 </tr>
316 <tr>
317 <td class='smalltext'>&nbsp;</td>
318 <td class='smalltext'>
319 <a href="javascript:findPatient('SSN');" class="navitem"><?php xl('SSN','e'); ?></a>
320 </td>
321 <td class='smalltext' align='right'>
322 <a href="javascript:findPatient('DOB');" class="navitem"><?php xl('DOB','e'); ?></a>
323 </td>
324 </tr>
325 <tr>
326 <td class='smalltext'>&nbsp;</td>
327 <td class='smalltext'>
328 <a href="javascript:findPatient('Any');" class="navitem"><?php xl('Any', 'e'); ?></a>
329 </td>
330 <td class='smalltext' align='right'>
331 <a href="javascript:initFilter();" class="navitem"><?php xl('Filter', 'e'); ?></a>
332 </td>
333 </tr>
334 </table>
335 <?php
336 } // End function genFindBlock()
339 <html>
340 <head>
341 <title>Navigation</title>
343 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
344 <link rel="stylesheet" href="<?php echo $GLOBALS['assets_static_relative'];?>/font-awesome-4-6-3/css/font-awesome.css" type="text/css">
345 <style type="text/css">
346 body {
347 font-size:8pt;
348 font-weight:normal;
349 padding: 5px 3px 5px 3px;
351 .smalltext {
352 font-family:sans-serif;
353 font-size:8pt;
354 font-weight:normal;
356 a.navitem, a.navitem:visited {
357 color:#0000ff;
358 font-family:sans-serif;
359 font-size:8pt;
360 font-weight:bold;
362 .inputtext {
363 font-size:9pt;
364 font-weight:normal;
365 border-style:solid;
366 border-width:1px;
367 padding-left:2px;
368 padding-right:2px;
369 border-color: #000000;
370 background-color:transparent;
373 #navigation ul {
374 background-color:transparent;
376 #navigation-slide ul {
377 background-color:transparent;
379 #navigation-slide a{
380 width: 92%;
382 .nav-menu-img{
383 width:25px;
384 height:25px;
385 border:none;
386 margin-right:5px;
387 vertical-align:middle;
389 </style>
391 <link rel="stylesheet" href="../../library/js/jquery.treeview-1.4.1/jquery.treeview.css" />
392 <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-6-4/index.js"></script>
393 <script type="text/javascript" src="../../library/js/jquery.treeview-1.4.1/jquery.treeview.js" ></script>
395 <script type="text/javascript" src="../../library/dialog.js"></script>
397 <script language='JavaScript'>
398 // User settings
399 var usrval = jQuery.parseJSON('<?php echo $usrval ?>');
401 // tajemo work by CB 2012/01/31 12:32:57 PM dated reminders counter
402 function getReminderCount(){
403 top.restoreSession();
404 // Send the skip_timeout_reset parameter to not count this as a manual entry in the
405 // timing out mechanism in OpenEMR.
406 $.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
407 { skip_timeout_reset: "1" },
408 function(data) {
409 $("#reminderCountSpan").html(data);
410 // run updater every 60 seconds
411 var repeater = setTimeout("getReminderCount()", 60000);
413 //piggy-back on this repeater to run other background-services
414 //this is a silent task manager that returns no output
415 $.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/execute_background_services.php",
416 { skip_timeout_reset: "1", ajax: "1" });
419 $(document).ready(function (){
420 getReminderCount();//
421 parent.loadedFrameCount += 1;
422 for (var i = 0, len = usrval.length; i < len; i++) {
423 if (usrval[i] != "checked") toggleFrame(i+1);
426 // end of tajemo work dated reminders counter
428 // Master values for current pid and encounter.
429 var active_pid = 0;
430 var active_encounter = 0;
431 var encounter_locked = false;
433 // Current selections in the top and bottom frames.
434 var topName = '';
435 var botName = '';
437 // Expand and/or collapse frames in response to checkbox clicks.
438 // fnum indicates which checkbox was clicked (1=left, 2=right).
439 function toggleFrame(fnum) {
440 var f = document.forms[0];
441 var fset = top.document.getElementById('fsright');
442 if (!f.cb_top.checked && !f.cb_bot.checked) {
443 if (fnum == 1) f.cb_bot.checked = true;
444 else f.cb_top.checked = true;
446 var rows = f.cb_top.checked ? '*' : '0';
447 rows += f.cb_bot.checked ? ',*' : ',0';
448 fset.rows = rows;
449 save_setting ([(f.cb_top.checked ? 'checked' : '&nbsp;'), (f.cb_bot.checked ? 'checked' : '&nbsp;')]);
452 // Load the specified url into the specified frame (RTop or RBot).
453 // The URL provided must be relative to interface.
454 function loadFrame(fname, frame, url) {
455 top.restoreSession();
456 var i = url.indexOf('{PID}');
457 if (i >= 0) url = url.substring(0,i) + active_pid + url.substring(i+5);
458 top.frames[frame].location = '<?php echo "$web_root/interface/" ?>' + url;
459 if (frame == 'RTop') topName = fname; else botName = fname;
462 // Load the specified url into a frame to be determined, with the specified
463 // frame as the default; the url must be relative to interface.
464 function loadFrame2(fname, frame, url) {
465 var usage = fname.substring(3);
466 if (active_pid == 0 && usage > '0') {
467 alert('<?php xl('You must first select or add a patient.','e') ?>');
468 return false;
470 if (active_encounter == 0 && usage > '1') {
471 alert('<?php xl('You must first select or create an encounter.','e') ?>');
472 return false;
474 if (encounter_locked && usage > '1') {
475 alert('<?php echo xls('This encounter is locked. No new forms can be added.') ?>');
476 return false;
478 var f = document.forms[0];
479 top.restoreSession();
480 var i = url.indexOf('{PID}');
481 if (i >= 0) url = url.substring(0,i) + active_pid + url.substring(i+5);
482 if(f.sel_frame)
484 var fi = f.sel_frame.selectedIndex;
485 if (fi == 1) frame = 'RTop'; else if (fi == 2) frame = 'RBot';
487 if (!f.cb_bot.checked) frame = 'RTop'; else if (!f.cb_top.checked) frame = 'RBot';
488 top.frames[frame].location = '<?php echo "$web_root/interface/" ?>' + url;
489 if (frame == 'RTop') topName = fname; else botName = fname;
490 return false;
493 function loadFrame3(fname, frame, url) {
494 var f = document.forms[0];
495 top.restoreSession();
496 var i = url.indexOf('{PID}');
497 if (i >= 0) url = url.substring(0,i) + active_pid + url.substring(i+5);
498 if(f.sel_frame)
500 var fi = f.sel_frame.selectedIndex;
501 if (fi == 1) frame = 'RTop'; else if (fi == 2) frame = 'RBot';
503 if (!f.cb_bot.checked) frame = 'RTop'; else if (!f.cb_top.checked) frame = 'RBot';
504 top.frames[frame].location = '<?php echo "$web_root/interface/" ?>' + url;
505 if (frame == 'RTop') topName = fname; else botName = fname;
506 return false;
509 // Make sure the the top and bottom frames are open or closed, as specified.
510 function forceSpec(istop, isbot) {
511 var f = document.forms[0];
512 if (f.cb_top.checked != istop) {
513 f.cb_top.checked = istop;
514 toggleFrame(1);
516 if (f.cb_bot.checked != isbot) {
517 f.cb_bot.checked = isbot;
518 toggleFrame(2);
522 // Make sure both frames are open.
523 function forceDual() {
524 forceSpec(true, true);
527 // Load the specified url into a frame to be determined, with the specified
528 // frame as the default; the url must be relative to interface.
529 function loadFrameDual(tname, bname, topurl, boturl) {
530 var topusage = tname.substring(3);
531 var botusage = bname.substring(3);
532 if (active_pid == 0 && (topusage > '0' || botusage > '0')) {
533 alert('<?php xl('You must first select or add a patient.','e') ?>');
534 return false;
536 if (active_encounter == 0 && (topusage > '1' || botusage > '1')) {
537 alert('<?php xl('You must first select or create an encounter.','e') ?>');
538 return false;
540 if (encounter_locked && (topusage > '1' || botusage > '1')) {
541 alert('<?php echo xls('This encounter is locked. No new forms can be added.') ?>');
542 return false;
544 var f = document.forms[0];
545 forceDual();
546 top.restoreSession();
547 var i = topurl.indexOf('{PID}');
548 if (i >= 0) topurl = topurl.substring(0,i) + active_pid + topurl.substring(i+5);
549 i = boturl.indexOf('{PID}');
550 if (i >= 0) boturl = boturl.substring(0,i) + active_pid + boturl.substring(i+5);
551 top.frames.RTop.location = '<?php echo "$web_root/interface/" ?>' + topurl;
552 top.frames.RBot.location = '<?php echo "$web_root/interface/" ?>' + boturl;
553 topName = tname;
554 botName = bname;
555 return false;
558 // Set disabled/enabled state of radio buttons and associated labels
559 // depending on whether there is an active patient or encounter.
560 function syncRadios() {
561 var f = document.forms[0];
562 encounter_locked = isEncounterLocked(active_encounter);
563 var nlinks = document.links.length;
564 for (var i = 0; i < nlinks; ++i) {
565 var lnk = document.links[i];
566 if (lnk.id.length != 4) continue;
567 var usage = lnk.id.substring(3);
568 if (usage == '1' || usage == '2') {
569 var da = false;
570 if (active_pid == 0) da = true;
571 if (active_encounter == 0 && usage > '1') da = true;
572 if (encounter_locked && usage > '1') da = true;
573 <?php
574 if ($GLOBALS['menu_styling_vertical'] == 0){
575 $color = "'#0000ff'";
576 }else{ // ($GLOBALS['menu_styling_vertical'] == 1)
577 $color = "'#000000'";
580 lnk.style.color = da ? '#888888' : <?php echo $color; ?>;
583 f.popups.disabled = (active_pid == 0);
586 function goHome() {
587 top.frames['RTop'].location='<?php echo $GLOBALS['default_top_pane']?>';
588 top.frames['RBot'].location='messages/messages.php?form_active=1';
591 //Function to clear active patient and encounter in the server side
592 function clearactive() {
593 top.restoreSession();
594 //Ajax call to clear active patient in session
595 $.ajax({
596 type: "POST",
597 url: "<?php echo $GLOBALS['webroot'] ?>/library/ajax/unset_session_ajax.php",
598 data: { func: "unset_pid"},
599 success:function( msg ) {
600 clearPatient();
601 top.frames['RTop'].location='<?php echo $GLOBALS['default_top_pane']?>';
602 top.frames['RBot'].location='messages/messages.php?form_active=1';
606 $(parent.Title.document.getElementById('clear_active')).hide();
608 // Reference to the search.php window.
609 var my_window;
611 // Open the search.php window.
612 function initFilter() {
613 my_window = window.open("../../custom/search.php", "mywindow","status=1");
616 // This is called by the search.php (Filter) window.
617 function processFilter(fieldString, serviceCode) {
618 var f = document.forms[0];
619 document.getElementById('searchFields').value = fieldString;
620 f.search_service_code.value = serviceCode;
621 findPatient("Filter");
622 f.search_service_code.value = '';
623 my_window.close();
626 // Process the click to find a patient by name, id, ssn or dob.
627 function findPatient(findby) {
628 var f = document.forms[0];
629 if (! f.cb_top.checked) {
630 f.cb_top.checked = true;
631 toggleFrame(1);
633 f.findBy.value = findby;
634 top.restoreSession();
635 document.find_patient.submit();
638 // Helper function to set the contents of a div.
639 function setSomeContent(id, content, doc) {
640 if (doc.getElementById) {
641 var x = doc.getElementById(id);
642 x.innerHTML = '';
643 x.innerHTML = content;
645 else if (doc.all) {
646 var x = doc.all[id];
647 x.innerHTML = content;
650 function setDivContent(id, content) {
651 setSomeContent(id, content, document);
653 function setTitleContent(id, content) {
654 setSomeContent(id, content, parent.Title.document);
657 // This is called automatically when a new patient is set, to make sure
658 // there are no patient-specific documents showing stale data. If a frame
659 // was just loaded with data for the correct patient, its name is passed so
660 // that it will not be zapped. At this point the new server-side pid is not
661 // assumed to be set, so this function will only load global data.
662 function reloadPatient(frname) {
663 var f = document.forms[0];
664 if (topName.length > 3 && topName.substring(3) > '0' && frname != 'RTop') {
665 loadFrame('cal0','RTop', '<?php echo $primary_docs['cal'][2]; ?>');
667 if (botName.length > 3 && botName.substring(3) > '0' && frname != 'RBot') {
668 loadFrame('ens0','RBot', '<?php echo $primary_docs['ens'][2]; ?>');
672 // Reload encounter-specific frames, excluding a specified frame. At this
673 // point the new server-side encounter ID may not be set and loading the same
674 // document for the new encounter will not work, so load patient info instead.
675 function reloadEncounter(frname) {
676 var f = document.forms[0];
677 if (topName.length > 3 && topName.substring(3) > '1' && frname != 'RTop') {
678 loadFrame('dem1','RTop', '<?php echo $primary_docs['dem'][2]; ?>');
680 if (botName.length > 3 && botName.substring(3) > '1' && frname != 'RBot') {
681 loadFrame('ens1','RBot', '<?php echo $primary_docs['ens'][2]; ?>');
686 // Commented out this code block are part of the removal of the athletic team code TLH
688 // Clear and reload issue-related menu items for active_pid.
689 // Currently this only applies to athletic teams, but might be implemented
690 // in the general menu at some future time.
692 //function reloadIssues() {
693 //<?php
694 //if ($GLOBALS['athletic_team']) {
695 // Generates a menu item for each active issue that this patient
696 // has of each issue type. Each one looks like this:
697 // Onset-Date [Add] Issue-Title
698 // where the first part is a link to open the issue dialog,
699 // [Add] is a link that auto-creates and opens a new encounter, and
700 // Issue-Title is a link that shows related encounters.
701 //foreach ($ISSUE_TYPES as $key => $value) {
702 //?>
703 //$('#icontainer_<?php echo $key ?>').empty();
704 //if (active_pid != 0) {
705 // $('#icontainer_<?php echo $key ?>').append("<li>" +
706 // "<a href='' id='xxx1' onclick='return repPopup(" +
707 // "\"../patient_file/summary/add_edit_issue.php?thistype=" +
708 // "<?php echo $key; ?>\")' " +
709 // "title='<?php echo xl('Create new issue'); ?>'>" +
710 // "<?php echo xl('New') . " " . $value[1]; ?></a></li>");
711 // top.restoreSession();
712 // $.getScript('../../library/ajax/left_nav_issues_ajax.php?type=<?php echo $key; ?>');
713 // }
714 //<?php
715 // }
716 // }
717 //?>
718 //} // end function reloadIssues
720 // This is referenced in left_nav_issues_ajax.php and is called when [Add]
721 // is clicked for an issue menu item to add a new encounter for the issue.
722 // So far this only applies to the Athletic Team version of the menu.
724 //function addEncNotes(issue) {
726 // top.restoreSession();
727 // $.getScript('../../library/ajax/left_nav_encounter_ajax.php?createvisit=1&issue=' + issue);
729 // The above AJAX call was to create the encounter right away, but we later
730 // (2012-07-03) decided it's better to present the New Encounter form instead.
731 // Note the issue ID is passed so it will be pre-selected in that form.
732 //loadFrame2('nen1','RBot','forms/newpatient/new.php?autoloaded=1&calenc=&issue=' + issue);
734 //return false;
737 // Commented out the above code block are part of the removal of the athletic team code TLH
741 // Call this to announce that the patient has changed. You must call this
742 // if you change the session PID, so that the navigation frame will show the
743 // correct patient and so that the other frame will be reloaded if it contains
744 // patient-specific information from the previous patient. frname is the name
745 // of the frame that the call came from, so we know to only reload content
746 // from the *other* frame if it is patient-specific.
747 function setPatient(pname, pid, pubpid, frname, str_dob) {
748 var str = '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentPatientFromTitle()" title="PID = ' + pid + '"><b>' + pname + ' (' + pubpid + ')<br /></b></a>';
749 setDivContent('current_patient', str);
750 setTitleContent('current_patient', str + str_dob);
751 if (pid == active_pid) return;
752 setDivContent('current_encounter', '<b><?php xl('None','e'); ?></b>');
753 active_pid = pid;
754 active_encounter = 0;
755 encounter_locked = false;
756 if (frname) reloadPatient(frname);
757 syncRadios();
758 $(parent.Title.document.getElementById('current_patient_block')).show();
759 var encounter_block = $(parent.Title.document.getElementById('current_encounter_block'));
760 $(encounter_block).hide();
762 // zero out the encounter frame, replace it with the encounter list frame
763 var f = document.forms[0];
764 if ( f.cb_top.checked && f.cb_bot.checked ) {
765 var encounter_frame = getEncounterTargetFrame('enc');
766 if ( encounter_frame != undefined ) {
767 loadFrame('ens0',encounter_frame, '<?php echo $primary_docs['ens'][2]; ?>');
771 $(parent.Title.document.getElementById('clear_active')).show();//To display Clear Active Patient button on selecting a patient
773 function setPatientEncounter(EncounterIdArray,EncounterDateArray,CalendarCategoryArray) {
774 //This function lists all encounters of the patient.
775 //This function writes the drop down in the top frame.
776 //It is called when a new patient is create/selected from the search menu.
777 var str = '<Select class="text" id="EncounterHistory" onchange="{top.restoreSession();toencounter(this.options[this.selectedIndex].value)}">';
778 str+='<option value=""><?php echo htmlspecialchars( xl('Encounter History'), ENT_QUOTES) ?></option>';
779 str+='<option value="New Encounter"><?php echo htmlspecialchars( xl('New Encounter'), ENT_QUOTES) ?></option>';
780 str+='<option value="Past Encounter List"><?php echo htmlspecialchars( xl('Past Encounter List'), ENT_QUOTES) ?></option>';
781 for(CountEncounter=0;CountEncounter<EncounterDateArray.length;CountEncounter++)
783 str+='<option value="'+EncounterIdArray[CountEncounter]+'~'+EncounterDateArray[CountEncounter]+'">'+EncounterDateArray[CountEncounter]+'-'+CalendarCategoryArray[CountEncounter]+'</option>';
785 str+='</Select>';
786 $(parent.Title.document.getElementById('past_encounter_block')).show();
787 top.window.parent.Title.document.getElementById('past_encounter').innerHTML=str;
790 function loadCurrentPatientFromTitle() {
791 top.restoreSession();
792 top.frames['RTop'].location='../patient_file/summary/demographics.php';
795 function getEncounterTargetFrame( name ) {
796 var bias = <?php echo $primary_docs[ 'enc' ][ 1 ]?>;
797 var f = document.forms[0];
798 var r = 'RTop';
799 if (f.cb_top.checked && f.cb_bot.checked) {
800 if ( bias == 2 ) {
801 r = 'RBot';
802 } else {
803 r = 'RTop';
805 } else {
806 if ( f.cb_top.checked ) {
807 r = 'RTop';
808 } else if ( f.cb_bot.checked ) {
809 r = 'RBot';
812 return r;
814 function isEncounterLocked( encounterId ) {
815 <?php if ( $esignApi->lockEncounters() ) { ?>
816 // If encounter locking is enabled, make a syncronous call (async=false) to check the
817 // DB to see if the encounter is locked.
818 // Call restore session, just in case
819 top.restoreSession();
820 $.ajax({
821 type: 'POST',
822 url: '<?php echo $GLOBALS['webroot']?>/interface/esign/index.php?module=encounter&method=esign_is_encounter_locked',
823 data: { encounterId : encounterId },
824 success: function( data ) {
825 encounter_locked = data;
827 dataType: 'json',
828 async:false
829 });
830 return encounter_locked;
831 <?php } else { ?>
832 // If encounter locking isn't enabled, just tell the left_nav that the encounter
833 // isn't locked.
834 return false;
835 <?php } ?>
837 // Call this to announce that the encounter has changed. You must call this
838 // if you change the session encounter, so that the navigation frame will
839 // show the correct encounter and so that the other frame will be reloaded if
840 // it contains encounter-specific information from the previous encounter.
841 // frname is the name of the frame that the call came from, so we know to only
842 // reload encounter-specific content from the *other* frame.
843 function setEncounter(edate, eid, frname) {
844 if (eid == active_encounter) return;
845 if (!eid) edate = '<?php xl('None','e'); ?>';
846 var str = '<b>' + edate + '</b>';
847 setDivContent('current_encounter', str);
848 active_encounter = eid;
849 encounter_locked=isEncounterLocked(active_encounter);
850 reloadEncounter(frname);
851 syncRadios();
852 var encounter_block = $(parent.Title.document.getElementById('current_encounter_block'));
853 var encounter = $(parent.Title.document.getElementById('current_encounter'));
854 var estr = '<a href=\'javascript:;\' onclick="parent.left_nav.loadCurrentEncounterFromTitle()"><b>' + edate + ' (' + eid + ')</b></a>';
855 encounter.html( estr );
856 encounter_block.show();
859 function loadCurrentEncounterFromTitle() {
860 top.restoreSession();
861 top.frames[ parent.left_nav.getEncounterTargetFrame('enc') ].location='../patient_file/encounter/encounter_top.php';
864 // You must call this if you delete the active patient (or if for any other
865 // reason you "close" the active patient without opening a new one), so that
866 // the appearance of the navigation frame will be correct and so that any
867 // stale content will be reloaded.
868 function clearPatient() {
869 if (active_pid == 0) return;
870 var f = document.forms[0];
871 active_pid = 0;
872 active_encounter = 0;
873 encounter_locked = false;
874 setDivContent('current_patient', '<b><?php xl('None','e'); ?></b>');
875 $(parent.Title.document.getElementById('current_patient_block')).hide();
876 top.window.parent.Title.document.getElementById('past_encounter').innerHTML='';
877 $(parent.Title.document.getElementById('current_encounter_block')).hide();
878 reloadPatient('');
879 syncRadios();
882 // You must call this if you delete the active encounter (or if for any other
883 // reason you "close" the active encounter without opening a new one), so that
884 // the appearance of the navigation frame will be correct and so that any
885 // stale content will be reloaded.
886 function clearEncounter() {
887 if (active_encounter == 0) return;
888 top.window.parent.Title.document.getElementById('current_encounter').innerHTML="<b><?php echo htmlspecialchars( xl('None'), ENT_QUOTES) ?></b>";
889 active_encounter = 0;
890 encounter_locked = false;
891 reloadEncounter('');
892 syncRadios();
894 function removeOptionSelected(EncounterId)
895 {//Removes an item from the Encounter drop down.
896 var elSel = top.window.parent.Title.document.getElementById('EncounterHistory');
897 var i;
898 for (i = elSel.length - 1; i>=2; i--) {
899 EncounterHistoryValue=elSel.options[i].value;
900 EncounterHistoryValueArray=EncounterHistoryValue.split('~');
901 if (EncounterHistoryValueArray[0]==EncounterId) {
902 elSel.remove(i);
907 // You can call this to make sure the session pid is what we expect.
908 function pidSanityCheck(pid) {
909 if (pid != active_pid) {
910 alert('Session patient ID is ' + pid + ', expecting ' + active_pid +
911 '. This session is unstable and should be abandoned. Do not use ' +
912 'OpenEMR in multiple browser windows!');
913 return false;
915 return true;
918 // You can call this to make sure the session encounter is what we expect.
919 function encounterSanityCheck(eid) {
920 if (eid != active_encounter) {
921 alert('Session encounter ID is ' + eid + ', expecting ' + active_encounter +
922 '. This session is unstable and should be abandoned. Do not use ' +
923 'OpenEMR in multiple browser windows!');
924 return false;
926 return true;
929 // Pop up a report.
930 function repPopup(aurl) {
931 top.restoreSession();
932 window.open('<?php echo "$web_root/interface/reports/" ?>' + aurl, '_blank', 'width=750,height=550,resizable=1,scrollbars=1');
933 return false;
936 // This is invoked to pop up some window when a popup item is selected.
937 function selpopup(selobj) {
938 var i = selobj.selectedIndex;
939 var opt = selobj.options[i];
940 if (i > 0) {
941 var width = 750;
942 var height = 550;
943 if (opt.text == 'Export' || opt.text == 'Import') {
944 width = 500;
945 height = 400;
947 dlgopen(opt.value, '_blank', width, height);
949 selobj.selectedIndex = 0;
951 // Treeview activation stuff:
952 $(document).ready(function(){
953 if(1 == <?php echo $GLOBALS['menu_styling_vertical'] ?>){
954 $("#navigation-slide > li > a.collapsed + ul").slideToggle("medium");
955 $("#navigation-slide > li > ul > li > a.collapsed_lv2 + ul").slideToggle("medium");
956 $("#navigation-slide > li > a.expanded").click(function() {
957 $("#navigation-slide > li > a.expanded").not(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
958 $(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
960 $("#navigation-slide > li > a.collapsed").click(function() {
961 $("#navigation-slide > li > a.expanded").not(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
962 $(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium");
964 $("#navigation-slide > li > ul > li > a.expanded_lv2").click(function() {
965 $("#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");
966 $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
968 $("#navigation-slide > li > ul > li > a.collapsed_lv2").click(function() {
969 $("#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");
970 $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium");
972 $("#navigation-slide > li > a#cal0").prepend('<i class="fa fa-fw fa-calendar"></i>&nbsp;');
973 $("#navigation-slide > li > a#pfb0").prepend('<i class="fa fa-fw fa-list-alt"></i>&nbsp;');
974 $("#navigation-slide > li > a#msg0").prepend('<i class="fa fa-fw fa-envelope-o"></i>&nbsp;');
975 $("#navigation-slide > li > a#app0").prepend('<i class="fa fa-fw fa-user"></i>&nbsp;');
976 $("#navigation-slide > li > a#ppo0").prepend('<i class="fa fa-fw fa-user"></i>&nbsp;');
977 $("#navigation-slide > li > a#repimg").prepend('<i class="fa fa-fw fa-area-chart"></i>&nbsp;');
978 $("#navigation-slide > li > a#feeimg").prepend('<i class="fa fa-fw fa-dollar"></i>&nbsp;');
979 $("#navigation-slide > li > a#adm0").prepend('<i class="fa fa-fw fa-list-ol"></i>&nbsp;');
980 $("#navigation-slide > li > a#invimg").prepend('<i class="fa fa-fw fa-list-ol"></i>&nbsp;');
981 $("#navigation-slide > li > a#admimg").prepend('<i class="fa fa-fw fa-cogs"></i>&nbsp;');
982 $("#navigation-slide > li > a#misimg").prepend('<i class="fa fa-fw fa-cog"></i>&nbsp;');
983 $("#navigation-slide > li > a#proimg").prepend('<i class="fa fa-fw fa-stethoscope"></i>&nbsp;');
984 $("#navigation-slide > li > a#modimg").prepend('<i class="fa fa-fw fa-puzzle-piece"></i>&nbsp;');
985 $("#navigation-slide > li").each(function(index) {
986 if($(" > ul > li", this).size() == 0){
987 $(" > a", this).addClass("collapsed");
990 } else { // $GLOBALS['menu_styling_vertical'] == 0
992 //Remove the links (used by the sliding menu) that will break treeview
993 $('a.collapsed').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
994 $('a.collapsed_lv2').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
995 $('a.expanded').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
996 $('a.expanded_lv2').each(function() { $(this).replaceWith('<span>'+$(this).text()+'</span>'); });
998 // Initiate treeview
999 $("#navigation").treeview({
1000 animated: "fast",
1001 collapsed: true,
1002 unique: true,
1003 toggle: function() {
1004 window.console && console.log("%o was toggled", this);
1010 </script>
1012 </head>
1014 <body class="body_nav main-left">
1016 <form method='post' name='find_patient' target='RTop'
1017 action='<?php echo $rootdir ?>/main/finder/patient_select.php'>
1019 <center>
1020 <select name='sel_frame' style='background-color:transparent;font-size:9pt;width:100;'>
1021 <option value='0'><?php xl('Default','e'); ?></option>
1022 <option value='1'><?php xl('Top','e'); ?></option>
1023 <option value='2'><?php xl('Bottom','e'); ?></option>
1024 </select>
1025 </center>
1027 <table cellpadding='0' cellspacing='0' border='0' width='100%'>
1028 <tr>
1029 <td class='smalltext' nowrap>
1030 <input type='checkbox' name='cb_top' onclick='toggleFrame(1)' <?php echo $cb_top_chk ?> />
1031 <b><?php xl('Top','e') ?></b>
1032 </td>
1033 <td class='smalltext' align='right' nowrap>
1034 <b><?php xl('Bot','e') ?></b>
1035 <input type='checkbox' name='cb_bot' onclick='toggleFrame(2)' <?php echo $cb_bot_chk ?> />
1036 </td>
1037 </tr>
1038 </table>
1040 <?php if ( $GLOBALS['menu_styling_vertical'] == 1) { ?>
1041 <ul id="navigation-slide">
1042 <?php } else { // ($GLOBALS['menu_styling_vertical'] == 0) ?>
1043 <ul id="navigation">
1044 <?php } ?>
1046 <?php if (!$GLOBALS['disable_calendar'] && !$GLOBALS['ippf_specific']) genTreeLink('RTop','cal',xl('Calendar')); ?>
1047 <?php if (!$GLOBALS['disable_pat_trkr'] && !$GLOBALS['disable_calendar']) genTreeLink('RTop','pfb',xl('Flow Board')); ?>
1048 <?php genTreeLink('RBot','msg',xl('Messages')); ?>
1049 <?php if($GLOBALS['portal_offsite_enable'] && $GLOBALS['portal_offsite_address'] && acl_check('patientportal','portal')) genTreeLink('RTop','app',xl('Portal Activity')); ?>
1050 <?php
1051 if ($GLOBALS['gbl_portal_cms_enable'] && acl_check('patientportal','portal')) {
1052 // genTreeLink('RTop','ppo',xl('WordPress Portal'));
1053 genPopLink(xl('CMS Portal'),'../cmsportal/list_requests.php','ppo0');
1057 <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>
1058 <ul>
1059 <?php genMiscLink('RTop','fin','0',xl('Patients'),'main/finder/dynamic_finder.php'); ?>
1060 <?php genTreeLink('RTop','new',($GLOBALS['full_new_patient_form'] ? xl('New/Search') : xl('New'))); ?>
1061 <?php genTreeLink('RTop','dem',xl('Summary')); ?>
1062 <li class="open"><a class="expanded_lv2"><span><?php xl('Visits','e') ?></span></a>
1063 <ul>
1064 <?php if ($GLOBALS['ippf_specific'] && !$GLOBALS['disable_calendar']) genTreeLink('RTop','cal',xl('Calendar')); ?>
1065 <?php genTreeLink('RBot','nen',xl('Create Visit')); ?>
1066 <?php genTreeLink('RBot','enc',xl('Current')); ?>
1067 <?php genTreeLink('RBot','ens',xl('Visit History')); ?>
1068 </ul>
1069 </li>
1071 <li><a class="collapsed_lv2"><span><?php xl('Records','e') ?></span></a>
1072 <ul>
1073 <?php genTreeLink('RTop','prq',xl('Patient Record Request')); ?>
1074 </ul>
1075 </li>
1077 <?php if ($GLOBALS['gbl_nav_visit_forms']) { ?>
1078 <li><a class="collapsed_lv2"><span><?php xl('Visit Forms','e') ?></span></a>
1079 <ul>
1080 <?php
1081 // Generate the items for visit forms, both traditional and LBF.
1084 $lres = sqlStatement("SELECT * FROM list_options " .
1085 "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title");
1086 if (sqlNumRows($lres)) {
1087 while ($lrow = sqlFetchArray($lres)) {
1088 $option_id = $lrow['option_id']; // should start with LBF
1089 $title = $lrow['title'];
1090 genMiscLink('RBot','cod','2',xl_form_title($title),
1091 "patient_file/encounter/load_form.php?formname=$option_id");
1094 include_once("$srcdir/registry.inc");
1095 $reg = getRegistered();
1096 if (!empty($reg)) {
1097 foreach ($reg as $entry) {
1098 $option_id = $entry['directory'];
1099 $title = trim($entry['nickname']);
1100 if ($option_id == 'fee_sheet' ) continue;
1101 if ($option_id == 'newpatient') continue;
1102 if (empty($title)) $title = $entry['name'];
1103 genMiscLink('RBot','cod','2',xl_form_title($title),
1104 "patient_file/encounter/load_form.php?formname=" .
1105 urlencode($option_id));
1109 </ul>
1110 </li>
1111 <li class="collapsed" ><a class="collapsed_lv2"><span><?php echo xlt('Import') ?></span></a>
1112 <ul>
1113 <?php genMiscLink('RTop','ccr','0',xlt('Upload'),'patient_file/ccr_import.php'); ?>
1114 <?php genMiscLink('RTop','apr','0',xlt('Pending Approval'),'patient_file/ccr_pending_approval.php'); ?>
1115 </ul>
1116 </li>
1117 <?php } // end if gbl_nav_visit_forms ?>
1119 </ul>
1120 </li>
1121 <?php // TajEmo Work by CB 2012/06/21 10:41:15 AM hides fees if disabled in globals ?>
1122 <?php if(!isset($GLOBALS['enable_fees_in_left_menu']) || $GLOBALS['enable_fees_in_left_menu'] == 1){ ?>
1123 <li><a class="collapsed" id="feeimg" ><span><?php xl('Fees','e') ?></span></a>
1124 <ul>
1125 <?php genMiscLink('RBot','cod','2',xl('Fee Sheet'),'patient_file/encounter/load_form.php?formname=fee_sheet'); ?>
1126 <?php if ($GLOBALS['use_charges_panel']) genTreeLink('RBot','cod',xl('Charges')); ?>
1127 <?php genMiscLink('RBot','pay','1',xl('Payment'),'patient_file/front_payment.php'); ?>
1128 <?php genMiscLink('RBot','bil','1',xl('Checkout'),'patient_file/pos_checkout.php?framed=1'); ?>
1129 <?php if (! $GLOBALS['simplified_demographics']) genTreeLink('RTop','bil',xl('Billing')); ?>
1130 <?php genTreeLink('RTop','npa',xl('Batch Payments'),false,2);?>
1131 <?php genMiscLink('RTop','eob','0',xl('Posting'), 'billing/sl_eob_search.php'); ?>
1132 <?php if ($GLOBALS['enable_edihistory_in_left_menu'] && acl_check('acct', 'eob')) genTreeLink('RTop','edi',xl('EDI History'),false,2);?>
1133 </ul>
1134 </li>
1135 <?php } ?>
1136 <?php if (acl_check('menus', 'modle')) {?>
1137 <li><a class="collapsed" id="modimg" ><span><?php echo xlt('Modules') ?></span></a>
1138 <ul>
1139 <?php genMiscLink('RTop','adm','0',xl('Manage Modules'),'modules/zend_modules/public/Installer'); ?>
1140 <?php //genTreeLink('RTop','ort',xl('Settings')); ?>
1142 <?php
1143 $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");
1144 if (sqlNumRows($module_query)) {
1145 while ($modulerow = sqlFetchArray($module_query)) {
1146 $acl_section = strtolower($modulerow['mod_directory']);
1147 $disallowed[$acl_section] = zh_acl_check($_SESSION['authUserID'],$acl_section) ? "" : "1";
1148 $modulePath = "";
1149 $added = "";
1150 if($modulerow['type'] == 0) {
1151 $modulePath = $GLOBALS['customModDir'];
1152 $added = "";
1154 else{
1155 $added = "index";
1156 $modulePath = $GLOBALS['zendModDir'];
1159 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$added;
1160 $mod_nick_name = $modulerow['mod_nick_name'] ? $modulerow['mod_nick_name'] : $modulerow['mod_name'];
1162 <?php genMiscLink2('RTop',$acl_section,'0',xlt($mod_nick_name),$relative_link);?>
1163 <?php }
1164 } ?>
1165 </ul>
1166 </li>
1167 <?php }?>
1168 <?php // if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) genMiscLink('RTop','adm','0',xl('Inventory'),'drugs/drug_inventory.php'); ?>
1169 <?php if ($GLOBALS['inhouse_pharmacy'] && acl_check('admin', 'drugs')) { ?>
1170 <li><a class="collapsed" id="invimg" ><span><?php xl('Inventory','e') ?></span></a>
1171 <ul>
1172 <?php genMiscLink('RTop','adm','0',xl('Management'),'drugs/drug_inventory.php'); ?>
1173 <?php genPopLink(xl('Destroyed'),'destroyed_drugs_report.php'); ?>
1174 </ul>
1175 </li>
1176 <?php } ?>
1177 <li><a class="collapsed" id="proimg" ><span><?php xl('Procedures','e') ?></span></a>
1178 <ul>
1179 <?php genTreeLink('RTop','orl',xl('Providers')); ?>
1180 <?php genTreeLink('RTop','ort',xl('Configuration')); ?>
1181 <?php genTreeLink('RTop','orc',xl('Load Compendium')); ?>
1182 <?php genTreeLink('RTop','orp',xl('Pending Review')); ?>
1183 <?php genTreeLink('RTop','orr',xl('Patient Results')); ?>
1184 <?php genTreeLink('RTop','lda',xl('Lab Overview')); ?>
1185 <?php genTreeLink('RTop','orb',xl('Batch Results')); ?>
1186 <?php genTreeLink('RTop','ore',xl('Electronic Reports')); ?>
1187 <?php genTreeLink('RTop','dld',xl('Lab Documents'));?>
1188 </ul>
1189 </li>
1190 <?php
1191 if($GLOBALS['erx_enable']) {
1192 $newcrop_user_role = sqlQuery("SELECT newcrop_user_role FROM users WHERE username = '".$_SESSION['authUser']."'");
1193 if($newcrop_user_role['newcrop_user_role']) {
1195 <li><a class="collapsed" id="feeimg" ><span><?php xl('New Crop','e') ?></span></a>
1196 <ul>
1197 <li><a class="collapsed_lv2"><span><?php xl('Status','e') ?></span></a>
1198 <ul>
1199 <?php genTreeLink('RTop','erx',xl('e-Rx')); ?>
1200 <?php genMiscLink('RTop','err','0',xl('e-Rx Renewal'),'eRx.php?page=status'); ?>
1201 <?php if($newcrop_user_role['newcrop_user_role'] === 'erxadmin') genMiscLink('RTop','ere','0',xl('e-Rx EPCS'),'eRx.php?page=epcs-admin'); ?>
1202 </ul>
1203 </li>
1204 </ul>
1205 </li>
1206 <?php
1210 <?php if (!$disallowed['adm']) { ?>
1211 <li><a class="collapsed" id="admimg" ><span><?php xl('Administration','e') ?></span></a>
1212 <ul>
1213 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Globals'),'super/edit_globals.php'); ?>
1214 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Facilities'),'usergroup/facilities.php'); ?>
1215 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Users'),'usergroup/usergroup_admin.php'); ?>
1216 <?php if (acl_check('admin', 'practice' )) genTreeLink('RTop','adb',xl('Addr Book')); ?>
1217 <?php
1218 // Changed the target URL from practice settings -> Practice Settings - Pharmacy... Dec 09,09 .. Visolve ... This replaces empty frame with Pharmacy window
1219 if (acl_check('admin', 'practice' )) genMiscLink('RTop','adm','0',xl('Practice'),'../controller.php?practice_settings&pharmacy&action=list'); ?>
1220 <?php if (acl_check('admin', 'superbill')) genTreeLink('RTop','sup',xl('Codes')); ?>
1221 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Layouts'),'super/edit_layout.php'); ?>
1222 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Lists'),'super/edit_list.php'); ?>
1223 <?php if (acl_check('admin', 'acl' )) genMiscLink('RTop','adm','0',xl('ACL'),'usergroup/adminacl.php'); ?>
1224 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Files'),'super/manage_site_files.php'); ?>
1225 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Backup'),'main/backup.php'); ?>
1226 <?php if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Rules'),'super/rules/index.php?action=browse!list'); ?>
1227 <?php if (acl_check('admin', 'super' ) && $GLOBALS['enable_cdr']) genMiscLink('RTop','adm','0',xl('Alerts'),'super/rules/index.php?action=alerts!listactmgr'); ?>
1228 <?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='); ?>
1229 <?php if ( ($GLOBALS['include_de_identification']) && (acl_check('admin', 'super' )) ) genMiscLink('RTop','adm','0',xl('De Identification'),'de_identification_forms/de_identification_screen1.php'); ?>
1230 <?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'); ?>
1231 <?php if (acl_check('admin', 'super') && !empty($GLOBALS['code_types']['IPPF'])) genMiscLink('RTop','adm','0',xl('Export'),'main/ippf_export.php'); ?>
1232 <li><a class="collapsed_lv2"><span><?php xl('Other','e') ?></span></a>
1233 <ul>
1234 <?php if (acl_check('admin', 'language')) genMiscLink('RTop','adm','0',xl('Language'),'language/language.php'); ?>
1235 <?php if (acl_check('admin', 'forms' )) genMiscLink('RTop','adm','0',xl('Forms'),'forms_admin/forms_admin.php'); ?>
1236 <?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'); ?>
1237 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Logs'),'logview/logview.php'); ?>
1238 <?php
1239 if($newcrop_user_role['newcrop_user_role'] || $GLOBALS['erx_enable']) {
1240 if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('eRx Logs'),'logview/erx_logview.php');
1243 <?php if ( (!$GLOBALS['disable_phpmyadmin_link']) && (acl_check('admin', 'database')) ) genMiscLink('RTop','adm','0',xl('Database'),'../phpmyadmin/index.php'); ?>
1244 <?php if (acl_check('admin', 'users' )) genMiscLink('RTop','adm','0',xl('Certificates'),'usergroup/ssl_certificates_admin.php'); ?>
1245 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Native Data Loads'),'../interface/super/load_codes.php'); ?>
1246 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('External Data Loads'),'../interface/code_systems/dataloads_ajax.php'); ?>
1247 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Merge Patients'),'patient_file/merge_patients.php'); ?>
1248 <?php if (acl_check('admin', 'super' )) genMiscLink('RTop','adm','0',xl('Import Holidays'),'../interface/main/holidays/import_holidays.php'); ?>
1249 <?php if ($GLOBALS['enable_auditlog_encryption']) genMiscLink('RTop','rep','0',xl('Audit Log Tamper'),'reports/audit_log_tamper_report.php'); ?>
1250 </ul>
1251 </li>
1252 </ul>
1253 </li>
1254 <?php } ?>
1255 <li><a class="collapsed" id="repimg" ><span><?php xl('Reports','e') ?></span></a>
1256 <ul>
1257 <?php
1258 $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
1259 obj_name=enabled_hooks AND ms.mod_id=msh.mod_id LEFT OUTER JOIN modules AS m ON m.mod_id=ms.mod_id
1260 WHERE fld_type=3 AND mod_active=1 AND sql_run=1 AND attached_to='reports' ORDER BY mod_id");
1261 if (sqlNumRows($module_query)) {
1262 $jid = 0;
1263 $modid = '';
1264 while ($modulerow = sqlFetchArray($module_query)) {
1265 $modulePath = "";
1266 $added = "";
1267 if($modulerow['type'] == 0) {
1268 $modulePath = $GLOBALS['customModDir'];
1269 $added = "";
1271 else{
1272 $added = "index";
1273 $modulePath = $GLOBALS['zendModDir'];
1276 $relative_link ="modules/".$modulePath."/".$modulerow['mod_relative_link'].$modulerow['path'];
1277 $mod_nick_name = $modulerow['menu_name'] ? $modulerow['menu_name'] : 'NoName';
1279 if($jid==0 || ($modid!=$modulerow['mod_id'])){
1280 if($modid!='')
1281 echo "</ul>";
1283 <li><a class="collapsed_lv2"><span><?php echo xlt($modulerow['mod_ui_name']); ?></span></a>
1284 <ul>
1285 <?php
1287 $jid++;
1288 $modid = $modulerow['mod_id'];
1289 genMiscLink('RTop','adm','0',xlt($mod_nick_name),$relative_link);
1291 echo "</ul>";
1292 } ?>
1293 <li><a class="collapsed_lv2"><span><?php xl('Clients','e') ?></span></a>
1294 <ul>
1295 <?php genMiscLink('RTop','rep','0',xl('List'),'reports/patient_list.php'); ?>
1296 <?php if (acl_check('patients', 'med') && !$GLOBALS['disable_prescriptions']) genMiscLink('RTop','rep','0',xl('Rx'),'reports/prescriptions_report.php'); ?>
1297 <?php if (acl_check('patients', 'med')) genMiscLink('RTop','rep','0',xl('Patient List Creation'),'reports/patient_list_creation.php'); ?>
1298 <?php if (acl_check('patients', 'med')) genMiscLink('RTop','rep','0',xl('Clinical'),'reports/clinical_reports.php'); ?>
1299 <?php genMiscLink('RTop','rep','0',xl('Referrals'),'reports/referrals_report.php'); ?>
1300 <?php genMiscLink('RTop','rep','0',xl('Immunization Registry'),'reports/immunization_report.php'); ?>
1301 </ul>
1302 </li>
1303 <li><a class="collapsed_lv2"><span><?php xl('Clinic','e') ?></span></a>
1304 <ul>
1305 <?php if ($GLOBALS['enable_cdr'] || $GLOBALS['enable_cqm'] || $GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Report Results'),'reports/report_results.php'); ?>
1306 <?php if ($GLOBALS['enable_cdr']) genMiscLink('RTop','rep','0',xl('Standard Measures'),'reports/cqm.php?type=standard'); ?>
1307 <?php if ($GLOBALS['enable_cqm']) genMiscLink('RTop','rep','0',xl('Quality Measures (CQM)'),'reports/cqm.php?type=cqm'); ?>
1308 <?php if ($GLOBALS['enable_amc']) genMiscLink('RTop','rep','0',xl('Automated Measures (AMC)'),'reports/cqm.php?type=amc'); ?>
1309 <?php if ($GLOBALS['enable_amc_tracking']) genMiscLink('RTop','rep','0',xl('AMC Tracking'),'reports/amc_tracking.php'); ?>
1310 <?php if ($GLOBALS['enable_cdr'] && $GLOBALS['enable_alert_log'] ) genMiscLink('RTop','rep','0',xl('Alerts Log'),'reports/cdr_log.php'); ?>
1311 </ul>
1312 </li>
1313 <li><a class="collapsed_lv2"><span><?php xl('Visits','e') ?></span></a>
1314 <ul>
1315 <?php genMiscLink('RTop','rep','0',xl('Daily Report'),'reports/daily_summary_report.php'); ?>
1316 <?php if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appointments'),'reports/appointments_report.php'); ?>
1317 <?php if (!$GLOBALS['disable_pat_trkr'] && !$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Patient Flow Board'),'reports/patient_flow_board_report.php'); ?>
1318 <?php genMiscLink('RTop','rep','0',xl('Encounters'),'reports/encounters_report.php'); ?>
1319 <?php if (!$GLOBALS['disable_calendar']) genMiscLink('RTop','rep','0',xl('Appt-Enc'),'reports/appt_encounter_report.php'); ?>
1320 <?php if (empty($GLOBALS['code_types']['IPPF'])) { ?>
1321 <?php genMiscLink('RTop','rep','0',xl('Superbill'),'reports/custom_report_range.php'); ?>
1322 <?php } ?>
1323 <?php genMiscLink('RTop','rep','0',xl('Eligibility'),'reports/edi_270.php'); ?>
1324 <?php genMiscLink('RTop','rep','0',xl('Eligibility Response'),'reports/edi_271.php'); ?>
1327 <?php if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Chart Activity'),'reports/chart_location_activity.php'); ?>
1328 <?php if (!$GLOBALS['disable_chart_tracker']) genMiscLink('RTop','rep','0',xl('Charts Out'),'reports/charts_checked_out.php'); ?>
1329 <?php genMiscLink('RTop','rep','0',xl('Services'), 'reports/services_by_category.php'); ?>
1330 <?php genMiscLink('RTop','rep','0',xl('Syndromic Surveillance'),'reports/non_reported.php'); ?>
1331 </ul>
1332 </li>
1333 <?php if (acl_check('acct', 'rep_a')) { ?>
1334 <li><a class="collapsed_lv2"><span><?php xl('Financial','e') ?></span></a>
1335 <ul>
1336 <?php genMiscLink('RTop','rep','0',xl('Sales'),'reports/sales_by_item.php'); ?>
1337 <?php genMiscLink('RTop','rep','0',xl('Cash Rec'), 'billing/sl_receipts_report.php'); ?>
1338 <?php genMiscLink('RTop','rep','0',xl('Front Rec'), 'reports/front_receipts_report.php'); ?>
1339 <?php genMiscLink('RTop','rep','0',xl('Pmt Method'), 'reports/receipts_by_method_report.php'); ?>
1340 <?php genMiscLink('RTop','rep','0',xl('Collections'), 'reports/collections_report.php'); ?>
1341 <?php genMiscLink('RTop','rep','0',xl('Pat Ledger'),'reports/pat_ledger.php?form=0'); ?>
1342 <?php genMiscLink('RTop','rep','0',xl('Financial Summary by Service Code'),'reports/svc_code_financial_report.php'); ?>
1343 </ul>
1344 </li>
1345 <?php } ?>
1346 <?php if ($GLOBALS['inhouse_pharmacy']) { ?>
1347 <li><a class="collapsed_lv2"><span><?php xl('Inventory','e') ?></span></a>
1348 <ul>
1349 <?php genMiscLink('RTop','rep','0',xl('List'),'reports/inventory_list.php'); ?>
1350 <?php genMiscLink('RTop','rep','0',xl('Activity'),'reports/inventory_activity.php'); ?>
1351 <?php genMiscLink('RTop','rep','0',xl('Transactions'),'reports/inventory_transactions.php'); ?>
1352 </ul>
1353 </li>
1354 <?php } ?>
1355 <li><a class="collapsed_lv2"><span><?php xl('Procedures','e') ?></span></a>
1356 <ul>
1357 <?php genPopLink(xl('Pending Res'),'../orders/pending_orders.php'); ?>
1358 <?php if (!empty($GLOBALS['code_types']['IPPF'])) genPopLink(xl('Pending F/U'),'../orders/pending_followup.php'); ?>
1359 <?php genPopLink(xl('Statistics'),'../orders/procedure_stats.php'); ?>
1360 </ul>
1361 </li>
1362 <?php if (! $GLOBALS['simplified_demographics']) { ?>
1363 <li><a class="collapsed_lv2"><span><?php xl('Insurance','e') ?></span></a>
1364 <ul>
1365 <?php genMiscLink('RTop','rep','0',xl('Distribution'),'reports/insurance_allocation_report.php'); ?>
1366 <?php genMiscLink('RTop','rep','0',xl('Indigents'),'billing/indigent_patients_report.php'); ?>
1367 <?php genMiscLink('RTop','rep','0',xl('Unique SP'),'reports/unique_seen_patients_report.php'); ?>
1368 </ul>
1369 </li>
1370 <?php } ?>
1371 <?php if (!empty($GLOBALS['code_types']['IPPF'])) { ?>
1372 <li><a class="collapsed_lv2"><span><?php xl('Statistics','e') ?></span></a>
1373 <ul>
1374 <?php genPopLink(xl('IPPF Stats'),'ippf_statistics.php?t=i'); ?>
1375 <?php genPopLink(xl('GCAC Stats'),'ippf_statistics.php?t=g'); ?>
1376 <?php genPopLink(xl('MA Stats'),'ippf_statistics.php?t=m'); ?>
1377 <?php genPopLink(xl('CYP'),'ippf_cyp_report.php'); ?>
1378 <?php genPopLink(xl('Daily Record'),'ippf_daily.php'); ?>
1379 </ul>
1380 </li>
1381 <?php } // end ippf-specific ?>
1382 <li><a class="collapsed_lv2"><span><?php xl('Blank Forms','e') ?></span></a>
1383 <ul>
1384 <?php genPopLink(xl('Demographics'),'../patient_file/summary/demographics_print.php'); ?>
1385 <?php genPopLink(xl('Superbill/Fee Sheet'),'../patient_file/printed_fee_sheet.php'); ?>
1386 <?php genPopLink(xl('Referral'),'../patient_file/transaction/print_referral.php'); ?>
1387 <?php
1388 $lres = sqlStatement("SELECT * FROM list_options " .
1389 "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title");
1390 while ($lrow = sqlFetchArray($lres)) {
1391 $option_id = $lrow['option_id']; // should start with LBF
1392 $title = $lrow['title'];
1393 genPopLink($title, "../forms/LBF/printable.php?formname=$option_id");
1396 </ul>
1397 </li>
1398 <?php if (acl_check('admin','super')) { ?>
1399 <li><a class="collapsed_lv2"><span><?php echo xlt('Services') ?></span></a>
1400 <ul>
1401 <?php genMiscLink('RTop','rep','0',xl('Background Services'),'reports/background_services.php'); ?>
1402 <?php genMiscLink('RTop','rep','0',xl('Direct Message Log'),'reports/direct_message_log.php'); ?>
1403 </ul>
1404 </li>
1405 <?php } ?>
1407 <?php // genTreeLink('RTop','rep','Other'); ?>
1408 </ul>
1409 </li>
1410 <li><a class="collapsed" id="misimg" ><span><?php xl('Miscellaneous','e') ?></span></a>
1411 <ul>
1412 <?php genTreeLink('RTop','ped',xl('Patient Education')); ?>
1413 <?php genTreeLink('RBot','aun',xl('Authorizations')); ?>
1414 <?php genTreeLink('RTop','fax',xl('Fax/Scan')); ?>
1415 <?php genTreeLink('RTop','adb',xl('Addr Book')); ?>
1416 <?php genTreeLink('RTop','ort',xl('Order Catalog')); ?>
1417 <?php if (!$GLOBALS['disable_chart_tracker']) genTreeLink('RTop','cht',xl('Chart Tracker')); ?>
1418 <?php genTreeLink('RTop','ono',xl('Ofc Notes')); ?>
1419 <?php genMiscLink('RTop','adm','0',xl('BatchCom'),'batchcom/batchcom.php'); ?>
1420 <?php $myrow = sqlQuery("SELECT state FROM registry WHERE directory = 'track_anything'");
1421 if($myrow['state']=='1') { genTreeLink('RTop','tan',xl('Configure Tracks')); } ?>
1422 <?php genTreeLink('RTop','pwd',xl('Password')); ?>
1423 <?php genMiscLink('RTop','prf','0',xl('Preferences'),'super/edit_globals.php?mode=user'); ?>
1424 <?php if(acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('New Documents'),'../controller.php?document&list&patient_id=00'); ?>
1425 <?php if (acl_check('patients','docs')) genMiscLink('RTop','adm','0',xl('Document Templates'),'super/manage_document_templates.php'); ?>
1426 </ul>
1427 </li>
1429 </ul>
1431 <br /><hr />
1433 <div id='current_patient' style = 'display:none'>
1434 <b><?php xl('None','e'); ?></b>
1435 </div>
1437 <div id='current_encounter' style = 'display:none'>
1438 <b><?php xl('None','e'); ?></b>
1439 </div>
1440 <?php
1441 genPopupsList();
1442 echo "<hr />\n";
1443 genFindBlock();
1444 echo "<hr />\n";
1447 <input type='hidden' name='findBy' value='Last' />
1448 <input type="hidden" name="searchFields" id="searchFields"/>
1449 <input type="hidden" name="search_service_code" value='' />
1451 </form>
1453 <script language='JavaScript'>
1454 syncRadios();
1456 function save_setting (cb_frames) {
1457 for (var i = 0, len = cb_frames.length; i < len; i++) {
1458 try {
1459 var fref = '<?php echo $uspfx ?>frame' + i + '_chk';
1460 var ureq = $.post( "<?php echo $GLOBALS['webroot'] ?>/library/ajax/user_settings.php",
1461 { lab: fref, val: cb_frames[i] })
1462 .done(function(data) {
1463 // alert( "Data Loaded: " + data );
1465 .fail(function(xhr, textStatus, errorThrown) {
1466 alert("Error:"+xhr.responseText+"\n"+textStatus+"\n"+errorThrown);
1468 .always(function() {
1469 // alert( "finished" );
1472 } catch (err) {
1473 alert (err.message);
1477 </script>
1479 </body>
1480 </html>