incorporated bootstrap into several layouts (#981)
[openemr.git] / patients / summary_pat_portal.php
blob20f4d512e0efaa25811fa9909c5804cd88d0f7a1
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'];
29 } else {
30 session_destroy();
31 header('Location: '.$landingpage.'&w');
32 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/edi.inc");
46 include_once("$srcdir/lists.inc");
49 <html>
50 <head>
51 <title><?php echo xlt('Patient Information'); ?></title>
52 <?php html_header_show(); ?>
53 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
54 <link rel="stylesheet" type="text/css" href="<?php echo $web_root; ?>/library/js/fancybox/jquery.fancybox-1.2.6.css" media="screen" />
55 <link rel="stylesheet" type="text/css" href="<?php echo $web_root; ?>/library/dynarch_calendar.css">
56 <script type="text/javascript" src="<?php echo $web_root; ?>/library/textformat.js"></script>
57 <script type="text/javascript" src="<?php echo $web_root; ?>/library/dynarch_calendar.js"></script>
58 <?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
59 <script type="text/javascript" src="<?php echo $web_root; ?>/library/dynarch_calendar_setup.js"></script>
60 <script type="text/javascript" src="<?php echo $web_root; ?>/library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
61 <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-3-2/index.js"></script>
62 <script type="text/javascript" src="<?php echo $web_root; ?>/library/js/common.js"></script>
63 <script type="text/javascript" src="<?php echo $web_root; ?>/library/js/fancybox/jquery.fancybox-1.2.6.js"></script>
64 <link rel="stylesheet" href="css/base.css" type="text/css"/>
65 <link rel="stylesheet" href="css/tables.css" type="text/css"/>
66 <script type="text/javascript" language="JavaScript">
68 function refreshme() {
69 location.reload();
72 function toggleIndicator(target,div) {
74 $mode = $(target).find(".indicator").text();
75 if ( $mode == "<?php echo xla('collapse'); ?>" ) {
76 $(target).find(".indicator").text( "<?php echo xla('expand'); ?>" );
77 $("#"+div).hide();
78 } else {
79 $(target).find(".indicator").text( "<?php echo xla('collapse'); ?>" );
80 $("#"+div).show();
84 function refreshAppointments() {
85 $("#appointments_ps_expand").load("get_appointments.php", { 'embeddedScreen' : true }, function() {
86 $(".edit_event").fancybox({
87 'overlayOpacity' : 0.0,
88 'showCloseButton' : true,
89 'centerOnScroll' : false,
90 'autoscale' : true,
91 'hihdeOnContentClick' : false,
92 'callbackOnClose' : function() {
93 refreshAppointments();
95 });
96 });
99 function show_date_fun(){
100 if(document.getElementById('show_date').checked == true){
101 document.getElementById('date_div').style.display = '';
102 }else{
103 document.getElementById('date_div').style.display = 'none';
105 return;
108 $(document).ready(function(){
110 // load divs
111 $("#labtestresults_ps_expand").load("get_lab_results.php", { 'embeddedScreen' : true }, function() {
112 // (note need to place javascript code here also to get the dynamic link to work)
113 $(".medium_modal").fancybox( {
114 'overlayOpacity' : 0.0,
115 'showCloseButton' : true,
116 'frameHeight' : 500,
117 'frameWidth' : 800,
118 'centerOnScroll' : false,
119 'callbackOnClose' : function() {
120 refreshme();
124 $("#problemlist_ps_expand").load("get_problems.php", { 'embeddedScreen' : true }, function() {
125 // (note need to place javascript code here also to get the dynamic link to work)
126 $(".medium_modal").fancybox( {
127 'overlayOpacity' : 0.0,
128 'showCloseButton' : true,
129 'frameHeight' : 500,
130 'frameWidth' : 800,
131 'centerOnScroll' : false,
132 'callbackOnClose' : function() {
133 refreshme();
137 $("#medicationlist_ps_expand").load("get_medications.php", { 'embeddedScreen' : true }, function() {
138 // (note need to place javascript code here also to get the dynamic link to work)
139 $(".medium_modal").fancybox( {
140 'overlayOpacity' : 0.0,
141 'showCloseButton' : true,
142 'frameHeight' : 500,
143 'frameWidth' : 800,
144 'centerOnScroll' : false,
145 'callbackOnClose' : function() {
146 refreshme();
150 $("#medicationallergylist_ps_expand").load("get_allergies.php", { 'embeddedScreen' : true }, function() {
151 // (note need to place javascript code here also to get the dynamic link to work)
152 $(".medium_modal").fancybox( {
153 'overlayOpacity' : 0.0,
154 'showCloseButton' : true,
155 'frameHeight' : 500,
156 'frameWidth' : 800,
157 'centerOnScroll' : false,
158 'callbackOnClose' : function() {
159 refreshme();
163 $("#amendments_ps_expand").load("get_amendments.php", { 'embeddedScreen' : true }, function() {
164 // (note need to place javascript code here also to get the dynamic link to work)
165 $(".medium_modal").fancybox( {
166 'overlayOpacity' : 0.0,
167 'showCloseButton' : true,
168 'frameHeight' : 500,
169 'frameWidth' : 800,
170 'centerOnScroll' : false,
171 'callbackOnClose' : function() {
172 refreshme();
178 refreshAppointments();
180 // fancy box
181 enable_modals();
183 // modal for dialog boxes
184 $(".large_modal").fancybox( {
185 'overlayOpacity' : 0.0,
186 'showCloseButton' : true,
187 'frameHeight' : 600,
188 'frameWidth' : 1000,
189 'centerOnScroll' : false
192 // modal for image viewer
193 $(".image_modal").fancybox( {
194 'overlayOpacity' : 0.0,
195 'showCloseButton' : true,
196 'centerOnScroll' : false,
197 'autoscale' : true
200 $(".add_event").fancybox( {
201 'overlayOpacity' : 0.0,
202 'showCloseButton' : true,
203 'centerOnScroll' : false,
204 'autoscale' : true,
205 'hideOnContentClick' : false,
206 'onClose' : function() {
207 refreshme();
211 $(".generateCCR").click(
212 function() {
213 if(document.getElementById('show_date').checked == true){
214 if(document.getElementById('Start').value == '' || document.getElementById('End').value == ''){
215 alert('<?php echo xls('Please select a start date and end date') ?>');
216 return false;
219 var ccrAction = document.getElementsByName('ccrAction');
220 ccrAction[0].value = 'generate';
221 var raw = document.getElementsByName('raw');
222 raw[0].value = 'no';
223 ccr_form.setAttribute("target", "_blank");
224 $("#ccr_form").submit();
225 ccr_form.setAttribute("target", "");
227 $(".generateCCR_raw").click(
228 function() {
229 var ccrAction = document.getElementsByName('ccrAction');
230 ccrAction[0].value = 'generate';
231 var raw = document.getElementsByName('raw');
232 raw[0].value = 'yes';
233 ccr_form.setAttribute("target", "_blank");
234 $("#ccr_form").submit();
235 ccr_form.setAttribute("target", "");
237 $(".generateCCR_download_h").click(
238 function() {
239 var ccrAction = document.getElementsByName('ccrAction');
240 ccrAction[0].value = 'generate';
241 var raw = document.getElementsByName('raw');
242 raw[0].value = 'hybrid';
243 $("#ccr_form").submit();
245 $(".generateCCR_download_p").click(
246 function() {
247 if(document.getElementById('show_date').checked == true){
248 if(document.getElementById('Start').value == '' || document.getElementById('End').value == ''){
249 alert('<?php echo xls('Please select a start date and end date') ?>');
250 return false;
253 var ccrAction = document.getElementsByName('ccrAction');
254 ccrAction[0].value = 'generate';
255 var raw = document.getElementsByName('raw');
256 raw[0].value = 'pure';
257 $("#ccr_form").submit();
259 $(".viewCCD").click(
260 function() {
261 var ccrAction = document.getElementsByName('ccrAction');
262 ccrAction[0].value = 'viewccd';
263 var raw = document.getElementsByName('raw');
264 raw[0].value = 'no';
265 ccr_form.setAttribute("target", "_blank");
266 $("#ccr_form").submit();
267 ccr_form.setAttribute("target", "");
269 $(".viewCCD_raw").click(
270 function() {
271 var ccrAction = document.getElementsByName('ccrAction');
272 ccrAction[0].value = 'viewccd';
273 var raw = document.getElementsByName('raw');
274 raw[0].value = 'yes';
275 ccr_form.setAttribute("target", "_blank");
276 $("#ccr_form").submit();
277 ccr_form.setAttribute("target", "");
279 $(".viewCCD_download").click(
280 function() {
281 var ccrAction = document.getElementsByName('ccrAction');
282 ccrAction[0].value = 'viewccd';
283 var raw = document.getElementsByName('raw');
284 raw[0].value = 'pure';
285 $("#ccr_form").submit();
287 $(".generateDoc_download").click(
288 function() {
289 $("#doc_form").submit();
291 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
292 $(".viewCCR_send_dialog").click(
293 function() {
294 $("#ccr_send_dialog").toggle();
296 $(".viewCCR_transmit").click(
297 function() {
298 $(".viewCCR_transmit").attr('disabled','disabled');
299 var ccrAction = document.getElementsByName('ccrAction');
300 ccrAction[0].value = 'generate';
301 var ccrRecipient = $("#ccr_send_to").val();
302 var raw = document.getElementsByName('raw');
303 raw[0].value = 'send '+ccrRecipient;
304 if(ccrRecipient=="") {
305 $("#ccr_send_message").html("<?php
306 echo xla('Please enter a valid Direct Address above.');?>");
307 $("#ccr_send_result").show();
308 } else {
309 $(".viewCCR_transmit").attr('disabled','disabled');
310 $("#ccr_send_message").html("<?php
311 echo xla('Working... this may take a minute.');?>");
312 $("#ccr_send_result").show();
313 var action=$("#ccr_form").attr('action');
314 $.post(action, {ccrAction:'generate',raw:'send '+ccrRecipient,requested_by:'patient'},
315 function(data) {
316 if(data=="SUCCESS") {
317 $("#ccr_send_message").html("<?php
318 echo xla('Your message was submitted for delivery to');
319 ?> "+ccrRecipient);
320 $("#ccr_send_to").val("");
321 } else {
322 $("#ccr_send_message").html(data);
324 $(".viewCCR_transmit").removeAttr('disabled');
328 <?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(
406 $widgetTitle,
407 $widgetLabel,
408 $widgetButtonLabel,
409 $widgetButtonLink,
410 $widgetButtonClass,
411 $linkMethod,
412 $bodyClass,
413 $widgetAuth,
414 $fixedWidth
417 <br/>
418 <div style='margin-left:3em; margin-right:3em; padding:1em; border:1px solid blue;' class='text'>
419 <div id="ccr_report">
420 <form name='ccr_form' id='ccr_form' method='post' action='../ccr/createCCR.php?portal_auth=1'>
421 <span class='text'><b><?php echo xlt('Continuity of Care Record (CCR)'); ?></b></span>&nbsp;&nbsp;
422 <br/>
423 <span class='text'>(<?php echo xlt('Pop ups need to be enabled to see these reports'); ?>)</span>
424 <br/>
425 <br/>
426 <input type='hidden' name='ccrAction'>
427 <input type='hidden' name='raw'>
428 <input type="checkbox" name="show_date" id="show_date" onchange="show_date_fun();" ><span class='text'><?php echo xlt('Use Date Range'); ?>
429 <br>
430 <div id="date_div" style="display:none" >
431 <br>
432 <table border="0" cellpadding="0" cellspacing="0" >
433 <tr>
434 <td>
435 <span class='bold'><?php echo xlt('Start Date');?>: </span>
436 </td>
437 <td>
438 <input type='text' size='10' name='Start' id='Start'
439 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
440 title='<?php echo xla('yyyy-mm-dd'); ?>' />
441 <img src='../interface/pic/show_calendar.gif' align='absbottom' width='24' height='22'
442 id='img_start' border='0' alt='[?]' style='cursor:pointer'
443 title='<?php echo xla('Click here to choose a date'); ?>' >
444 <script LANGUAGE="JavaScript">
445 Calendar.setup({inputField:"Start", ifFormat:"%Y-%m-%d", button:"img_start"});
446 </script>
447 </td>
448 <td>
449 &nbsp;
450 <span class='bold'><?php echo xlt('End Date');?>: </span>
451 </td>
452 <td>
453 <input type='text' size='10' name='End' id='End'
454 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
455 title='<?php echo xla('yyyy-mm-dd'); ?>' />
456 <img src='../interface/pic/show_calendar.gif' align='absbottom' width='24' height='22'
457 id='img_end' border='0' alt='[?]' style='cursor:pointer'
458 title='<?php echo xla('Click here to choose a date'); ?>' >
459 <script LANGUAGE="JavaScript">
460 Calendar.setup({inputField:"End", ifFormat:"%Y-%m-%d", button:"img_end"});
461 </script>
462 </td>
463 </tr>
464 </table>
465 </div>
466 <br>
467 <input type="button" class="generateCCR" value="<?php echo xla('View/Print'); ?>" />
468 <!-- <input type="button" class="generateCCR_download_h" value="<?php echo xla('Download'); ?>" /> -->
469 <input type="button" class="generateCCR_download_p" value="<?php echo xla('Download'); ?>" />
470 <!-- <input type="button" class="generateCCR_raw" value="<?php echo xla('Raw Report'); ?>" /> -->
471 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
472 <input type="button" class="viewCCR_send_dialog" value="<?php echo xla('Transmit'); ?>" />
473 <br>
474 <div id="ccr_send_dialog" style="display:none" >
475 <br>
476 <table border="0" cellpadding="0" cellspacing="0" >
477 <tr>
478 <td>
479 <span class='bold'><?php echo xlt('Enter Recipient\'s Direct Address');?>: </span>
480 <input type="text" size="64" name="ccr_send_to" id="ccr_send_to" value="">
481 <input type="button" class="viewCCR_transmit" value="<?php echo xla('Send'); ?>" />
482 <div id="ccr_send_result" style="display:none" >
483 <span class="text" id="ccr_send_message"></span>
484 </div>
485 </td>
486 </tr>
487 </table>
488 </div>
489 <?php } ?>
490 <hr/>
491 <span class='text'><b><?php echo xlt('Continuity of Care Document (CCD)'); ?></b></span>&nbsp;&nbsp;
492 <br/>
493 <span class='text'>(<?php echo xlt('Pop ups need to be enabled to see these reports'); ?>)</span>
494 <br/>
495 <br/>
496 <input type="button" class="viewCCD" value="<?php echo xla('View/Print'); ?>" />
497 <input type="button" class="viewCCD_download" value="<?php echo xla('Download'); ?>" />
498 <!-- <input type="button" class="viewCCD_raw" value="<?php echo xla('Raw Report'); ?>" /> -->
499 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
500 <input type="button" class="viewCCD_send_dialog" value="<?php echo xla('Transmit'); ?>" />
501 <br>
502 <div id="ccd_send_dialog" style="display:none" >
503 <br>
504 <table border="0" cellpadding="0" cellspacing="0" >
505 <tr>
506 <td>
507 <span class='bold'><?php echo xlt('Enter Recipient\'s Direct Address');?>: </span>
508 <input type="text" size="64" name="ccd_send_to" id="ccd_send_to" value="">
509 <input type="button" class="viewCCD_transmit" value="<?php echo xla('Send'); ?>" />
510 <div id="ccd_send_result" style="display:none" >
511 <span class="text" id="ccd_send_message"></span>
512 </div>
513 </td>
514 </tr>
515 </table>
516 </div>
517 <?php } ?>
518 </form>
519 </div>
520 </div>
521 <br/>
523 </div>
524 </td>
525 </tr>
526 <?php } // end CCR/CCD reporting options ?>
527 <?php if ($GLOBALS['portal_onsite_document_download']) { ?>
528 <?php echo "<tr><td width='650px'>";
529 $widgetTitle = xl('Documents');
530 $widgetLabel = "documents";
531 $widgetButtonLabel = xl('Download');
532 $widgetButtonClass = "hidden";
533 $linkMethod = "html";
534 $bodyClass = "notab";
535 $widgetAuth = false;
536 $fixedWidth = true;
537 expand_collapse_widget(
538 $widgetTitle,
539 $widgetLabel,
540 $widgetButtonLabel,
541 $widgetButtonLink,
542 $widgetButtonClass,
543 $linkMethod,
544 $bodyClass,
545 $widgetAuth,
546 $fixedWidth
549 <span class="text"><?php echo xlt('Download all patient documents');?></span>
550 <br /><br />
551 <form name='doc_form' id='doc_form' action='get_patient_documents.php' method='post'>
552 <input type="button" class="generateDoc_download" value="<?php echo xla('Download'); ?>" />
553 </form>
554 </div>
555 </td>
556 </tr>
557 <?php } ?>
558 <?php echo "<tr><td width='650px'>";
559 // Lab tests results expand collapse widget
560 $widgetTitle = xl("Lab Test Results");
561 $widgetLabel = "labtestresults";
562 $widgetButtonLabel = xl("");
563 $widgetButtonClass = "hidden";
564 $linkMethod = "html";
565 $bodyClass = "notab";
566 $widgetAuth = false;
567 $fixedWidth = true;
568 expand_collapse_widget(
569 $widgetTitle,
570 $widgetLabel,
571 $widgetButtonLabel,
572 $widgetButtonLink,
573 $widgetButtonClass,
574 $linkMethod,
575 $bodyClass,
576 $widgetAuth,
577 $fixedWidth
581 <br/>
582 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
583 </div>
585 </td>
586 </tr>
587 <?php echo "<tr><td width='650px'>";
588 // problem list collapse widget
589 $widgetTitle = xl("Problem List");
590 $widgetLabel = "problemlist";
591 $widgetButtonLabel = xl("");
592 $widgetButtonClass = "hidden";
593 $linkMethod = "html";
594 $bodyClass = "notab";
595 $widgetAuth = false;
596 $fixedWidth = true;
597 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel, $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth); ?>
599 </div>
602 </td>
603 </tr>
605 <tr>
606 <td width='650px'>
607 <?php
608 // medication list expand collapse widget
609 $widgetTitle = xl("Medication List");
610 $widgetLabel = "medicationlist";
611 $widgetButtonLabel = xl("");
612 $widgetButtonClass = "hidden";
613 $linkMethod = "html";
614 $bodyClass = "notab";
615 $widgetAuth = false;
616 $fixedWidth = true;
617 expand_collapse_widget(
618 $widgetTitle,
619 $widgetLabel,
620 $widgetButtonLabel,
621 $widgetButtonLink,
622 $widgetButtonClass,
623 $linkMethod,
624 $bodyClass,
625 $widgetAuth,
626 $fixedWidth
629 <br/>
630 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
631 </div>
633 </td>
634 </tr>
636 <tr>
637 <td width='650px'>
638 <?php // medication allergy expand collapse widget
639 $widgetTitle = xl("Medication Allergy List");
640 $widgetLabel = "medicationallergylist";
641 $widgetButtonLabel = xl("");
642 $widgetButtonClass = "";
643 $linkMethod = "html";
644 $bodyClass = "notab";
645 $widgetAuth = false;
646 $fixedWidth = true;
647 expand_collapse_widget(
648 $widgetTitle,
649 $widgetLabel,
650 $widgetButtonLabel,
651 $widgetButtonLink,
652 $widgetButtonClass,
653 $linkMethod,
654 $bodyClass,
655 $widgetAuth,
656 $fixedWidth
659 <br/>
660 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
661 </div>
663 </td>
664 </tr>
666 <!-- Amendments -->
667 <?php if ($GLOBALS['amendments']) { ?>
668 <tr>
669 <td width='650px'>
670 <?php
671 $widgetTitle = xl("Amendments");
672 $widgetLabel = "amendments";
673 $widgetButtonLabel = xl("");
674 $widgetButtonClass = "hidden";
675 $linkMethod = "html";
676 $bodyClass = "notab";
677 $widgetAuth = false;
678 $fixedWidth = true;
679 expand_collapse_widget(
680 $widgetTitle,
681 $widgetLabel,
682 $widgetButtonLabel,
683 $widgetButtonLink,
684 $widgetButtonClass,
685 $linkMethod,
686 $bodyClass,
687 $widgetAuth,
688 $fixedWidth
692 <br/>
693 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
694 </td>
695 </tr>
696 <?php } ?>
697 <tr>
698 <td width='650px'>
699 <?php
700 // Show current and upcoming appointments.
701 $query = "SELECT e.pc_eid, e.pc_aid, e.pc_title, e.pc_eventDate, " .
702 "e.pc_startTime, e.pc_hometext, u.fname, u.lname, u.mname, " .
703 "c.pc_catname " .
704 "FROM openemr_postcalendar_events AS e, users AS u, " .
705 "openemr_postcalendar_categories AS c WHERE " .
706 "e.pc_pid = ? AND e.pc_eventDate >= CURRENT_DATE AND " .
707 "u.id = e.pc_aid AND e.pc_catid = c.pc_catid " .
708 "ORDER BY e.pc_eventDate, e.pc_startTime";
709 //echo $query;
710 $res = sqlStatement($query, array($pid));
712 // appointments expand collapse widget
713 $widgetTitle = xl("Appointments");
714 $widgetLabel = "appointments";
715 $widgetButtonLabel = xl("Add");
716 $widgetButtonLink = "add_edit_event_user.php?pid=".htmlspecialchars($pid, ENT_QUOTES);
717 $widgetButtonClass = "edit_event iframe";
718 $linkMethod = "";
719 $bodyClass = "summary_item small";
720 if ($GLOBALS['portal_onsite_appt_modify']) {
721 $widgetAuth = true;
722 } else {
723 $widgetAuth = false;
726 $fixedWidth = false;
727 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel, $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth);
728 $count = 0;
730 <div id='stats_div' style="display:none">
731 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div>
732 </div>
733 </td>
734 </tr>
735 </table>
737 </div>
739 </td>
741 </tr>
743 </table>
745 </div> <!-- end main content div -->
747 <div id="portal-buttons-bottom"> <!-- buttons bottom div -->
748 <input type="button" style="text-align: right;" value="<?php echo xla('Log Out'); ?>" onclick="window.location = 'logout.php'"/>
750 <input type="button" style="text-align: right;" value="<?php echo xla('Change Password'); ?>" onclick="window.location = '<?php echo $landingpage."&password_update=1";?>'"/>
751 </div><!-- end buttons bottom div -->
753 </div>
754 </body>
755 </html>