added datepicker to batchcom
[openemr.git] / patients / summary_pat_portal.php
bloba9f1e0a36041030700597b218f41d8adff515c82
1 <?php
3 // Copyright (C) 2011 by following authors:
4 // - Cassian LUP <cassi.lup@gmail.com>
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 //SANITIZE ALL ESCAPES
12 // (note this is already completed by the script that includes this
13 // get_patient_info.php )
15 //STOP FAKE REGISTER GLOBALS
16 // (note this is already completed by the script that includes this
17 // get_patient_info.php )
19 //continue session
20 session_start();
22 //landing page definition -- where to go if something goes wrong
23 $landingpage = "index.php?site=".$_SESSION['site_id'];
26 // kick out if patient not authenticated
27 if ( isset($_SESSION['pid']) && isset($_SESSION['patient_portal_onsite']) ) {
28 $pid = $_SESSION['pid'];
30 else {
31 session_destroy();
32 header('Location: '.$landingpage.'&w');
33 exit;
37 $ignoreAuth = true;
38 global $ignoreAuth;
40 require_once("../interface/globals.php");
41 require_once("$srcdir/patient.inc");
42 require_once("$srcdir/acl.inc");
43 require_once("$srcdir/options.inc.php");
44 require_once("../interface/patient_file/history/history.inc.php");
45 require_once("$srcdir/formatting.inc.php");
46 require_once("$srcdir/edi.inc");
47 include_once("$srcdir/lists.inc");
50 <html>
51 <head>
52 <title><?php echo xlt('Patient Information'); ?></title>
53 <?php html_header_show(); ?>
54 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
55 <link rel="stylesheet" type="text/css" href="<?php echo $web_root; ?>/library/js/fancybox/jquery.fancybox-1.2.6.css" media="screen" />
56 <link rel="stylesheet" type="text/css" href="<?php echo $web_root; ?>/library/dynarch_calendar.css">
57 <script type="text/javascript" src="<?php echo $web_root; ?>/library/textformat.js"></script>
58 <script type="text/javascript" src="<?php echo $web_root; ?>/library/dynarch_calendar.js"></script>
59 <?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
60 <script type="text/javascript" src="<?php echo $web_root; ?>/library/dynarch_calendar_setup.js"></script>
61 <script type="text/javascript" src="<?php echo $web_root; ?>/library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
62 <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-3-2/index.js"></script>
63 <script type="text/javascript" src="<?php echo $web_root; ?>/library/js/common.js"></script>
64 <script type="text/javascript" src="<?php echo $web_root; ?>/library/js/fancybox/jquery.fancybox-1.2.6.js"></script>
65 <link rel="stylesheet" href="css/base.css" type="text/css"/>
66 <link rel="stylesheet" href="css/tables.css" type="text/css"/>
67 <script type="text/javascript" language="JavaScript">
69 function refreshme() {
70 location.reload();
73 function toggleIndicator(target,div) {
75 $mode = $(target).find(".indicator").text();
76 if ( $mode == "<?php echo xla('collapse'); ?>" ) {
77 $(target).find(".indicator").text( "<?php echo xla('expand'); ?>" );
78 $("#"+div).hide();
79 } else {
80 $(target).find(".indicator").text( "<?php echo xla('collapse'); ?>" );
81 $("#"+div).show();
85 function refreshAppointments() {
86 $("#appointments_ps_expand").load("get_appointments.php", { 'embeddedScreen' : true }, function() {
87 $(".edit_event").fancybox({
88 'overlayOpacity' : 0.0,
89 'showCloseButton' : true,
90 'centerOnScroll' : false,
91 'autoscale' : true,
92 'hihdeOnContentClick' : false,
93 'callbackOnClose' : function() {
94 refreshAppointments();
96 });
97 });
100 function show_date_fun(){
101 if(document.getElementById('show_date').checked == true){
102 document.getElementById('date_div').style.display = '';
103 }else{
104 document.getElementById('date_div').style.display = 'none';
106 return;
109 $(document).ready(function(){
111 // load divs
112 $("#labtestresults_ps_expand").load("get_lab_results.php", { 'embeddedScreen' : true }, function() {
113 // (note need to place javascript code here also to get the dynamic link to work)
114 $(".medium_modal").fancybox( {
115 'overlayOpacity' : 0.0,
116 'showCloseButton' : true,
117 'frameHeight' : 500,
118 'frameWidth' : 800,
119 'centerOnScroll' : false,
120 'callbackOnClose' : function() {
121 refreshme();
125 $("#problemlist_ps_expand").load("get_problems.php", { 'embeddedScreen' : true }, function() {
126 // (note need to place javascript code here also to get the dynamic link to work)
127 $(".medium_modal").fancybox( {
128 'overlayOpacity' : 0.0,
129 'showCloseButton' : true,
130 'frameHeight' : 500,
131 'frameWidth' : 800,
132 'centerOnScroll' : false,
133 'callbackOnClose' : function() {
134 refreshme();
138 $("#medicationlist_ps_expand").load("get_medications.php", { 'embeddedScreen' : true }, function() {
139 // (note need to place javascript code here also to get the dynamic link to work)
140 $(".medium_modal").fancybox( {
141 'overlayOpacity' : 0.0,
142 'showCloseButton' : true,
143 'frameHeight' : 500,
144 'frameWidth' : 800,
145 'centerOnScroll' : false,
146 'callbackOnClose' : function() {
147 refreshme();
151 $("#medicationallergylist_ps_expand").load("get_allergies.php", { 'embeddedScreen' : true }, function() {
152 // (note need to place javascript code here also to get the dynamic link to work)
153 $(".medium_modal").fancybox( {
154 'overlayOpacity' : 0.0,
155 'showCloseButton' : true,
156 'frameHeight' : 500,
157 'frameWidth' : 800,
158 'centerOnScroll' : false,
159 'callbackOnClose' : function() {
160 refreshme();
164 $("#amendments_ps_expand").load("get_amendments.php", { 'embeddedScreen' : true }, function() {
165 // (note need to place javascript code here also to get the dynamic link to work)
166 $(".medium_modal").fancybox( {
167 'overlayOpacity' : 0.0,
168 'showCloseButton' : true,
169 'frameHeight' : 500,
170 'frameWidth' : 800,
171 'centerOnScroll' : false,
172 'callbackOnClose' : function() {
173 refreshme();
179 refreshAppointments();
181 // fancy box
182 enable_modals();
184 // modal for dialog boxes
185 $(".large_modal").fancybox( {
186 'overlayOpacity' : 0.0,
187 'showCloseButton' : true,
188 'frameHeight' : 600,
189 'frameWidth' : 1000,
190 'centerOnScroll' : false
193 // modal for image viewer
194 $(".image_modal").fancybox( {
195 'overlayOpacity' : 0.0,
196 'showCloseButton' : true,
197 'centerOnScroll' : false,
198 'autoscale' : true
201 $(".add_event").fancybox( {
202 'overlayOpacity' : 0.0,
203 'showCloseButton' : true,
204 'centerOnScroll' : false,
205 'autoscale' : true,
206 'hideOnContentClick' : false,
207 'onClose' : function() {
208 refreshme();
212 $(".generateCCR").click(
213 function() {
214 if(document.getElementById('show_date').checked == true){
215 if(document.getElementById('Start').value == '' || document.getElementById('End').value == ''){
216 alert('<?php echo xls('Please select a start date and end date') ?>');
217 return false;
220 var ccrAction = document.getElementsByName('ccrAction');
221 ccrAction[0].value = 'generate';
222 var raw = document.getElementsByName('raw');
223 raw[0].value = 'no';
224 ccr_form.setAttribute("target", "_blank");
225 $("#ccr_form").submit();
226 ccr_form.setAttribute("target", "");
228 $(".generateCCR_raw").click(
229 function() {
230 var ccrAction = document.getElementsByName('ccrAction');
231 ccrAction[0].value = 'generate';
232 var raw = document.getElementsByName('raw');
233 raw[0].value = 'yes';
234 ccr_form.setAttribute("target", "_blank");
235 $("#ccr_form").submit();
236 ccr_form.setAttribute("target", "");
238 $(".generateCCR_download_h").click(
239 function() {
240 var ccrAction = document.getElementsByName('ccrAction');
241 ccrAction[0].value = 'generate';
242 var raw = document.getElementsByName('raw');
243 raw[0].value = 'hybrid';
244 $("#ccr_form").submit();
246 $(".generateCCR_download_p").click(
247 function() {
248 if(document.getElementById('show_date').checked == true){
249 if(document.getElementById('Start').value == '' || document.getElementById('End').value == ''){
250 alert('<?php echo xls('Please select a start date and end date') ?>');
251 return false;
254 var ccrAction = document.getElementsByName('ccrAction');
255 ccrAction[0].value = 'generate';
256 var raw = document.getElementsByName('raw');
257 raw[0].value = 'pure';
258 $("#ccr_form").submit();
260 $(".viewCCD").click(
261 function() {
262 var ccrAction = document.getElementsByName('ccrAction');
263 ccrAction[0].value = 'viewccd';
264 var raw = document.getElementsByName('raw');
265 raw[0].value = 'no';
266 ccr_form.setAttribute("target", "_blank");
267 $("#ccr_form").submit();
268 ccr_form.setAttribute("target", "");
270 $(".viewCCD_raw").click(
271 function() {
272 var ccrAction = document.getElementsByName('ccrAction');
273 ccrAction[0].value = 'viewccd';
274 var raw = document.getElementsByName('raw');
275 raw[0].value = 'yes';
276 ccr_form.setAttribute("target", "_blank");
277 $("#ccr_form").submit();
278 ccr_form.setAttribute("target", "");
280 $(".viewCCD_download").click(
281 function() {
282 var ccrAction = document.getElementsByName('ccrAction');
283 ccrAction[0].value = 'viewccd';
284 var raw = document.getElementsByName('raw');
285 raw[0].value = 'pure';
286 $("#ccr_form").submit();
288 $(".generateDoc_download").click(
289 function() {
290 $("#doc_form").submit();
292 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
293 $(".viewCCR_send_dialog").click(
294 function() {
295 $("#ccr_send_dialog").toggle();
297 $(".viewCCR_transmit").click(
298 function() {
299 $(".viewCCR_transmit").attr('disabled','disabled');
300 var ccrAction = document.getElementsByName('ccrAction');
301 ccrAction[0].value = 'generate';
302 var ccrRecipient = $("#ccr_send_to").val();
303 var raw = document.getElementsByName('raw');
304 raw[0].value = 'send '+ccrRecipient;
305 if(ccrRecipient=="") {
306 $("#ccr_send_message").html("<?php
307 echo xla('Please enter a valid Direct Address above.');?>");
308 $("#ccr_send_result").show();
309 } else {
310 $(".viewCCR_transmit").attr('disabled','disabled');
311 $("#ccr_send_message").html("<?php
312 echo xla('Working... this may take a minute.');?>");
313 $("#ccr_send_result").show();
314 var action=$("#ccr_form").attr('action');
315 $.post(action, {ccrAction:'generate',raw:'send '+ccrRecipient,requested_by:'patient'},
316 function(data) {
317 if(data=="SUCCESS") {
318 $("#ccr_send_message").html("<?php
319 echo xla('Your message was submitted for delivery to');
320 ?> "+ccrRecipient);
321 $("#ccr_send_to").val("");
322 } else {
323 $("#ccr_send_message").html(data);
325 $(".viewCCR_transmit").removeAttr('disabled');
329 <?php }
330 if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
331 $(".viewCCD_send_dialog").click(
332 function() {
333 $("#ccd_send_dialog").toggle();
335 $(".viewCCD_transmit").click(
336 function() {
337 $(".viewCCD_transmit").attr('disabled','disabled');
338 var ccrAction = document.getElementsByName('ccrAction');
339 ccrAction[0].value = 'viewccd';
340 var ccdRecipient = $("#ccd_send_to").val();
341 var raw = document.getElementsByName('raw');
342 raw[0].value = 'send '+ccdRecipient;
343 if(ccdRecipient=="") {
344 $("#ccd_send_message").html("<?php
345 echo xla('Please enter a valid Direct Address above.');?>");
346 $("#ccd_send_result").show();
347 } else {
348 $(".viewCCD_transmit").attr('disabled','disabled');
349 $("#ccd_send_message").html("<?php
350 echo xla('Working... this may take a minute.');?>");
351 $("#ccd_send_result").show();
352 var action=$("#ccr_form").attr('action');
353 $.post(action, {ccrAction:'viewccd',raw:'send '+ccdRecipient,requested_by:'patient'},
354 function(data) {
355 if(data=="SUCCESS") {
356 $("#ccd_send_message").html("<?php
357 echo xla('Your message was submitted for delivery to');
358 ?> "+ccdRecipient);
359 $("#ccd_send_to").val("");
360 } else {
361 $("#ccd_send_message").html(data);
363 $(".viewCCD_transmit").removeAttr('disabled');
367 <?php } ?>
371 </script>
373 </head>
375 <body class="body_top">
377 <div id="wrapper" class="lefttop" style="width: 700px;">
378 <h2 class="heading"><?php echo xlt("Patient Portal"); ?></h2>
380 <?php
381 $result = getPatientData($pid);
383 <?php echo xlt('Welcome'); ?> <b><?php echo text($result['fname']." ".$result['lname']); ?></b>
385 <div style='margin-top:10px'> <!-- start main content div -->
386 <table border="0" cellspacing="0" cellpadding="0" width="100%">
387 <tr>
388 <td align="left" valign="top">
389 <!-- start left column div -->
390 <div style='float:left; margin-right:20px'>
391 <table cellspacing=0 cellpadding=0>
392 <?php if ( $GLOBALS['activate_ccr_ccd_report'] ) { // show CCR/CCD reporting options ?>
393 <tr>
394 <td width='650px'>
395 <?php
396 // Reports widget
397 $widgetTitle = xl("Reports");
398 $widgetLabel = "reports";
399 $widgetButtonLabel = xl("");
400 $widgetButtonClass = "hidden";
401 $linkMethod = "html";
402 $bodyClass = "notab";
403 $widgetAuth = false;
404 $fixedWidth = true;
405 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
406 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
407 $widgetAuth, $fixedWidth);
409 <br/>
410 <div style='margin-left:3em; margin-right:3em; padding:1em; border:1px solid blue;' class='text'>
411 <div id="ccr_report">
412 <form name='ccr_form' id='ccr_form' method='post' action='../ccr/createCCR.php?portal_auth=1'>
413 <span class='text'><b><?php echo xlt('Continuity of Care Record (CCR)'); ?></b></span>&nbsp;&nbsp;
414 <br/>
415 <span class='text'>(<?php echo xlt('Pop ups need to be enabled to see these reports'); ?>)</span>
416 <br/>
417 <br/>
418 <input type='hidden' name='ccrAction'>
419 <input type='hidden' name='raw'>
420 <input type="checkbox" name="show_date" id="show_date" onchange="show_date_fun();" ><span class='text'><?php echo xlt('Use Date Range'); ?>
421 <br>
422 <div id="date_div" style="display:none" >
423 <br>
424 <table border="0" cellpadding="0" cellspacing="0" >
425 <tr>
426 <td>
427 <span class='bold'><?php echo xlt('Start Date');?>: </span>
428 </td>
429 <td>
430 <input type='text' size='10' name='Start' id='Start'
431 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
432 title='<?php echo xla('yyyy-mm-dd'); ?>' />
433 <img src='../interface/pic/show_calendar.gif' align='absbottom' width='24' height='22'
434 id='img_start' border='0' alt='[?]' style='cursor:pointer'
435 title='<?php echo xla('Click here to choose a date'); ?>' >
436 <script LANGUAGE="JavaScript">
437 Calendar.setup({inputField:"Start", ifFormat:"%Y-%m-%d", button:"img_start"});
438 </script>
439 </td>
440 <td>
441 &nbsp;
442 <span class='bold'><?php echo xlt('End Date');?>: </span>
443 </td>
444 <td>
445 <input type='text' size='10' name='End' id='End'
446 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
447 title='<?php echo xla('yyyy-mm-dd'); ?>' />
448 <img src='../interface/pic/show_calendar.gif' align='absbottom' width='24' height='22'
449 id='img_end' border='0' alt='[?]' style='cursor:pointer'
450 title='<?php echo xla('Click here to choose a date'); ?>' >
451 <script LANGUAGE="JavaScript">
452 Calendar.setup({inputField:"End", ifFormat:"%Y-%m-%d", button:"img_end"});
453 </script>
454 </td>
455 </tr>
456 </table>
457 </div>
458 <br>
459 <input type="button" class="generateCCR" value="<?php echo xla('View/Print'); ?>" />
460 <!-- <input type="button" class="generateCCR_download_h" value="<?php echo xla('Download'); ?>" /> -->
461 <input type="button" class="generateCCR_download_p" value="<?php echo xla('Download'); ?>" />
462 <!-- <input type="button" class="generateCCR_raw" value="<?php echo xla('Raw Report'); ?>" /> -->
463 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
464 <input type="button" class="viewCCR_send_dialog" value="<?php echo xla('Transmit'); ?>" />
465 <br>
466 <div id="ccr_send_dialog" style="display:none" >
467 <br>
468 <table border="0" cellpadding="0" cellspacing="0" >
469 <tr>
470 <td>
471 <span class='bold'><?php echo xlt('Enter Recipient\'s Direct Address');?>: </span>
472 <input type="text" size="64" name="ccr_send_to" id="ccr_send_to" value="">
473 <input type="button" class="viewCCR_transmit" value="<?php echo xla('Send'); ?>" />
474 <div id="ccr_send_result" style="display:none" >
475 <span class="text" id="ccr_send_message"></span>
476 </div>
477 </td>
478 </tr>
479 </table>
480 </div>
481 <?php } ?>
482 <hr/>
483 <span class='text'><b><?php echo xlt('Continuity of Care Document (CCD)'); ?></b></span>&nbsp;&nbsp;
484 <br/>
485 <span class='text'>(<?php echo xlt('Pop ups need to be enabled to see these reports'); ?>)</span>
486 <br/>
487 <br/>
488 <input type="button" class="viewCCD" value="<?php echo xla('View/Print'); ?>" />
489 <input type="button" class="viewCCD_download" value="<?php echo xla('Download'); ?>" />
490 <!-- <input type="button" class="viewCCD_raw" value="<?php echo xla('Raw Report'); ?>" /> -->
491 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
492 <input type="button" class="viewCCD_send_dialog" value="<?php echo xla('Transmit'); ?>" />
493 <br>
494 <div id="ccd_send_dialog" style="display:none" >
495 <br>
496 <table border="0" cellpadding="0" cellspacing="0" >
497 <tr>
498 <td>
499 <span class='bold'><?php echo xlt('Enter Recipient\'s Direct Address');?>: </span>
500 <input type="text" size="64" name="ccd_send_to" id="ccd_send_to" value="">
501 <input type="button" class="viewCCD_transmit" value="<?php echo xla('Send'); ?>" />
502 <div id="ccd_send_result" style="display:none" >
503 <span class="text" id="ccd_send_message"></span>
504 </div>
505 </td>
506 </tr>
507 </table>
508 </div>
509 <?php } ?>
510 </form>
511 </div>
512 </div>
513 <br/>
515 </div>
516 </td>
517 </tr>
518 <?php } // end CCR/CCD reporting options ?>
519 <?php if ( $GLOBALS['portal_onsite_document_download'] ) { ?>
520 <?php echo "<tr><td width='650px'>";
521 $widgetTitle = xl('Documents');
522 $widgetLabel = "documents";
523 $widgetButtonLabel = xl('Download');
524 $widgetButtonClass = "hidden";
525 $linkMethod = "html";
526 $bodyClass = "notab";
527 $widgetAuth = false;
528 $fixedWidth = true;
529 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
530 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
531 $widgetAuth, $fixedWidth);
533 <span class="text"><?php echo xlt('Download all patient documents');?></span>
534 <br /><br />
535 <form name='doc_form' id='doc_form' action='get_patient_documents.php' method='post'>
536 <input type="button" class="generateDoc_download" value="<?php echo xla('Download'); ?>" />
537 </form>
538 </div>
539 </td>
540 </tr>
541 <?php } ?>
542 <?php echo "<tr><td width='650px'>";
543 // Lab tests results expand collapse widget
544 $widgetTitle = xl("Lab Test Results");
545 $widgetLabel = "labtestresults";
546 $widgetButtonLabel = xl("");
547 $widgetButtonClass = "hidden";
548 $linkMethod = "html";
549 $bodyClass = "notab";
550 $widgetAuth = false;
551 $fixedWidth = true;
552 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
553 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
554 $widgetAuth, $fixedWidth);
557 <br/>
558 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
559 </div>
561 </td>
562 </tr>
563 <?php echo "<tr><td width='650px'>";
564 // problem list collapse widget
565 $widgetTitle = xl("Problem List");
566 $widgetLabel = "problemlist";
567 $widgetButtonLabel = xl("");
568 $widgetButtonClass = "hidden";
569 $linkMethod = "html";
570 $bodyClass = "notab";
571 $widgetAuth = false;
572 $fixedWidth = true;
573 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel , $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth); ?>
575 </div>
578 </td>
579 </tr>
581 <tr>
582 <td width='650px'>
583 <?php
584 // medication list expand collapse widget
585 $widgetTitle = xl("Medication List");
586 $widgetLabel = "medicationlist";
587 $widgetButtonLabel = xl("");
588 $widgetButtonClass = "hidden";
589 $linkMethod = "html";
590 $bodyClass = "notab";
591 $widgetAuth = false;
592 $fixedWidth = true;
593 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
594 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
595 $widgetAuth, $fixedWidth);
597 <br/>
598 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
599 </div>
601 </td>
602 </tr>
604 <tr>
605 <td width='650px'>
606 <?php // medication allergy expand collapse widget
607 $widgetTitle = xl("Medication Allergy List");
608 $widgetLabel = "medicationallergylist";
609 $widgetButtonLabel = xl("");
610 $widgetButtonClass = "";
611 $linkMethod = "html";
612 $bodyClass = "notab";
613 $widgetAuth = false;
614 $fixedWidth = true;
615 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
616 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
617 $widgetAuth, $fixedWidth);
619 <br/>
620 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
621 </div>
623 </td>
624 </tr>
626 <!-- Amendments -->
627 <?php if ( $GLOBALS['amendments'] ) { ?>
628 <tr>
629 <td width='650px'>
630 <?php
631 $widgetTitle = xl("Amendments");
632 $widgetLabel = "amendments";
633 $widgetButtonLabel = xl("");
634 $widgetButtonClass = "hidden";
635 $linkMethod = "html";
636 $bodyClass = "notab";
637 $widgetAuth = false;
638 $fixedWidth = true;
639 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
640 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
641 $widgetAuth, $fixedWidth);
644 <br/>
645 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
646 </td>
647 </tr>
648 <?php } ?>
649 <tr>
650 <td width='650px'>
651 <?php
652 // Show current and upcoming appointments.
653 $query = "SELECT e.pc_eid, e.pc_aid, e.pc_title, e.pc_eventDate, " .
654 "e.pc_startTime, e.pc_hometext, u.fname, u.lname, u.mname, " .
655 "c.pc_catname " .
656 "FROM openemr_postcalendar_events AS e, users AS u, " .
657 "openemr_postcalendar_categories AS c WHERE " .
658 "e.pc_pid = ? AND e.pc_eventDate >= CURRENT_DATE AND " .
659 "u.id = e.pc_aid AND e.pc_catid = c.pc_catid " .
660 "ORDER BY e.pc_eventDate, e.pc_startTime";
661 //echo $query;
662 $res = sqlStatement($query, array($pid) );
664 // appointments expand collapse widget
665 $widgetTitle = xl("Appointments");
666 $widgetLabel = "appointments";
667 $widgetButtonLabel = xl("Add");
668 $widgetButtonLink = "add_edit_event_user.php?pid=".htmlspecialchars($pid, ENT_QUOTES);
669 $widgetButtonClass = "edit_event iframe";
670 $linkMethod = "";
671 $bodyClass = "summary_item small";
672 if ($GLOBALS['portal_onsite_appt_modify'])
674 $widgetAuth = true;
676 else
678 $widgetAuth = false;
680 $fixedWidth = false;
681 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel , $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth);
682 $count = 0;
684 <div id='stats_div' style="display:none">
685 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div>
686 </div>
687 </td>
688 </tr>
689 </table>
691 </div>
693 </td>
695 </tr>
697 </table>
699 </div> <!-- end main content div -->
701 <div id="portal-buttons-bottom"> <!-- buttons bottom div -->
702 <input type="button" style="text-align: right;" value="<?php echo xla('Log Out'); ?>" onclick="window.location = 'logout.php'"/>
704 <input type="button" style="text-align: right;" value="<?php echo xla('Change Password'); ?>" onclick="window.location = '<?php echo $landingpage."&password_update=1";?>'"/>
705 </div><!-- end buttons bottom div -->
707 </div>
708 </body>
709 </html>