fix for attendance form
[openemr.git] / patients / summary_pat_portal.php
blob5d06ca8e83400d11474a82c2c732115847d798e2
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/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 }
329 if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
330 $(".viewCCD_send_dialog").click(
331 function() {
332 $("#ccd_send_dialog").toggle();
334 $(".viewCCD_transmit").click(
335 function() {
336 $(".viewCCD_transmit").attr('disabled','disabled');
337 var ccrAction = document.getElementsByName('ccrAction');
338 ccrAction[0].value = 'viewccd';
339 var ccdRecipient = $("#ccd_send_to").val();
340 var raw = document.getElementsByName('raw');
341 raw[0].value = 'send '+ccdRecipient;
342 if(ccdRecipient=="") {
343 $("#ccd_send_message").html("<?php
344 echo xla('Please enter a valid Direct Address above.');?>");
345 $("#ccd_send_result").show();
346 } else {
347 $(".viewCCD_transmit").attr('disabled','disabled');
348 $("#ccd_send_message").html("<?php
349 echo xla('Working... this may take a minute.');?>");
350 $("#ccd_send_result").show();
351 var action=$("#ccr_form").attr('action');
352 $.post(action, {ccrAction:'viewccd',raw:'send '+ccdRecipient,requested_by:'patient'},
353 function(data) {
354 if(data=="SUCCESS") {
355 $("#ccd_send_message").html("<?php
356 echo xla('Your message was submitted for delivery to');
357 ?> "+ccdRecipient);
358 $("#ccd_send_to").val("");
359 } else {
360 $("#ccd_send_message").html(data);
362 $(".viewCCD_transmit").removeAttr('disabled');
366 <?php } ?>
370 </script>
372 </head>
374 <body class="body_top">
376 <div id="wrapper" class="lefttop" style="width: 700px;">
377 <h2 class="heading"><?php echo xlt("Patient Portal"); ?></h2>
379 <?php
380 $result = getPatientData($pid);
382 <?php echo xlt('Welcome'); ?> <b><?php echo text($result['fname']." ".$result['lname']); ?></b>
384 <div style='margin-top:10px'> <!-- start main content div -->
385 <table border="0" cellspacing="0" cellpadding="0" width="100%">
386 <tr>
387 <td align="left" valign="top">
388 <!-- start left column div -->
389 <div style='float:left; margin-right:20px'>
390 <table cellspacing=0 cellpadding=0>
391 <?php if ( $GLOBALS['activate_ccr_ccd_report'] ) { // show CCR/CCD reporting options ?>
392 <tr>
393 <td width='650px'>
394 <?php
395 // Reports widget
396 $widgetTitle = xl("Reports");
397 $widgetLabel = "reports";
398 $widgetButtonLabel = xl("");
399 $widgetButtonClass = "hidden";
400 $linkMethod = "html";
401 $bodyClass = "notab";
402 $widgetAuth = false;
403 $fixedWidth = true;
404 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
405 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
406 $widgetAuth, $fixedWidth);
408 <br/>
409 <div style='margin-left:3em; margin-right:3em; padding:1em; border:1px solid blue;' class='text'>
410 <div id="ccr_report">
411 <form name='ccr_form' id='ccr_form' method='post' action='../ccr/createCCR.php?portal_auth=1'>
412 <span class='text'><b><?php echo xlt('Continuity of Care Record (CCR)'); ?></b></span>&nbsp;&nbsp;
413 <br/>
414 <span class='text'>(<?php echo xlt('Pop ups need to be enabled to see these reports'); ?>)</span>
415 <br/>
416 <br/>
417 <input type='hidden' name='ccrAction'>
418 <input type='hidden' name='raw'>
419 <input type="checkbox" name="show_date" id="show_date" onchange="show_date_fun();" ><span class='text'><?php echo xlt('Use Date Range'); ?>
420 <br>
421 <div id="date_div" style="display:none" >
422 <br>
423 <table border="0" cellpadding="0" cellspacing="0" >
424 <tr>
425 <td>
426 <span class='bold'><?php echo xlt('Start Date');?>: </span>
427 </td>
428 <td>
429 <input type='text' size='10' name='Start' id='Start'
430 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
431 title='<?php echo xla('yyyy-mm-dd'); ?>' />
432 <img src='../interface/pic/show_calendar.gif' align='absbottom' width='24' height='22'
433 id='img_start' border='0' alt='[?]' style='cursor:pointer'
434 title='<?php echo xla('Click here to choose a date'); ?>' >
435 <script LANGUAGE="JavaScript">
436 Calendar.setup({inputField:"Start", ifFormat:"%Y-%m-%d", button:"img_start"});
437 </script>
438 </td>
439 <td>
440 &nbsp;
441 <span class='bold'><?php echo xlt('End Date');?>: </span>
442 </td>
443 <td>
444 <input type='text' size='10' name='End' id='End'
445 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
446 title='<?php echo xla('yyyy-mm-dd'); ?>' />
447 <img src='../interface/pic/show_calendar.gif' align='absbottom' width='24' height='22'
448 id='img_end' border='0' alt='[?]' style='cursor:pointer'
449 title='<?php echo xla('Click here to choose a date'); ?>' >
450 <script LANGUAGE="JavaScript">
451 Calendar.setup({inputField:"End", ifFormat:"%Y-%m-%d", button:"img_end"});
452 </script>
453 </td>
454 </tr>
455 </table>
456 </div>
457 <br>
458 <input type="button" class="generateCCR" value="<?php echo xla('View/Print'); ?>" />
459 <!-- <input type="button" class="generateCCR_download_h" value="<?php echo xla('Download'); ?>" /> -->
460 <input type="button" class="generateCCR_download_p" value="<?php echo xla('Download'); ?>" />
461 <!-- <input type="button" class="generateCCR_raw" value="<?php echo xla('Raw Report'); ?>" /> -->
462 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
463 <input type="button" class="viewCCR_send_dialog" value="<?php echo xla('Transmit'); ?>" />
464 <br>
465 <div id="ccr_send_dialog" style="display:none" >
466 <br>
467 <table border="0" cellpadding="0" cellspacing="0" >
468 <tr>
469 <td>
470 <span class='bold'><?php echo xlt('Enter Recipient\'s Direct Address');?>: </span>
471 <input type="text" size="64" name="ccr_send_to" id="ccr_send_to" value="">
472 <input type="button" class="viewCCR_transmit" value="<?php echo xla('Send'); ?>" />
473 <div id="ccr_send_result" style="display:none" >
474 <span class="text" id="ccr_send_message"></span>
475 </div>
476 </td>
477 </tr>
478 </table>
479 </div>
480 <?php } ?>
481 <hr/>
482 <span class='text'><b><?php echo xlt('Continuity of Care Document (CCD)'); ?></b></span>&nbsp;&nbsp;
483 <br/>
484 <span class='text'>(<?php echo xlt('Pop ups need to be enabled to see these reports'); ?>)</span>
485 <br/>
486 <br/>
487 <input type="button" class="viewCCD" value="<?php echo xla('View/Print'); ?>" />
488 <input type="button" class="viewCCD_download" value="<?php echo xla('Download'); ?>" />
489 <!-- <input type="button" class="viewCCD_raw" value="<?php echo xla('Raw Report'); ?>" /> -->
490 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
491 <input type="button" class="viewCCD_send_dialog" value="<?php echo xla('Transmit'); ?>" />
492 <br>
493 <div id="ccd_send_dialog" style="display:none" >
494 <br>
495 <table border="0" cellpadding="0" cellspacing="0" >
496 <tr>
497 <td>
498 <span class='bold'><?php echo xlt('Enter Recipient\'s Direct Address');?>: </span>
499 <input type="text" size="64" name="ccd_send_to" id="ccd_send_to" value="">
500 <input type="button" class="viewCCD_transmit" value="<?php echo xla('Send'); ?>" />
501 <div id="ccd_send_result" style="display:none" >
502 <span class="text" id="ccd_send_message"></span>
503 </div>
504 </td>
505 </tr>
506 </table>
507 </div>
508 <?php } ?>
509 </form>
510 </div>
511 </div>
512 <br/>
514 </div>
515 </td>
516 </tr>
517 <?php } // end CCR/CCD reporting options ?>
518 <?php if ( $GLOBALS['portal_onsite_document_download'] ) { ?>
519 <?php echo "<tr><td width='650px'>";
520 $widgetTitle = xl('Documents');
521 $widgetLabel = "documents";
522 $widgetButtonLabel = xl('Download');
523 $widgetButtonClass = "hidden";
524 $linkMethod = "html";
525 $bodyClass = "notab";
526 $widgetAuth = false;
527 $fixedWidth = true;
528 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
529 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
530 $widgetAuth, $fixedWidth);
532 <span class="text"><?php echo xlt('Download all patient documents');?></span>
533 <br /><br />
534 <form name='doc_form' id='doc_form' action='get_patient_documents.php' method='post'>
535 <input type="button" class="generateDoc_download" value="<?php echo xla('Download'); ?>" />
536 </form>
537 </div>
538 </td>
539 </tr>
540 <?php } ?>
541 <?php echo "<tr><td width='650px'>";
542 // Lab tests results expand collapse widget
543 $widgetTitle = xl("Lab Test Results");
544 $widgetLabel = "labtestresults";
545 $widgetButtonLabel = xl("");
546 $widgetButtonClass = "hidden";
547 $linkMethod = "html";
548 $bodyClass = "notab";
549 $widgetAuth = false;
550 $fixedWidth = true;
551 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
552 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
553 $widgetAuth, $fixedWidth);
556 <br/>
557 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
558 </div>
560 </td>
561 </tr>
562 <?php echo "<tr><td width='650px'>";
563 // problem list collapse widget
564 $widgetTitle = xl("Problem List");
565 $widgetLabel = "problemlist";
566 $widgetButtonLabel = xl("");
567 $widgetButtonClass = "hidden";
568 $linkMethod = "html";
569 $bodyClass = "notab";
570 $widgetAuth = false;
571 $fixedWidth = true;
572 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel , $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth); ?>
574 </div>
577 </td>
578 </tr>
580 <tr>
581 <td width='650px'>
582 <?php
583 // medication list expand collapse widget
584 $widgetTitle = xl("Medication List");
585 $widgetLabel = "medicationlist";
586 $widgetButtonLabel = xl("");
587 $widgetButtonClass = "hidden";
588 $linkMethod = "html";
589 $bodyClass = "notab";
590 $widgetAuth = false;
591 $fixedWidth = true;
592 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
593 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
594 $widgetAuth, $fixedWidth);
596 <br/>
597 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
598 </div>
600 </td>
601 </tr>
603 <tr>
604 <td width='650px'>
605 <?php // medication allergy expand collapse widget
606 $widgetTitle = xl("Medication Allergy List");
607 $widgetLabel = "medicationallergylist";
608 $widgetButtonLabel = xl("");
609 $widgetButtonClass = "";
610 $linkMethod = "html";
611 $bodyClass = "notab";
612 $widgetAuth = false;
613 $fixedWidth = true;
614 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
615 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
616 $widgetAuth, $fixedWidth);
618 <br/>
619 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
620 </div>
622 </td>
623 </tr>
625 <!-- Amendments -->
626 <?php if ( $GLOBALS['amendments'] ) { ?>
627 <tr>
628 <td width='650px'>
629 <?php
630 $widgetTitle = xl("Amendments");
631 $widgetLabel = "amendments";
632 $widgetButtonLabel = xl("");
633 $widgetButtonClass = "hidden";
634 $linkMethod = "html";
635 $bodyClass = "notab";
636 $widgetAuth = false;
637 $fixedWidth = true;
638 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
639 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
640 $widgetAuth, $fixedWidth);
643 <br/>
644 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
645 </td>
646 </tr>
647 <?php } ?>
648 <tr>
649 <td width='650px'>
650 <?php
651 // Show current and upcoming appointments.
652 $query = "SELECT e.pc_eid, e.pc_aid, e.pc_title, e.pc_eventDate, " .
653 "e.pc_startTime, e.pc_hometext, u.fname, u.lname, u.mname, " .
654 "c.pc_catname " .
655 "FROM openemr_postcalendar_events AS e, users AS u, " .
656 "openemr_postcalendar_categories AS c WHERE " .
657 "e.pc_pid = ? AND e.pc_eventDate >= CURRENT_DATE AND " .
658 "u.id = e.pc_aid AND e.pc_catid = c.pc_catid " .
659 "ORDER BY e.pc_eventDate, e.pc_startTime";
660 //echo $query;
661 $res = sqlStatement($query, array($pid) );
663 // appointments expand collapse widget
664 $widgetTitle = xl("Appointments");
665 $widgetLabel = "appointments";
666 $widgetButtonLabel = xl("Add");
667 $widgetButtonLink = "add_edit_event_user.php?pid=".htmlspecialchars($pid, ENT_QUOTES);
668 $widgetButtonClass = "edit_event iframe";
669 $linkMethod = "";
670 $bodyClass = "summary_item small";
671 if ($GLOBALS['portal_onsite_appt_modify'])
673 $widgetAuth = true;
675 else
677 $widgetAuth = false;
679 $fixedWidth = false;
680 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel , $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth);
681 $count = 0;
683 <div id='stats_div' style="display:none">
684 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div>
685 </div>
686 </td>
687 </tr>
688 </table>
690 </div>
692 </td>
694 </tr>
696 </table>
698 </div> <!-- end main content div -->
700 <div id="portal-buttons-bottom"> <!-- buttons bottom div -->
701 <input type="button" style="text-align: right;" value="<?php echo xla('Log Out'); ?>" onclick="window.location = 'logout.php'"/>
703 <input type="button" style="text-align: right;" value="<?php echo xla('Change Password'); ?>" onclick="window.location = '<?php echo $landingpage."&password_update=1";?>'"/>
704 </div><!-- end buttons bottom div -->
706 </div>
707 </body>
708 </html>