Bug in patient demographics.php appt widget

tmccormi wrote on Thursday, March 03, 2016:

Current DevTip
It shows all appts for any patient on any other patient…

here’s the fix… I’m going to push this fix this evening.

diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php
index c4121db..143305d 100644
--- a/interface/patient_file/summary/demographics.php
+++ b/interface/patient_file/summary/demographics.php
@@ -1359,7 +1359,7 @@ expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel,
         $apptNum = (int)$GLOBALS['number_of_appts_to_show'];
         if($apptNum != 0) $apptNum2 = abs($apptNum);
         else $apptNum2 = 10;
-        $events = fetchNextXAppts($current_date2, $patient_id, $apptNum2);
+        $events = fetchNextXAppts($current_date2, $pid, $apptNum2);
         $events = sortAppointments($events);
         //////

tmccormi wrote on Thursday, March 03, 2016:

PS: Tested this on the daily dev demo site.

sunsetsystems wrote on Thursday, March 03, 2016:

Thanks Tony.

Rod

tmccormi wrote on Thursday, March 03, 2016:

Pushed to master

commit fb103e9528a1973755d001c01450fe24fc3485bf
Author: Tony McCormick tony@mi-squared.com
Date: Wed Mar 2 17:14:09 2016 -0800

Fix bad PID variable lookup in appt widget

bradymiller wrote on Thursday, March 03, 2016:

Thumbs up :slight_smile:
(I just brought your fix over to the rel-430 branch)

-brady