migrated knockout asset to bower
[openemr.git] / patients / summary_pat_portal.php
blob415f0b42a3c59dec650532459132a63af76dcc54
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/classes/Address.class.php");
44 require_once("$srcdir/classes/InsuranceCompany.class.php");
45 require_once("$srcdir/classes/Document.class.php");
46 require_once("$srcdir/options.inc.php");
47 require_once("../interface/patient_file/history/history.inc.php");
48 require_once("$srcdir/formatting.inc.php");
49 require_once("$srcdir/edi.inc");
50 include_once("$srcdir/lists.inc");
53 <html>
54 <head>
55 <title><?php echo xlt('Patient Information'); ?></title>
56 <?php html_header_show(); ?>
57 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
58 <link rel="stylesheet" type="text/css" href="<?php echo $web_root; ?>/library/js/fancybox/jquery.fancybox-1.2.6.css" media="screen" />
59 <link rel="stylesheet" type="text/css" href="<?php echo $web_root; ?>/library/dynarch_calendar.css">
60 <script type="text/javascript" src="<?php echo $web_root; ?>/library/textformat.js"></script>
61 <script type="text/javascript" src="<?php echo $web_root; ?>/library/dynarch_calendar.js"></script>
62 <?php include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?>
63 <script type="text/javascript" src="<?php echo $web_root; ?>/library/dynarch_calendar_setup.js"></script>
64 <script type="text/javascript" src="<?php echo $web_root; ?>/library/dialog.js"></script>
65 <script type="text/javascript" src="<?php echo $web_root; ?>/library/js/jquery.1.3.2.js"></script>
66 <script type="text/javascript" src="<?php echo $web_root; ?>/library/js/common.js"></script>
67 <script type="text/javascript" src="<?php echo $web_root; ?>/library/js/fancybox/jquery.fancybox-1.2.6.js"></script>
68 <link rel="stylesheet" href="css/base.css" type="text/css"/>
69 <link rel="stylesheet" href="css/tables.css" type="text/css"/>
70 <script type="text/javascript" language="JavaScript">
72 function refreshme() {
73 location.reload();
76 function toggleIndicator(target,div) {
78 $mode = $(target).find(".indicator").text();
79 if ( $mode == "<?php echo xla('collapse'); ?>" ) {
80 $(target).find(".indicator").text( "<?php echo xla('expand'); ?>" );
81 $("#"+div).hide();
82 } else {
83 $(target).find(".indicator").text( "<?php echo xla('collapse'); ?>" );
84 $("#"+div).show();
88 function refreshAppointments() {
89 $("#appointments_ps_expand").load("get_appointments.php", { 'embeddedScreen' : true }, function() {
90 $(".edit_event").fancybox({
91 'overlayOpacity' : 0.0,
92 'showCloseButton' : true,
93 'centerOnScroll' : false,
94 'autoscale' : true,
95 'hihdeOnContentClick' : false,
96 'callbackOnClose' : function() {
97 refreshAppointments();
99 });
103 function show_date_fun(){
104 if(document.getElementById('show_date').checked == true){
105 document.getElementById('date_div').style.display = '';
106 }else{
107 document.getElementById('date_div').style.display = 'none';
109 return;
112 $(document).ready(function(){
114 // load divs
115 $("#labtestresults_ps_expand").load("get_lab_results.php", { 'embeddedScreen' : true }, function() {
116 // (note need to place javascript code here also to get the dynamic link to work)
117 $(".medium_modal").fancybox( {
118 'overlayOpacity' : 0.0,
119 'showCloseButton' : true,
120 'frameHeight' : 500,
121 'frameWidth' : 800,
122 'centerOnScroll' : false,
123 'callbackOnClose' : function() {
124 refreshme();
128 $("#problemlist_ps_expand").load("get_problems.php", { 'embeddedScreen' : true }, function() {
129 // (note need to place javascript code here also to get the dynamic link to work)
130 $(".medium_modal").fancybox( {
131 'overlayOpacity' : 0.0,
132 'showCloseButton' : true,
133 'frameHeight' : 500,
134 'frameWidth' : 800,
135 'centerOnScroll' : false,
136 'callbackOnClose' : function() {
137 refreshme();
141 $("#medicationlist_ps_expand").load("get_medications.php", { 'embeddedScreen' : true }, function() {
142 // (note need to place javascript code here also to get the dynamic link to work)
143 $(".medium_modal").fancybox( {
144 'overlayOpacity' : 0.0,
145 'showCloseButton' : true,
146 'frameHeight' : 500,
147 'frameWidth' : 800,
148 'centerOnScroll' : false,
149 'callbackOnClose' : function() {
150 refreshme();
154 $("#medicationallergylist_ps_expand").load("get_allergies.php", { 'embeddedScreen' : true }, function() {
155 // (note need to place javascript code here also to get the dynamic link to work)
156 $(".medium_modal").fancybox( {
157 'overlayOpacity' : 0.0,
158 'showCloseButton' : true,
159 'frameHeight' : 500,
160 'frameWidth' : 800,
161 'centerOnScroll' : false,
162 'callbackOnClose' : function() {
163 refreshme();
167 $("#amendments_ps_expand").load("get_amendments.php", { 'embeddedScreen' : true }, function() {
168 // (note need to place javascript code here also to get the dynamic link to work)
169 $(".medium_modal").fancybox( {
170 'overlayOpacity' : 0.0,
171 'showCloseButton' : true,
172 'frameHeight' : 500,
173 'frameWidth' : 800,
174 'centerOnScroll' : false,
175 'callbackOnClose' : function() {
176 refreshme();
182 refreshAppointments();
184 // fancy box
185 enable_modals();
187 // modal for dialog boxes
188 $(".large_modal").fancybox( {
189 'overlayOpacity' : 0.0,
190 'showCloseButton' : true,
191 'frameHeight' : 600,
192 'frameWidth' : 1000,
193 'centerOnScroll' : false
196 // modal for image viewer
197 $(".image_modal").fancybox( {
198 'overlayOpacity' : 0.0,
199 'showCloseButton' : true,
200 'centerOnScroll' : false,
201 'autoscale' : true
204 $(".add_event").fancybox( {
205 'overlayOpacity' : 0.0,
206 'showCloseButton' : true,
207 'centerOnScroll' : false,
208 'autoscale' : true,
209 'hideOnContentClick' : false,
210 'onClose' : function() {
211 refreshme();
215 $(".generateCCR").click(
216 function() {
217 if(document.getElementById('show_date').checked == true){
218 if(document.getElementById('Start').value == '' || document.getElementById('End').value == ''){
219 alert('<?php echo xls('Please select a start date and end date') ?>');
220 return false;
223 var ccrAction = document.getElementsByName('ccrAction');
224 ccrAction[0].value = 'generate';
225 var raw = document.getElementsByName('raw');
226 raw[0].value = 'no';
227 ccr_form.setAttribute("target", "_blank");
228 $("#ccr_form").submit();
229 ccr_form.setAttribute("target", "");
231 $(".generateCCR_raw").click(
232 function() {
233 var ccrAction = document.getElementsByName('ccrAction');
234 ccrAction[0].value = 'generate';
235 var raw = document.getElementsByName('raw');
236 raw[0].value = 'yes';
237 ccr_form.setAttribute("target", "_blank");
238 $("#ccr_form").submit();
239 ccr_form.setAttribute("target", "");
241 $(".generateCCR_download_h").click(
242 function() {
243 var ccrAction = document.getElementsByName('ccrAction');
244 ccrAction[0].value = 'generate';
245 var raw = document.getElementsByName('raw');
246 raw[0].value = 'hybrid';
247 $("#ccr_form").submit();
249 $(".generateCCR_download_p").click(
250 function() {
251 if(document.getElementById('show_date').checked == true){
252 if(document.getElementById('Start').value == '' || document.getElementById('End').value == ''){
253 alert('<?php echo xls('Please select a start date and end date') ?>');
254 return false;
257 var ccrAction = document.getElementsByName('ccrAction');
258 ccrAction[0].value = 'generate';
259 var raw = document.getElementsByName('raw');
260 raw[0].value = 'pure';
261 $("#ccr_form").submit();
263 $(".viewCCD").click(
264 function() {
265 var ccrAction = document.getElementsByName('ccrAction');
266 ccrAction[0].value = 'viewccd';
267 var raw = document.getElementsByName('raw');
268 raw[0].value = 'no';
269 ccr_form.setAttribute("target", "_blank");
270 $("#ccr_form").submit();
271 ccr_form.setAttribute("target", "");
273 $(".viewCCD_raw").click(
274 function() {
275 var ccrAction = document.getElementsByName('ccrAction');
276 ccrAction[0].value = 'viewccd';
277 var raw = document.getElementsByName('raw');
278 raw[0].value = 'yes';
279 ccr_form.setAttribute("target", "_blank");
280 $("#ccr_form").submit();
281 ccr_form.setAttribute("target", "");
283 $(".viewCCD_download").click(
284 function() {
285 var ccrAction = document.getElementsByName('ccrAction');
286 ccrAction[0].value = 'viewccd';
287 var raw = document.getElementsByName('raw');
288 raw[0].value = 'pure';
289 $("#ccr_form").submit();
291 $(".generateDoc_download").click(
292 function() {
293 $("#doc_form").submit();
295 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
296 $(".viewCCR_send_dialog").click(
297 function() {
298 $("#ccr_send_dialog").toggle();
300 $(".viewCCR_transmit").click(
301 function() {
302 $(".viewCCR_transmit").attr('disabled','disabled');
303 var ccrAction = document.getElementsByName('ccrAction');
304 ccrAction[0].value = 'generate';
305 var ccrRecipient = $("#ccr_send_to").val();
306 var raw = document.getElementsByName('raw');
307 raw[0].value = 'send '+ccrRecipient;
308 if(ccrRecipient=="") {
309 $("#ccr_send_message").html("<?php
310 echo xla('Please enter a valid Direct Address above.');?>");
311 $("#ccr_send_result").show();
312 } else {
313 $(".viewCCR_transmit").attr('disabled','disabled');
314 $("#ccr_send_message").html("<?php
315 echo xla('Working... this may take a minute.');?>");
316 $("#ccr_send_result").show();
317 var action=$("#ccr_form").attr('action');
318 $.post(action, {ccrAction:'generate',raw:'send '+ccrRecipient,requested_by:'patient'},
319 function(data) {
320 if(data=="SUCCESS") {
321 $("#ccr_send_message").html("<?php
322 echo xla('Your message was submitted for delivery to');
323 ?> "+ccrRecipient);
324 $("#ccr_send_to").val("");
325 } else {
326 $("#ccr_send_message").html(data);
328 $(".viewCCR_transmit").removeAttr('disabled');
332 <?php }
333 if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
334 $(".viewCCD_send_dialog").click(
335 function() {
336 $("#ccd_send_dialog").toggle();
338 $(".viewCCD_transmit").click(
339 function() {
340 $(".viewCCD_transmit").attr('disabled','disabled');
341 var ccrAction = document.getElementsByName('ccrAction');
342 ccrAction[0].value = 'viewccd';
343 var ccdRecipient = $("#ccd_send_to").val();
344 var raw = document.getElementsByName('raw');
345 raw[0].value = 'send '+ccdRecipient;
346 if(ccdRecipient=="") {
347 $("#ccd_send_message").html("<?php
348 echo xla('Please enter a valid Direct Address above.');?>");
349 $("#ccd_send_result").show();
350 } else {
351 $(".viewCCD_transmit").attr('disabled','disabled');
352 $("#ccd_send_message").html("<?php
353 echo xla('Working... this may take a minute.');?>");
354 $("#ccd_send_result").show();
355 var action=$("#ccr_form").attr('action');
356 $.post(action, {ccrAction:'viewccd',raw:'send '+ccdRecipient,requested_by:'patient'},
357 function(data) {
358 if(data=="SUCCESS") {
359 $("#ccd_send_message").html("<?php
360 echo xla('Your message was submitted for delivery to');
361 ?> "+ccdRecipient);
362 $("#ccd_send_to").val("");
363 } else {
364 $("#ccd_send_message").html(data);
366 $(".viewCCD_transmit").removeAttr('disabled');
370 <?php } ?>
374 </script>
376 </head>
378 <body class="body_top">
380 <div id="wrapper" class="lefttop" style="width: 700px;">
381 <h2 class="heading"><?php echo xlt("Patient Portal"); ?></h2>
383 <?php
384 $result = getPatientData($pid);
386 <?php echo xlt('Welcome'); ?> <b><?php echo text($result['fname']." ".$result['lname']); ?></b>
388 <div style='margin-top:10px'> <!-- start main content div -->
389 <table border="0" cellspacing="0" cellpadding="0" width="100%">
390 <tr>
391 <td align="left" valign="top">
392 <!-- start left column div -->
393 <div style='float:left; margin-right:20px'>
394 <table cellspacing=0 cellpadding=0>
395 <?php if ( $GLOBALS['activate_ccr_ccd_report'] ) { // show CCR/CCD reporting options ?>
396 <tr>
397 <td width='650px'>
398 <?php
399 // Reports widget
400 $widgetTitle = xl("Reports");
401 $widgetLabel = "reports";
402 $widgetButtonLabel = xl("");
403 $widgetButtonClass = "hidden";
404 $linkMethod = "html";
405 $bodyClass = "notab";
406 $widgetAuth = false;
407 $fixedWidth = true;
408 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
409 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
410 $widgetAuth, $fixedWidth);
412 <br/>
413 <div style='margin-left:3em; margin-right:3em; padding:1em; border:1px solid blue;' class='text'>
414 <div id="ccr_report">
415 <form name='ccr_form' id='ccr_form' method='post' action='../ccr/createCCR.php?portal_auth=1'>
416 <span class='text'><b><?php echo xlt('Continuity of Care Record (CCR)'); ?></b></span>&nbsp;&nbsp;
417 <br/>
418 <span class='text'>(<?php echo xlt('Pop ups need to be enabled to see these reports'); ?>)</span>
419 <br/>
420 <br/>
421 <input type='hidden' name='ccrAction'>
422 <input type='hidden' name='raw'>
423 <input type="checkbox" name="show_date" id="show_date" onchange="show_date_fun();" ><span class='text'><?php echo xlt('Use Date Range'); ?>
424 <br>
425 <div id="date_div" style="display:none" >
426 <br>
427 <table border="0" cellpadding="0" cellspacing="0" >
428 <tr>
429 <td>
430 <span class='bold'><?php echo xlt('Start Date');?>: </span>
431 </td>
432 <td>
433 <input type='text' size='10' name='Start' id='Start'
434 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
435 title='<?php echo xla('yyyy-mm-dd'); ?>' />
436 <img src='../interface/pic/show_calendar.gif' align='absbottom' width='24' height='22'
437 id='img_start' border='0' alt='[?]' style='cursor:pointer'
438 title='<?php echo xla('Click here to choose a date'); ?>' >
439 <script LANGUAGE="JavaScript">
440 Calendar.setup({inputField:"Start", ifFormat:"%Y-%m-%d", button:"img_start"});
441 </script>
442 </td>
443 <td>
444 &nbsp;
445 <span class='bold'><?php echo xlt('End Date');?>: </span>
446 </td>
447 <td>
448 <input type='text' size='10' name='End' id='End'
449 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
450 title='<?php echo xla('yyyy-mm-dd'); ?>' />
451 <img src='../interface/pic/show_calendar.gif' align='absbottom' width='24' height='22'
452 id='img_end' border='0' alt='[?]' style='cursor:pointer'
453 title='<?php echo xla('Click here to choose a date'); ?>' >
454 <script LANGUAGE="JavaScript">
455 Calendar.setup({inputField:"End", ifFormat:"%Y-%m-%d", button:"img_end"});
456 </script>
457 </td>
458 </tr>
459 </table>
460 </div>
461 <br>
462 <input type="button" class="generateCCR" value="<?php echo xla('View/Print'); ?>" />
463 <!-- <input type="button" class="generateCCR_download_h" value="<?php echo xla('Download'); ?>" /> -->
464 <input type="button" class="generateCCR_download_p" value="<?php echo xla('Download'); ?>" />
465 <!-- <input type="button" class="generateCCR_raw" value="<?php echo xla('Raw Report'); ?>" /> -->
466 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
467 <input type="button" class="viewCCR_send_dialog" value="<?php echo xla('Transmit'); ?>" />
468 <br>
469 <div id="ccr_send_dialog" style="display:none" >
470 <br>
471 <table border="0" cellpadding="0" cellspacing="0" >
472 <tr>
473 <td>
474 <span class='bold'><?php echo xlt('Enter Recipient\'s Direct Address');?>: </span>
475 <input type="text" size="64" name="ccr_send_to" id="ccr_send_to" value="">
476 <input type="button" class="viewCCR_transmit" value="<?php echo xla('Send'); ?>" />
477 <div id="ccr_send_result" style="display:none" >
478 <span class="text" id="ccr_send_message"></span>
479 </div>
480 </td>
481 </tr>
482 </table>
483 </div>
484 <?php } ?>
485 <hr/>
486 <span class='text'><b><?php echo xlt('Continuity of Care Document (CCD)'); ?></b></span>&nbsp;&nbsp;
487 <br/>
488 <span class='text'>(<?php echo xlt('Pop ups need to be enabled to see these reports'); ?>)</span>
489 <br/>
490 <br/>
491 <input type="button" class="viewCCD" value="<?php echo xla('View/Print'); ?>" />
492 <input type="button" class="viewCCD_download" value="<?php echo xla('Download'); ?>" />
493 <!-- <input type="button" class="viewCCD_raw" value="<?php echo xla('Raw Report'); ?>" /> -->
494 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
495 <input type="button" class="viewCCD_send_dialog" value="<?php echo xla('Transmit'); ?>" />
496 <br>
497 <div id="ccd_send_dialog" style="display:none" >
498 <br>
499 <table border="0" cellpadding="0" cellspacing="0" >
500 <tr>
501 <td>
502 <span class='bold'><?php echo xlt('Enter Recipient\'s Direct Address');?>: </span>
503 <input type="text" size="64" name="ccd_send_to" id="ccd_send_to" value="">
504 <input type="button" class="viewCCD_transmit" value="<?php echo xla('Send'); ?>" />
505 <div id="ccd_send_result" style="display:none" >
506 <span class="text" id="ccd_send_message"></span>
507 </div>
508 </td>
509 </tr>
510 </table>
511 </div>
512 <?php } ?>
513 </form>
514 </div>
515 </div>
516 <br/>
518 </div>
519 </td>
520 </tr>
521 <?php } // end CCR/CCD reporting options ?>
522 <?php if ( $GLOBALS['portal_onsite_document_download'] ) { ?>
523 <?php echo "<tr><td width='650px'>";
524 $widgetTitle = xl('Documents');
525 $widgetLabel = "documents";
526 $widgetButtonLabel = xl('Download');
527 $widgetButtonClass = "hidden";
528 $linkMethod = "html";
529 $bodyClass = "notab";
530 $widgetAuth = false;
531 $fixedWidth = true;
532 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
533 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
534 $widgetAuth, $fixedWidth);
536 <span class="text"><?php echo xlt('Download all patient documents');?></span>
537 <br /><br />
538 <form name='doc_form' id='doc_form' action='get_patient_documents.php' method='post'>
539 <input type="button" class="generateDoc_download" value="<?php echo xla('Download'); ?>" />
540 </form>
541 </div>
542 </td>
543 </tr>
544 <?php } ?>
545 <?php echo "<tr><td width='650px'>";
546 // Lab tests results expand collapse widget
547 $widgetTitle = xl("Lab Test Results");
548 $widgetLabel = "labtestresults";
549 $widgetButtonLabel = xl("");
550 $widgetButtonClass = "hidden";
551 $linkMethod = "html";
552 $bodyClass = "notab";
553 $widgetAuth = false;
554 $fixedWidth = true;
555 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
556 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
557 $widgetAuth, $fixedWidth);
560 <br/>
561 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
562 </div>
564 </td>
565 </tr>
566 <?php echo "<tr><td width='650px'>";
567 // problem list collapse widget
568 $widgetTitle = xl("Problem List");
569 $widgetLabel = "problemlist";
570 $widgetButtonLabel = xl("");
571 $widgetButtonClass = "hidden";
572 $linkMethod = "html";
573 $bodyClass = "notab";
574 $widgetAuth = false;
575 $fixedWidth = true;
576 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel , $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth); ?>
578 </div>
581 </td>
582 </tr>
584 <tr>
585 <td width='650px'>
586 <?php
587 // medication list expand collapse widget
588 $widgetTitle = xl("Medication List");
589 $widgetLabel = "medicationlist";
590 $widgetButtonLabel = xl("");
591 $widgetButtonClass = "hidden";
592 $linkMethod = "html";
593 $bodyClass = "notab";
594 $widgetAuth = false;
595 $fixedWidth = true;
596 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
597 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
598 $widgetAuth, $fixedWidth);
600 <br/>
601 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
602 </div>
604 </td>
605 </tr>
607 <tr>
608 <td width='650px'>
609 <?php // medication allergy expand collapse widget
610 $widgetTitle = xl("Medication Allergy List");
611 $widgetLabel = "medicationallergylist";
612 $widgetButtonLabel = xl("");
613 $widgetButtonClass = "";
614 $linkMethod = "html";
615 $bodyClass = "notab";
616 $widgetAuth = false;
617 $fixedWidth = true;
618 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
619 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
620 $widgetAuth, $fixedWidth);
622 <br/>
623 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
624 </div>
626 </td>
627 </tr>
629 <!-- Amendments -->
630 <?php if ( $GLOBALS['amendments'] ) { ?>
631 <tr>
632 <td width='650px'>
633 <?php
634 $widgetTitle = xl("Amendments");
635 $widgetLabel = "amendments";
636 $widgetButtonLabel = xl("");
637 $widgetButtonClass = "hidden";
638 $linkMethod = "html";
639 $bodyClass = "notab";
640 $widgetAuth = false;
641 $fixedWidth = true;
642 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
643 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
644 $widgetAuth, $fixedWidth);
647 <br/>
648 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
649 </td>
650 </tr>
651 <?php } ?>
652 <tr>
653 <td width='650px'>
654 <?php
655 // Show current and upcoming appointments.
656 $query = "SELECT e.pc_eid, e.pc_aid, e.pc_title, e.pc_eventDate, " .
657 "e.pc_startTime, e.pc_hometext, u.fname, u.lname, u.mname, " .
658 "c.pc_catname " .
659 "FROM openemr_postcalendar_events AS e, users AS u, " .
660 "openemr_postcalendar_categories AS c WHERE " .
661 "e.pc_pid = ? AND e.pc_eventDate >= CURRENT_DATE AND " .
662 "u.id = e.pc_aid AND e.pc_catid = c.pc_catid " .
663 "ORDER BY e.pc_eventDate, e.pc_startTime";
664 //echo $query;
665 $res = sqlStatement($query, array($pid) );
667 // appointments expand collapse widget
668 $widgetTitle = xl("Appointments");
669 $widgetLabel = "appointments";
670 $widgetButtonLabel = xl("Add");
671 $widgetButtonLink = "add_edit_event_user.php?pid=".htmlspecialchars($pid, ENT_QUOTES);
672 $widgetButtonClass = "edit_event iframe";
673 $linkMethod = "";
674 $bodyClass = "summary_item small";
675 if ($GLOBALS['portal_onsite_appt_modify'])
677 $widgetAuth = true;
679 else
681 $widgetAuth = false;
683 $fixedWidth = false;
684 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel , $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth);
685 $count = 0;
687 <div id='stats_div' style="display:none">
688 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div>
689 </div>
690 </td>
691 </tr>
692 </table>
694 </div>
696 </td>
698 </tr>
700 </table>
702 </div> <!-- end main content div -->
704 <div id="portal-buttons-bottom"> <!-- buttons bottom div -->
705 <input type="button" style="text-align: right;" value="<?php echo xla('Log Out'); ?>" onclick="window.location = 'logout.php'"/>
707 <input type="button" style="text-align: right;" value="<?php echo xla('Change Password'); ?>" onclick="window.location = '<?php echo $landingpage."&password_update=1";?>'"/>
708 </div><!-- end buttons bottom div -->
710 </div>
711 </body>
712 </html>