fix for prior commit
[openemr.git] / patients / summary_pat_portal.php
blob1b75d564262feed5f281cbc4b7bae7c05344c0a8
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>
55 <head>
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 htmlspecialchars(xl('collapse'),ENT_QUOTES); ?>" ) {
80 $(target).find(".indicator").text( "<?php echo htmlspecialchars(xl('expand'),ENT_QUOTES); ?>" );
81 $("#"+div).hide();
82 } else {
83 $(target).find(".indicator").text( "<?php echo htmlspecialchars(xl('collapse'),ENT_QUOTES); ?>" );
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();
181 refreshAppointments();
183 // fancy box
184 enable_modals();
186 // modal for dialog boxes
187 $(".large_modal").fancybox( {
188 'overlayOpacity' : 0.0,
189 'showCloseButton' : true,
190 'frameHeight' : 600,
191 'frameWidth' : 1000,
192 'centerOnScroll' : false
195 // modal for image viewer
196 $(".image_modal").fancybox( {
197 'overlayOpacity' : 0.0,
198 'showCloseButton' : true,
199 'centerOnScroll' : false,
200 'autoscale' : true
203 $(".add_event").fancybox( {
204 'overlayOpacity' : 0.0,
205 'showCloseButton' : true,
206 'centerOnScroll' : false,
207 'autoscale' : true,
208 'hideOnContentClick' : false,
209 'onClose' : function() {
210 refreshme();
214 $(".generateCCR").click(
215 function() {
216 if(document.getElementById('show_date').checked == true){
217 if(document.getElementById('Start').value == '' || document.getElementById('End').value == ''){
218 alert('<?php echo addslashes( xl('Please select a start date and end date')) ?>');
219 return false;
222 var ccrAction = document.getElementsByName('ccrAction');
223 ccrAction[0].value = 'generate';
224 var raw = document.getElementsByName('raw');
225 raw[0].value = 'no';
226 ccr_form.setAttribute("target", "_blank");
227 $("#ccr_form").submit();
228 ccr_form.setAttribute("target", "");
230 $(".generateCCR_raw").click(
231 function() {
232 var ccrAction = document.getElementsByName('ccrAction');
233 ccrAction[0].value = 'generate';
234 var raw = document.getElementsByName('raw');
235 raw[0].value = 'yes';
236 ccr_form.setAttribute("target", "_blank");
237 $("#ccr_form").submit();
238 ccr_form.setAttribute("target", "");
240 $(".generateCCR_download_h").click(
241 function() {
242 var ccrAction = document.getElementsByName('ccrAction');
243 ccrAction[0].value = 'generate';
244 var raw = document.getElementsByName('raw');
245 raw[0].value = 'hybrid';
246 $("#ccr_form").submit();
248 $(".generateCCR_download_p").click(
249 function() {
250 if(document.getElementById('show_date').checked == true){
251 if(document.getElementById('Start').value == '' || document.getElementById('End').value == ''){
252 alert('<?php echo addslashes( xl('Please select a start date and end date')) ?>');
253 return false;
256 var ccrAction = document.getElementsByName('ccrAction');
257 ccrAction[0].value = 'generate';
258 var raw = document.getElementsByName('raw');
259 raw[0].value = 'pure';
260 $("#ccr_form").submit();
262 $(".viewCCD").click(
263 function() {
264 var ccrAction = document.getElementsByName('ccrAction');
265 ccrAction[0].value = 'viewccd';
266 var raw = document.getElementsByName('raw');
267 raw[0].value = 'no';
268 ccr_form.setAttribute("target", "_blank");
269 $("#ccr_form").submit();
270 ccr_form.setAttribute("target", "");
272 $(".viewCCD_raw").click(
273 function() {
274 var ccrAction = document.getElementsByName('ccrAction');
275 ccrAction[0].value = 'viewccd';
276 var raw = document.getElementsByName('raw');
277 raw[0].value = 'yes';
278 ccr_form.setAttribute("target", "_blank");
279 $("#ccr_form").submit();
280 ccr_form.setAttribute("target", "");
282 $(".viewCCD_download").click(
283 function() {
284 var ccrAction = document.getElementsByName('ccrAction');
285 ccrAction[0].value = 'viewccd';
286 var raw = document.getElementsByName('raw');
287 raw[0].value = 'pure';
288 $("#ccr_form").submit();
290 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
291 $(".viewCCR_send_dialog").click(
292 function() {
293 $("#ccr_send_dialog").toggle();
295 $(".viewCCR_transmit").click(
296 function() {
297 $(".viewCCR_transmit").attr('disabled','disabled');
298 var ccrAction = document.getElementsByName('ccrAction');
299 ccrAction[0].value = 'generate';
300 var ccrRecipient = $("#ccr_send_to").val();
301 var raw = document.getElementsByName('raw');
302 raw[0].value = 'send '+ccrRecipient;
303 if(ccrRecipient=="") {
304 $("#ccr_send_message").html("<?php
305 echo htmlspecialchars(xl('Please enter a valid Direct Address above.'), ENT_QUOTES);?>");
306 $("#ccr_send_result").show();
307 } else {
308 $(".viewCCR_transmit").attr('disabled','disabled');
309 $("#ccr_send_message").html("<?php
310 echo htmlspecialchars(xl('Working... this may take a minute.'), ENT_QUOTES);?>");
311 $("#ccr_send_result").show();
312 var action=$("#ccr_form").attr('action');
313 $.post(action, {ccrAction:'generate',raw:'send '+ccrRecipient,requested_by:'patient'},
314 function(data) {
315 if(data=="SUCCESS") {
316 $("#ccr_send_message").html("<?php
317 echo htmlspecialchars(xl('Your message was submitted for delivery to'), ENT_QUOTES);
318 ?> "+ccrRecipient);
319 $("#ccr_send_to").val("");
320 } else {
321 $("#ccr_send_message").html(data);
323 $(".viewCCR_transmit").removeAttr('disabled');
327 <?php }
328 if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
329 $(".viewCCD_send_dialog").click(
330 function() {
331 $("#ccd_send_dialog").toggle();
333 $(".viewCCD_transmit").click(
334 function() {
335 $(".viewCCD_transmit").attr('disabled','disabled');
336 var ccrAction = document.getElementsByName('ccrAction');
337 ccrAction[0].value = 'viewccd';
338 var ccdRecipient = $("#ccd_send_to").val();
339 var raw = document.getElementsByName('raw');
340 raw[0].value = 'send '+ccdRecipient;
341 if(ccdRecipient=="") {
342 $("#ccd_send_message").html("<?php
343 echo htmlspecialchars(xl('Please enter a valid Direct Address above.'), ENT_QUOTES);?>");
344 $("#ccd_send_result").show();
345 } else {
346 $(".viewCCD_transmit").attr('disabled','disabled');
347 $("#ccd_send_message").html("<?php
348 echo htmlspecialchars(xl('Working... this may take a minute.'), ENT_QUOTES);?>");
349 $("#ccd_send_result").show();
350 var action=$("#ccr_form").attr('action');
351 $.post(action, {ccrAction:'viewccd',raw:'send '+ccdRecipient,requested_by:'patient'},
352 function(data) {
353 if(data=="SUCCESS") {
354 $("#ccd_send_message").html("<?php
355 echo htmlspecialchars(xl('Your message was submitted for delivery to'), ENT_QUOTES);
356 ?> "+ccdRecipient);
357 $("#ccd_send_to").val("");
358 } else {
359 $("#ccd_send_message").html(data);
361 $(".viewCCD_transmit").removeAttr('disabled');
365 <?php } ?>
369 </script>
371 </head>
373 <body class="body_top">
375 <div id="wrapper" class="lefttop" style="width: 700px;">
376 <h2 class="heading"><?php echo htmlspecialchars( xl('Patient Portal'), ENT_NOQUOTES); ?></h2>
378 <?php
379 $result = getPatientData($pid);
381 <?php echo htmlspecialchars( xl('Welcome'), ENT_NOQUOTES); ?> <b><?php echo htmlspecialchars($result['fname']." ".$result['lname'],ENT_NOQUOTES); ?></b>
383 <div style='margin-top:10px'> <!-- start main content div -->
384 <table border="0" cellspacing="0" cellpadding="0" width="100%">
385 <tr>
386 <td align="left" valign="top">
387 <!-- start left column div -->
388 <div style='float:left; margin-right:20px'>
389 <table cellspacing=0 cellpadding=0>
390 <?php if ( $GLOBALS['activate_ccr_ccd_report'] ) { // show CCR/CCD reporting options ?>
391 <tr>
392 <td width='650px'>
393 <?php
394 // Reports widget
395 $widgetTitle = xl("Reports");
396 $widgetLabel = "reports";
397 $widgetButtonLabel = xl("");
398 $widgetButtonClass = "hidden";
399 $linkMethod = "html";
400 $bodyClass = "notab";
401 $widgetAuth = false;
402 $fixedWidth = true;
403 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
404 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
405 $widgetAuth, $fixedWidth);
407 <br/>
408 <div style='margin-left:3em; margin-right:3em; padding:1em; border:1px solid blue;' class='text'>
409 <div id="ccr_report">
410 <form name='ccr_form' id='ccr_form' method='post' action='../ccr/createCCR.php?portal_auth=1'>
411 <span class='text'><b><?php echo htmlspecialchars( xl('Continuity of Care Record (CCR)'), ENT_NOQUOTES); ?></b></span>&nbsp;&nbsp;
412 <br/>
413 <span class='text'>(<?php echo htmlspecialchars( xl('Pop ups need to be enabled to see these reports'), ENT_NOQUOTES); ?>)</span>
414 <br/>
415 <br/>
416 <input type='hidden' name='ccrAction'>
417 <input type='hidden' name='raw'>
418 <input type="checkbox" name="show_date" id="show_date" onchange="show_date_fun();" ><span class='text'><?php echo htmlspecialchars( xl('Use Date Range'), ENT_NOQUOTES); ?>
419 <br>
420 <div id="date_div" style="display:none" >
421 <br>
422 <table border="0" cellpadding="0" cellspacing="0" >
423 <tr>
424 <td>
425 <span class='bold'><?php echo htmlspecialchars( xl('Start Date'), ENT_NOQUOTES);?>: </span>
426 </td>
427 <td>
428 <input type='text' size='10' name='Start' id='Start'
429 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
430 title='<?php echo htmlspecialchars( xl('yyyy-mm-dd'), ENT_QUOTES); ?>' />
431 <img src='../interface/pic/show_calendar.gif' align='absbottom' width='24' height='22'
432 id='img_start' border='0' alt='[?]' style='cursor:pointer'
433 title='<?php echo htmlspecialchars( xl('Click here to choose a date'), ENT_QUOTES); ?>' >
434 <script LANGUAGE="JavaScript">
435 Calendar.setup({inputField:"Start", ifFormat:"%Y-%m-%d", button:"img_start"});
436 </script>
437 </td>
438 <td>
439 &nbsp;
440 <span class='bold'><?php echo htmlspecialchars( xl('End Date'), ENT_NOQUOTES);?>: </span>
441 </td>
442 <td>
443 <input type='text' size='10' name='End' id='End'
444 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)'
445 title='<?php echo htmlspecialchars( xl('yyyy-mm-dd'), ENT_QUOTES); ?>' />
446 <img src='../interface/pic/show_calendar.gif' align='absbottom' width='24' height='22'
447 id='img_end' border='0' alt='[?]' style='cursor:pointer'
448 title='<?php echo htmlspecialchars( xl('Click here to choose a date'), ENT_QUOTES); ?>' >
449 <script LANGUAGE="JavaScript">
450 Calendar.setup({inputField:"End", ifFormat:"%Y-%m-%d", button:"img_end"});
451 </script>
452 </td>
453 </tr>
454 </table>
455 </div>
456 <br>
457 <input type="button" class="generateCCR" value="<?php echo htmlspecialchars( xl('View/Print'), ENT_QUOTES); ?>" />
458 <!-- <input type="button" class="generateCCR_download_h" value="<?php echo htmlspecialchars( xl('Download'), ENT_QUOTES); ?>" /> -->
459 <input type="button" class="generateCCR_download_p" value="<?php echo htmlspecialchars( xl('Download'), ENT_QUOTES); ?>" />
460 <!-- <input type="button" class="generateCCR_raw" value="<?php echo htmlspecialchars( xl('Raw Report'), ENT_QUOTES); ?>" /> -->
461 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccr_enable']==true) { ?>
462 <input type="button" class="viewCCR_send_dialog" value="<?php echo htmlspecialchars( xl('Transmit', ENT_QUOTES)); ?>" />
463 <br>
464 <div id="ccr_send_dialog" style="display:none" >
465 <br>
466 <table border="0" cellpadding="0" cellspacing="0" >
467 <tr>
468 <td>
469 <span class='bold'><?php echo htmlspecialchars( xl('Enter Recipient\'s Direct Address'), ENT_NOQUOTES);?>: </span>
470 <input type="text" size="64" name="ccr_send_to" id="ccr_send_to" value="">
471 <input type="button" class="viewCCR_transmit" value="<?php echo htmlspecialchars( xl('Send', ENT_QUOTES)); ?>" />
472 <div id="ccr_send_result" style="display:none" >
473 <span class="text" id="ccr_send_message"></span>
474 </div>
475 </td>
476 </tr>
477 </table>
478 </div>
479 <?php } ?>
480 <hr/>
481 <span class='text'><b><?php echo htmlspecialchars( xl('Continuity of Care Document (CCD)'), ENT_NOQUOTES); ?></b></span>&nbsp;&nbsp;
482 <br/>
483 <span class='text'>(<?php echo htmlspecialchars( xl('Pop ups need to be enabled to see these reports'), ENT_NOQUOTES); ?>)</span>
484 <br/>
485 <br/>
486 <input type="button" class="viewCCD" value="<?php echo htmlspecialchars( xl('View/Print', ENT_QUOTES)); ?>" />
487 <input type="button" class="viewCCD_download" value="<?php echo htmlspecialchars( xl('Download', ENT_QUOTES)); ?>" />
488 <!-- <input type="button" class="viewCCD_raw" value="<?php echo htmlspecialchars( xl('Raw Report', ENT_QUOTES)); ?>" /> -->
489 <?php if ($GLOBALS['phimail_enable']==true && $GLOBALS['phimail_ccd_enable']==true) { ?>
490 <input type="button" class="viewCCD_send_dialog" value="<?php echo htmlspecialchars( xl('Transmit', ENT_QUOTES)); ?>" />
491 <br>
492 <div id="ccd_send_dialog" style="display:none" >
493 <br>
494 <table border="0" cellpadding="0" cellspacing="0" >
495 <tr>
496 <td>
497 <span class='bold'><?php echo htmlspecialchars( xl('Enter Recipient\'s Direct Address'), ENT_NOQUOTES);?>: </span>
498 <input type="text" size="64" name="ccd_send_to" id="ccd_send_to" value="">
499 <input type="button" class="viewCCD_transmit" value="<?php echo htmlspecialchars( xl('Send', ENT_QUOTES)); ?>" />
500 <div id="ccd_send_result" style="display:none" >
501 <span class="text" id="ccd_send_message"></span>
502 </div>
503 </td>
504 </tr>
505 </table>
506 </div>
507 <?php } ?>
508 </form>
509 </div>
510 </div>
511 <br/>
512 </div>
513 </td>
514 </tr>
515 <?php } // end CCR/CCD reporting options ?>
517 <?php echo "<tr><td width='650px'>";
518 // Lab tests results expand collapse widget
519 $widgetTitle = xl("Lab Test Results");
520 $widgetLabel = "labtestresults";
521 $widgetButtonLabel = xl("");
522 $widgetButtonClass = "hidden";
523 $linkMethod = "html";
524 $bodyClass = "notab";
525 $widgetAuth = false;
526 $fixedWidth = true;
527 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
528 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
529 $widgetAuth, $fixedWidth);
532 <br/>
533 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
534 </div>
535 </td>
536 </tr>
537 <?php echo "<tr><td width='650px'>";
538 // problem list collapse widget
539 $widgetTitle = xl("Problem List");
540 $widgetLabel = "problemlist";
541 $widgetButtonLabel = xl("");
542 $widgetButtonClass = "hidden";
543 $linkMethod = "html";
544 $bodyClass = "notab";
545 $widgetAuth = false;
546 $fixedWidth = true;
547 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel , $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth); ?>
549 </div>
550 </td>
551 </tr>
553 <tr>
554 <td width='650px'>
555 <?php
556 // medication list expand collapse widget
557 $widgetTitle = xl("Medication List");
558 $widgetLabel = "medicationlist";
559 $widgetButtonLabel = xl("");
560 $widgetButtonClass = "hidden";
561 $linkMethod = "html";
562 $bodyClass = "notab";
563 $widgetAuth = false;
564 $fixedWidth = true;
565 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
566 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
567 $widgetAuth, $fixedWidth);
569 <br/>
570 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
571 </div>
572 </td>
573 </tr>
575 <tr>
576 <td width='650px'>
577 <?php // medication allergy expand collapse widget
578 $widgetTitle = xl("Medication Allergy List");
579 $widgetLabel = "medicationallergylist";
580 $widgetButtonLabel = xl("");
581 $widgetButtonClass = "";
582 $linkMethod = "html";
583 $bodyClass = "notab";
584 $widgetAuth = false;
585 $fixedWidth = true;
586 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
587 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
588 $widgetAuth, $fixedWidth);
590 <br/>
591 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
592 </div>
593 </td>
594 </tr>
596 <!-- Amendments -->
597 <?php if ( $GLOBALS['amendments'] ) { ?>
598 <tr>
599 <td width='650px'>
600 <?php
601 $widgetTitle = xl("Amendments");
602 $widgetLabel = "amendments";
603 $widgetButtonLabel = xl(""));
604 $widgetButtonClass = "hidden";
605 $linkMethod = "html";
606 $bodyClass = "notab";
607 $widgetAuth = false;
608 $fixedWidth = true;
609 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
610 $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass,
611 $widgetAuth, $fixedWidth);
614 <br/>
615 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div><br/>
616 </td>
617 </tr>
619 <?php } ?>
621 <tr>
622 <td>
624 <?php
625 // Show current and upcoming appointments.
626 $query = "SELECT e.pc_eid, e.pc_aid, e.pc_title, e.pc_eventDate, " .
627 "e.pc_startTime, e.pc_hometext, u.fname, u.lname, u.mname, " .
628 "c.pc_catname " .
629 "FROM openemr_postcalendar_events AS e, users AS u, " .
630 "openemr_postcalendar_categories AS c WHERE " .
631 "e.pc_pid = ? AND e.pc_eventDate >= CURRENT_DATE AND " .
632 "u.id = e.pc_aid AND e.pc_catid = c.pc_catid " .
633 "ORDER BY e.pc_eventDate, e.pc_startTime";
634 //echo $query;
635 $res = sqlStatement($query, array($pid) );
637 // appointments expand collapse widget
638 $widgetTitle = xl("Appointments");
639 $widgetLabel = "appointments";
640 $widgetButtonLabel = xl("Add");
641 $widgetButtonLink = "add_edit_event_user.php?pid=".htmlspecialchars($pid, ENT_QUOTES);
642 $widgetButtonClass = "edit_event iframe";
643 $linkMethod = "";
644 $bodyClass = "summary_item small";
645 if ($GLOBALS['portal_onsite_appt_modify']) {
646 $widgetAuth = true;
648 else {
649 $widgetAuth = false;
651 $fixedWidth = false;
653 expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel , $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth);
655 $count = 0;
658 <div id='stats_div' style="display:none">
659 <div style='margin-left:10px' class='text'><img src='images/ajax-loader.gif'/></div>
660 </div>
662 </td>
663 </tr>
664 </table>
666 </div>
668 </td>
670 </tr>
671 </table>
673 </div> <!-- end main content div -->
675 <input type="button" style="text-align: right;" value="<?php echo xl('Log Out'); ?>" onclick="window.location = 'logout.php'"/>
677 <input type="button" style="text-align: right;" value="<?php echo xl('Change Password'); ?>" onclick="window.location = '<?php echo $landingpage."&password_update=1";?>'"/>
680 </wrapper>
682 </body>
683 </html>