change eligibility batch from ssn to policy number, minor fix to filename with extra...
[openemr.git] / library / ajax / dated_reminders_counter.php
blobf7d9cdb243690e3a029a6f779d21dd54167d47b0
1 <?php
2 /**
3 * Returns a count of due messages for current user.
5 * Copyright (C) 2012 tajemo.co.za <http://www.tajemo.co.za/>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
18 * @package OpenEMR
19 * @author Craig Bezuidenhout <http://www.tajemo.co.za/>
20 * @author Brady Miller <brady.g.miller@gmail.com>
21 * @link http://www.open-emr.org
26 require_once("../../interface/globals.php");
27 require_once("$srcdir/dated_reminder_functions.php");
28 require_once("$srcdir/pnotes.inc");
30 //Collect number of due reminders
31 $dueReminders = GetDueReminderCount(5, strtotime(date('Y/m/d')));
33 //Collect number of active messages
34 $activeMessages = getPnotesByUser("1", "no", $_SESSION['authUser'], true);
36 $totalNumber = $dueReminders + $activeMessages;
37 echo ($totalNumber > 0 ? '('.text(intval($totalNumber)).')' : '');