PSR2 fixes
[openemr.git] / patients / summary_pat_portal.php
blob1f5920e226dfee7640aa22894be63d5f8b2409a0
1 <?php
2 /**
3 * summary_pat_portal
5 * @package OpenEMR
6 * @link http://www.open-emr.org
7 * @author Cassian LUP <cassi.lup@gmail.com>
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2011 Cassian LUP <cassi.lup@gmail.com>
10 * @copyright Copyright (c) 2017 Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
14 //continue session
15 session_start();
17 //landing page definition -- where to go if something goes wrong
18 $landingpage = "index.php?site=".$_SESSION['site_id'];
21 // kick out if patient not authenticated
22 if (isset($_SESSION['pid']) && isset($_SESSION['patient_portal_onsite'])) {
23 $pid = $_SESSION['pid'];
24 } else {
25 session_destroy();
26 header('Location: '.$landingpage.'&w');
27 exit;
32 $ignoreAuth = true;
33 global $ignoreAuth;
35 require_once("../interface/globals.php");
36 require_once("$srcdir/patient.inc");
37 require_once("$srcdir/acl.inc");
38 require_once("$srcdir/options.inc.php");
39 require_once("../interface/patient_file/history/history.inc.php");
40 require_once("$srcdir/edi.inc");
41 require_once("$srcdir/lists.inc");
44 <html>
45 <head>
46 <title><?php echo xlt('Patient Information'); ?></title>
47 <?php html_header_show(); ?>
48 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
49 <link rel="stylesheet" type="text/css" href="<?php echo $web_root; ?>/library/js/fancybox/jquery.fancybox-1.2.6.css" media="screen" />
50 <link rel="stylesheet" href="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.min.css">
52 <script type="text/javascript" src="<?php echo $web_root; ?>/library/textformat.js?v=<?php echo $v_js_includes; ?>"></script>
53 <script type="text/javascript" src="<?php echo $web_root; ?>/library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
54 <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-7-2/index.js"></script>
55 <script type="text/javascript" src="<?php echo $web_root; ?>/library/js/common.js?v=<?php echo $v_js_includes; ?>"></script>
56 <script type="text/javascript" src="<?php echo $web_root; ?>/library/js/fancybox/jquery.fancybox-1.2.6.js"></script>
57 <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.full.min.js"></script>
59 <link rel="stylesheet" href="css/base.css" type="text/css"/>
60 <link rel="stylesheet" href="css/tables.css" type="text/css"/>
61 <script type="text/javascript" language="JavaScript">
63 function refreshme() {
64 location.reload();
67 function toggleIndicator(target,div) {
69 $mode = $(target).find(".indicator").text();
70 if ( $mode == "<?php echo xla('collapse'); ?>" ) {
71 $(target).find(".indicator").text( "<?php echo xla('expand'); ?>" );
72 $("#"+div).hide();
73 } else {
74 $(target).find(".indicator").text( "<?php echo xla('collapse'); ?>" );
75 $("#"+div).show();
79 function refreshAppointments() {
80 $("#appointments_ps_expand").load("get_appointments.php", { 'embeddedScreen' : true }, function() {
81 $(".edit_event").fancybox({
82 'overlayOpacity' : 0.0,
83 'showCloseButton' : true,
84 'centerOnScroll' : false,
85 'autoscale' : true,
86 'hihdeOnContentClick' : false,
87 'callbackOnClose' : function() {
88 refreshAppointments();
90 });
91 });
94 function show_date_fun(){
95 if(document.getElementById('show_date').checked == true){
96 document.getElementById('date_div').style.display = '';
97 }else{
98 document.getElementById('date_div').style.display = 'none';
100 return;
103 $(document).ready(function(){
105 // load divs
106 $("#labtestresults_ps_expand").load("get_lab_results.php", { 'embeddedScreen' : true }, function() {
107 // (note need to place javascript code here also to get the dynamic link to work)
108 $(".medium_modal").fancybox( {
109 'overlayOpacity' : 0.0,
110 'showCloseButton' : true,
111 'frameHeight' : 500,
112 'frameWidth' : 800,
113 'centerOnScroll' : false,
114 'callbackOnClose' : function() {
115 refreshme();
119 $("#problemlist_ps_expand").load("get_problems.php", { 'embeddedScreen' : true }, function() {
120 // (note need to place javascript code here also to get the dynamic link to work)
121 $(".medium_modal").fancybox( {
122 'overlayOpacity' : 0.0,
123 'showCloseButton' : true,
124 'frameHeight' : 500,
125 'frameWidth' : 800,
126 'centerOnScroll' : false,
127 'callbackOnClose' : function() {
128 refreshme();
132 $("#medicationlist_ps_expand").load("get_medications.php", { 'embeddedScreen' : true }, function() {
133 // (note need to place javascript code here also to get the dynamic link to work)
134 $(".medium_modal").fancybox( {
135 'overlayOpacity' : 0.0,
136 'showCloseButton' : true,
137 'frameHeight' : 500,
138 'frameWidth' : 800,
139 'centerOnScroll' : false,
140 'callbackOnClose' : function() {
141 refreshme();
145 $("#medicationallergylist_ps_expand").load("get_allergies.php", { 'embeddedScreen' : true }, function() {
146 // (note need to place javascript code here also to get the dynamic link to work)
147 $(".medium_modal").fancybox( {
148 'overlayOpacity' : 0.0,
149 'showCloseButton' : true,
150 'frameHeight' : 500,
151 'frameWidth' : 800,
152 'centerOnScroll' : false,
153 'callbackOnClose' : function() {
154 refreshme();
158 $("#amendments_ps_expand").load("get_amendments.php", { 'embeddedScreen' : true }, function() {
159 // (note need to place javascript code here also to get the dynamic link to work)
160 $(".medium_modal").fancybox( {
161 'overlayOpacity' : 0.0,
162 'showCloseButton' : true,
163 'frameHeight' : 500,
164 'frameWidth' : 800,
165 'centerOnScroll' : false,
166 'callbackOnClose' : function() {
167 refreshme();
173 refreshAppointments();
175 // fancy box
176 enable_modals();
178 // modal for dialog boxes
179 $(".large_modal").fancybox( {
180 'overlayOpacity' : 0.0,
181 'showCloseButton' : true,
182 'frameHeight' : 600,
183 'frameWidth' : 1000,
184 'centerOnScroll' : false
187 // modal for image viewer
188 $(".image_modal").fancybox( {
189 'overlayOpacity' : 0.0,
190 'showCloseButton' : true,
191 'centerOnScroll' : false,
192 'autoscale' : true
195 $(".add_event").fancybox( {
196 'overlayOpacity' : 0.0,
197 'showCloseButton' : true,
198 'centerOnScroll' : false,
199 'autoscale' : true,
200 'hideOnContentClick' : false,
201 'onClose' : function() {
202 refreshme();
206 $(".generateCCR").click(
207 function() {
208 if(document.getElementById('show_date').checked == true){
209 if(document.getElementById('Start').value == '' || document.getElementById('End').value == ''){
210 alert('<?php echo xls('Please select a start date and end date') ?>');
211 return false;
214 var ccrAction = document.getElementsByName('ccrAction');
215 ccrAction[0].value = 'generate';
216 var raw = document.getElementsByName('raw');
217 raw[0].value = 'no';
218 ccr_form.setAttribute("target", "_blank");
219 $("#ccr_form").submit();
220 ccr_form.setAttribute("target", "");
222 $(".generateCCR_raw").click(
223 function() {
224 var ccrAction = document.getElementsByName('ccrAction');
225 ccrAction[0].value = 'generate';
226 var raw = document.getElementsByName('raw');
227 raw[0].value = 'yes';
228 ccr_form.setAttribute("target", "_blank");
229 $("#ccr_form").submit();
230 ccr_form.setAttribute("target", "");
232 $(".generateCCR_download_h").click(
233 function() {
234 var ccrAction = document.getElementsByName('ccrAction');
235 ccrAction[0].value = 'generate';
236 var raw = document.getElementsByName('raw');
237 raw[0].value = 'hybrid';
238 $("#ccr_form").submit();
240 $(".generateCCR_download_p").click(
241 function() {
242 if(document.getElementById('show_date').checked == true){
243 if(document.getElementById('Start').value == '' || document.getElementById('End').value == ''){
244 alert('<?php echo xls('Please select a start date and end date') ?>');
245 return false;
248 var ccrAction = document.getElementsByName('ccrAction');
249 ccrAction[0].value = 'generate';
250 var raw = document.getElementsByName('raw');
251 raw[0].value = 'pure';
252 $("#ccr_form").submit();
254 $(".viewCCD").click(
255 function() {
256 var ccrAction = document.getElementsByName('ccrAction');
257 ccrAction[0].value = 'viewccd';
258 var raw = document.getElementsByName('raw');
259 raw[0].value = 'no';
260 ccr_form.setAttribute("target", "_blank");
261 $("#ccr_form").submit();
262 ccr_form.setAttribute("target", "");
264 $(".viewCCD_raw").click(
265 function() {
266 var ccrAction = document.getElementsByName('ccrAction');
267 ccrAction[0].value = 'viewccd';
268 var raw = document.getElementsByName('raw');
269 raw[0].value = 'yes';
270 ccr_form.setAttribute("target", "_blank");
271 $("#ccr_form").submit();
272 ccr_form.setAttribute("target", "");
274 $(".viewCCD_download").click(
275 function() {
276 var ccrAction = document.getElementsByName('ccrAction');
277 ccrAction[0].value = 'viewccd';
278 var raw = document.getElementsByName('raw');
279 raw[0].value = 'pure';
280 $("#ccr_form").submit();
282 $(".generateDoc_download").click(
283 function() {
284 $("#doc_form").submit();
286 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
287 $(".viewCCR_send_dialog").click(
288 function() {
289 $("#ccr_send_dialog").toggle();
291 $(".viewCCR_transmit").click(
292 function() {
293 $(".viewCCR_transmit").attr('disabled','disabled');
294 var ccrAction = document.getElementsByName('ccrAction');
295 ccrAction[0].value = 'generate';
296 var ccrRecipient = $("#ccr_send_to").val();
297 var raw = document.getElementsByName('raw');
298 raw[0].value = 'send '+ccrRecipient;
299 if(ccrRecipient=="") {
300 $("#ccr_send_message").html("<?php
301 echo xla('Please enter a valid Direct Address above.');?>");
302 $("#ccr_send_result").show();
303 } else {
304 $(".viewCCR_transmit").attr('disabled','disabled');
305 $("#ccr_send_message").html("<?php
306 echo xla('Working... this may take a minute.');?>");
307 $("#ccr_send_result").show();
308 var action=$("#ccr_form").attr('action');
309 $.post(action, {ccrAction:'generate',raw:'send '+ccrRecipient,requested_by:'patient'},
310 function(data) {
311 if(data=="SUCCESS") {
312 $("#ccr_send_message").html("<?php
313 echo xla('Your message was submitted for delivery to');
314 ?> "+ccrRecipient);
315 $("#ccr_send_to").val("");
316 } else {
317 $("#ccr_send_message").html(data);
319 $(".viewCCR_transmit").removeAttr('disabled');
323 <?php }
325 if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
326 $(".viewCCD_send_dialog").click(
327 function() {
328 $("#ccd_send_dialog").toggle();
330 $(".viewCCD_transmit").click(
331 function() {
332 $(".viewCCD_transmit").attr('disabled','disabled');
333 var ccrAction = document.getElementsByName('ccrAction');
334 ccrAction[0].value = 'viewccd';
335 var ccdRecipient = $("#ccd_send_to").val();
336 var raw = document.getElementsByName('raw');
337 raw[0].value = 'send '+ccdRecipient;
338 if(ccdRecipient=="") {
339 $("#ccd_send_message").html("<?php
340 echo xla('Please enter a valid Direct Address above.');?>");
341 $("#ccd_send_result").show();
342 } else {
343 $(".viewCCD_transmit").attr('disabled','disabled');
344 $("#ccd_send_message").html("<?php
345 echo xla('Working... this may take a minute.');?>");
346 $("#ccd_send_result").show();
347 var action=$("#ccr_form").attr('action');
348 $.post(action, {ccrAction:'viewccd',raw:'send '+ccdRecipient,requested_by:'patient'},
349 function(data) {
350 if(data=="SUCCESS") {
351 $("#ccd_send_message").html("<?php
352 echo xla('Your message was submitted for delivery to');
353 ?> "+ccdRecipient);
354 $("#ccd_send_to").val("");
355 } else {
356 $("#ccd_send_message").html(data);
358 $(".viewCCD_transmit").removeAttr('disabled');
362 <?php } ?>
364 $('.datepicker').datetimepicker({
365 <?php $datetimepicker_timepicker = false; ?>
366 <?php $datetimepicker_showseconds = false; ?>
367 <?php $datetimepicker_formatInput = false; ?>
368 <?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
369 <?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
373 </script>
375 </head>
377 <body class="body_top">
379 <div id="wrapper" class="lefttop" style="width: 700px;">
380 <h2 class="heading"><?php echo xlt("Patient Portal"); ?></h2>
382 <?php
383 $result = getPatientData($pid);
385 <?php echo xlt('Welcome'); ?> <b><?php echo text($result['fname']." ".$result['lname']); ?></b>
387 <div style='margin-top:10px'> <!-- start main content div -->
388 <table border="0" cellspacing="0" cellpadding="0" width="100%">
389 <tr>
390 <td align="left" valign="top">
391 <!-- start left column div -->
392 <div style='float:left; margin-right:20px'>
393 <table cellspacing=0 cellpadding=0>
394 <?php if ($GLOBALS['activate_ccr_ccd_report']) { // show CCR/CCD reporting options ?>
395 <tr>
396 <td width='650px'>
397 <?php
398 // Reports widget
399 $widgetTitle = xl("Reports");
400 $widgetLabel = "reports";
401 $widgetButtonLabel = xl("");
402 $widgetButtonClass = "hidden";
403 $linkMethod = "html";
404 $bodyClass = "notab";
405 $widgetAuth = false;
406 $fixedWidth = true;
407 expand_collapse_widget(
408 $widgetTitle,
409 $widgetLabel,
410 $widgetButtonLabel,
411 $widgetButtonLink,
412 $widgetButtonClass,
413 $linkMethod,
414 $bodyClass,
415 $widgetAuth,
416 $fixedWidth
419 <br/>
420 <div style='margin-left:3em; margin-right:3em; padding:1em; border:1px solid blue;' class='text'>
421 <div id="ccr_report">
422 <form name='ccr_form' id='ccr_form' method='post' action='../ccr/createCCR.php?portal_auth=1'>
423 <span class='text'><b><?php echo xlt('Continuity of Care Record (CCR)'); ?></b></span>&nbsp;&nbsp;
424 <br/>
425 <span class='text'>(<?php echo xlt('Pop ups need to be enabled to see these reports'); ?>)</span>
426 <br/>
427 <br/>
428 <input type='hidden' name='ccrAction'>
429 <input type='hidden' name='raw'>
430 <input type="checkbox" name="show_date" id="show_date" onchange="show_date_fun();" ><span class='text'><?php echo xlt('Use Date Range'); ?>
431 <br>
432 <div id="date_div" style="display:none" >
433 <br>
434 <table border="0" cellpadding="0" cellspacing="0" >
435 <tr>
436 <td>
437 <span class='bold'><?php echo xlt('Start Date');?>: </span>
438 </td>
439 <td>
440 <input type='text' size='10' class='datepicker' name='Start' id='Start'
441 title='<?php echo xla('yyyy-mm-dd'); ?>' />
442 </td>
443 <td>
444 &nbsp;
445 <span class='bold'><?php echo xlt('End Date');?>: </span>
446 </td>
447 <td>
448 <input type='text' class='datepicker' size='10' name='End' id='End'
449 title='<?php echo xla('yyyy-mm-dd'); ?>' />
450 </td>
451 </tr>
452 </table>
453 </div>
454 <br>
455 <input type="button" class="generateCCR" value="<?php echo xla('View/Print'); ?>" />
456 <!-- <input type="button" class="generateCCR_download_h" value="<?php echo xla('Download'); ?>" /> -->
457 <input type="button" class="generateCCR_download_p" value="<?php echo xla('Download'); ?>" />
458 <!-- <input type="button" class="generateCCR_raw" value="<?php echo xla('Raw Report'); ?>" /> -->
459 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
460 <input type="button" class="viewCCR_send_dialog" value="<?php echo xla('Transmit'); ?>" />
461 <br>
462 <div id="ccr_send_dialog" style="display:none" >
463 <br>
464 <table border="0" cellpadding="0" cellspacing="0" >
465 <tr>
466 <td>
467 <span class='bold'><?php echo xlt('Enter Recipient\'s Direct Address');?>: </span>
468 <input type="text" size="64" name="ccr_send_to" id="ccr_send_to" value="">
469 <input type="button" class="viewCCR_transmit" value="<?php echo xla('Send'); ?>" />
470 <div id="ccr_send_result" style="display:none" >
471 <span class="text" id="ccr_send_message"></span>
472 </div>
473 </td>
474 </tr>
475 </table>
476 </div>
477 <?php } ?>
478 <hr/>
479 <span class='text'><b><?php echo xlt('Continuity of Care Document (CCD)'); ?></b></span>&nbsp;&nbsp;
480 <br/>
481 <span class='text'>(<?php echo xlt('Pop ups need to be enabled to see these reports'); ?>)</span>
482 <br/>
483 <br/>
484 <input type="button" class="viewCCD" value="<?php echo xla('View/Print'); ?>" />
485 <input type="button" class="viewCCD_download" value="<?php echo xla('Download'); ?>" />
486 <!-- <input type="button" class="viewCCD_raw" value="<?php echo xla('Raw Report'); ?>" /> -->
487 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
488 <input type="button" class="viewCCD_send_dialog" value="<?php echo xla('Transmit'); ?>" />
489 <br>
490 <div id="ccd_send_dialog" style="display:none" >
491 <br>
492 <table border="0" cellpadding="0" cellspacing="0" >
493 <tr>
494 <td>
495 <span class='bold'><?php echo xlt('Enter Recipient\'s Direct Address');?>: </span>
496 <input type="text" size="64" name="ccd_send_to" id="ccd_send_to" value="">
497 <input type="button" class="viewCCD_transmit" value="<?php echo xla('Send'); ?>" />
498 <div id="ccd_send_result" style="display:none" >
499 <span class="text" id="ccd_send_message"></span>
500 </div>
501 </td>
502 </tr>
503 </table>
504 </div>
505 <?php } ?>
506 </form>
507 </div>
508 </div>
509 <br/>
511 </div>
512 </td>
513 </tr>
514 <?php } // end CCR/CCD reporting options ?>
515 <?php if ($GLOBALS['portal_onsite_document_download']) { ?>
516 <?php echo "<tr><td width='650px'>";
517 $widgetTitle = xl('Documents');
518 $widgetLabel = "documents";
519 $widgetButtonLabel = xl('Download');
520 $widgetButtonClass = "hidden";
521 $linkMethod = "html";
522 $bodyClass = "notab";
523 $widgetAuth = false;
524 $fixedWidth = true;
525 expand_collapse_widget(
526 $widgetTitle,
527 $widgetLabel,
528 $widgetButtonLabel,
529 $widgetButtonLink,
530 $widgetButtonClass,
531 $linkMethod,
532 $bodyClass,
533 $widgetAuth,
534 $fixedWidth
537 <span class="text"><?php echo xlt('Download all patient documents');?></span>
538 <br /><br />
539 <form name='doc_form' id='doc_form' action='get_patient_documents.php' method='post'>
540 <input type="button" class="generateDoc_download" value="<?php echo xla('Download'); ?>" />
541 </form>
542 </div>
543 </td>
544 </tr>
545 <?php } ?>
546 <?php echo "<tr><td width='650px'>";
547 // Lab tests results expand collapse widget
548 $widgetTitle = xl("Lab Test Results");
549 $widgetLabel = "labtestresults";
550 $widgetButtonLabel = xl("");
551 $widgetButtonClass = "hidden";
552 $linkMethod = "html";
553 $bodyClass = "notab";
554 $widgetAuth = false;
555 $fixedWidth = true;
556 expand_collapse_widget(
557 $widgetTitle,
558 $widgetLabel,
559 $widgetButtonLabel,
560 $widgetButtonLink,
561 $widgetButtonClass,
562 $linkMethod,
563 $bodyClass,
564 $widgetAuth,
565 $fixedWidth
569 <br/>
570 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
571 </div>
573 </td>
574 </tr>
575 <?php echo "<tr><td width='650px'>";
576 // problem list collapse widget
577 $widgetTitle = xl("Problem List");
578 $widgetLabel = "problemlist";
579 $widgetButtonLabel = xl("");
580 $widgetButtonClass = "hidden";
581 $linkMethod = "html";
582 $bodyClass = "notab";
583 $widgetAuth = false;
584 $fixedWidth = true;
585 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel, $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth); ?>
587 </div>
590 </td>
591 </tr>
593 <tr>
594 <td width='650px'>
595 <?php
596 // medication list expand collapse widget
597 $widgetTitle = xl("Medication List");
598 $widgetLabel = "medicationlist";
599 $widgetButtonLabel = xl("");
600 $widgetButtonClass = "hidden";
601 $linkMethod = "html";
602 $bodyClass = "notab";
603 $widgetAuth = false;
604 $fixedWidth = true;
605 expand_collapse_widget(
606 $widgetTitle,
607 $widgetLabel,
608 $widgetButtonLabel,
609 $widgetButtonLink,
610 $widgetButtonClass,
611 $linkMethod,
612 $bodyClass,
613 $widgetAuth,
614 $fixedWidth
617 <br/>
618 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
619 </div>
621 </td>
622 </tr>
624 <tr>
625 <td width='650px'>
626 <?php // medication allergy expand collapse widget
627 $widgetTitle = xl("Medication Allergy List");
628 $widgetLabel = "medicationallergylist";
629 $widgetButtonLabel = xl("");
630 $widgetButtonClass = "";
631 $linkMethod = "html";
632 $bodyClass = "notab";
633 $widgetAuth = false;
634 $fixedWidth = true;
635 expand_collapse_widget(
636 $widgetTitle,
637 $widgetLabel,
638 $widgetButtonLabel,
639 $widgetButtonLink,
640 $widgetButtonClass,
641 $linkMethod,
642 $bodyClass,
643 $widgetAuth,
644 $fixedWidth
647 <br/>
648 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
649 </div>
651 </td>
652 </tr>
654 <!-- Amendments -->
655 <?php if ($GLOBALS['amendments']) { ?>
656 <tr>
657 <td width='650px'>
658 <?php
659 $widgetTitle = xl("Amendments");
660 $widgetLabel = "amendments";
661 $widgetButtonLabel = xl("");
662 $widgetButtonClass = "hidden";
663 $linkMethod = "html";
664 $bodyClass = "notab";
665 $widgetAuth = false;
666 $fixedWidth = true;
667 expand_collapse_widget(
668 $widgetTitle,
669 $widgetLabel,
670 $widgetButtonLabel,
671 $widgetButtonLink,
672 $widgetButtonClass,
673 $linkMethod,
674 $bodyClass,
675 $widgetAuth,
676 $fixedWidth
680 <br/>
681 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
682 </td>
683 </tr>
684 <?php } ?>
685 <tr>
686 <td width='650px'>
687 <?php
688 // Show current and upcoming appointments.
689 $query = "SELECT e.pc_eid, e.pc_aid, e.pc_title, e.pc_eventDate, " .
690 "e.pc_startTime, e.pc_hometext, u.fname, u.lname, u.mname, " .
691 "c.pc_catname " .
692 "FROM openemr_postcalendar_events AS e, users AS u, " .
693 "openemr_postcalendar_categories AS c WHERE " .
694 "e.pc_pid = ? AND e.pc_eventDate >= CURRENT_DATE AND " .
695 "u.id = e.pc_aid AND e.pc_catid = c.pc_catid " .
696 "ORDER BY e.pc_eventDate, e.pc_startTime";
697 //echo $query;
698 $res = sqlStatement($query, array($pid));
700 // appointments expand collapse widget
701 $widgetTitle = xl("Appointments");
702 $widgetLabel = "appointments";
703 $widgetButtonLabel = xl("Add");
704 $widgetButtonLink = "add_edit_event_user.php?pid=".htmlspecialchars($pid, ENT_QUOTES);
705 $widgetButtonClass = "edit_event iframe";
706 $linkMethod = "";
707 $bodyClass = "summary_item small";
708 if ($GLOBALS['portal_onsite_appt_modify']) {
709 $widgetAuth = true;
710 } else {
711 $widgetAuth = false;
714 $fixedWidth = false;
715 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel, $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth);
716 $count = 0;
718 <div id='stats_div' style="display:none">
719 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div>
720 </div>
721 </td>
722 </tr>
723 </table>
725 </div>
727 </td>
729 </tr>
731 </table>
733 </div> <!-- end main content div -->
735 <div id="portal-buttons-bottom"> <!-- buttons bottom div -->
736 <input type="button" style="text-align: right;" value="<?php echo xla('Log Out'); ?>" onclick="window.location = 'logout.php'"/>
738 <input type="button" style="text-align: right;" value="<?php echo xla('Change Password'); ?>" onclick="window.location = '<?php echo $landingpage."&password_update=1";?>'"/>
739 </div><!-- end buttons bottom div -->
741 </div>
742 </body>
743 </html>