From 634a44acbd05dae28f339529de193e8234226f9b Mon Sep 17 00:00:00 2001 From: matrix-amiel Date: Tue, 10 Jan 2017 09:21:27 +0200 Subject: [PATCH] fix in recurrence widget (#426) --- interface/patient_file/summary/demographics.php | 2 +- library/appointments.inc.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index e195149cc..ee03ff8a2 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -1517,7 +1517,7 @@ expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel, if ($row == false || !recurrence_is_current($row['pc_endDate'])) continue; echo "
"; - echo "" . xlt('Appointment Category') . ': ' . text($row['pc_title']) . ""; + echo "" . xlt('Appointment Category') . ': ' . xlt($row['pc_catname']) . ""; echo "
"; echo "" . xlt('Recurrence') . ': ' . text($row['pc_recurrspec']) . ""; echo "
"; diff --git a/library/appointments.inc.php b/library/appointments.inc.php index 8fab8afd2..b7f45cb8f 100644 --- a/library/appointments.inc.php +++ b/library/appointments.inc.php @@ -642,8 +642,9 @@ function interpretRecurrence($recurr_freq, $recurr_type){ } function fetchRecurrences($pid){ - $query = "SELECT `pc_title`, `pc_endDate`, `pc_recurrtype`, `pc_recurrspec` FROM openemr_postcalendar_events -WHERE `pc_pid` = ? AND `pc_recurrtype` > 0;"; + $query = "SELECT pe.pc_title, pe.pc_endDate, pe.pc_recurrtype, pe.pc_recurrspec, pc.pc_catname FROM openemr_postcalendar_events AS pe " + . "JOIN openemr_postcalendar_categories AS pc ON pe.pc_catid=pc.pc_catid " + . "WHERE pe.pc_pid = ? AND pe.pc_recurrtype > 0;"; $sqlBindArray = array(); array_push($sqlBindArray, $pid); $res = sqlStatement($query, $sqlBindArray); -- 2.11.4.GIT