Highway to PSR2
[openemr.git] / interface / therapy_groups / therapy_groups_models / therapy_groups_events_model.php
blob83229aaae126742a65bd874e1f34de86713e3806
1 <?php
2 /**
3 * interface/therapy_groups/therapy_groups_models/therapy_groups_events_model.php contains the model for therapy group events.
5 * This model fetches the events for the therapy group from the DB.
7 * Copyright (C) 2016 Shachar Zilbershlag <shaharzi@matrix.co.il>
8 * Copyright (C) 2016 Amiel Elboim <amielel@matrix.co.il>
10 * LICENSE: This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 3
13 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
21 * @package OpenEMR
22 * @author Shachar Zilbershlag <shaharzi@matrix.co.il>
23 * @author Amiel Elboim <amielel@matrix.co.il>
24 * @link http://www.open-emr.org
28 class Therapy_Groups_Events
31 const TABLE = 'openemr_postcalendar_events';
33 /**
34 * Get all events of specified group.
35 * @param $gid
36 * @return ADORecordSet_mysqli
38 public function getGroupEvents($gid)
41 $appts_to_show = $GLOBALS['number_of_group_appts_to_show'];
42 $current_date = date('Y-m-d');
43 $events = fetchNextXAppts($current_date, null, $appts_to_show, $gid);
44 return $events;