Therapy groups fixes (#1326)
[openemr.git] / interface / forms / group_attendance / report.php
blob86aef8e2b01652a9504af01f775defa163543008
1 <?php
2 /**
3 * interface/forms/group_attendance/report.php
6 * Copyright (C) 2016 Shachar Zilbershlag <shaharzi@matrix.co.il>
7 * Copyright (C) 2016 Amiel Elboim <amielel@matrix.co.il>
9 * LICENSE: This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 3
12 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
20 * @package OpenEMR
21 * @author Shachar Zilbershlag <shaharzi@matrix.co.il>
22 * @author Amiel Elboim <amielel@matrix.co.il>
23 * @link http://www.open-emr.org
30 require_once("../../globals.php");
31 require_once($GLOBALS["srcdir"] . "/api.inc");
32 require_once("{$GLOBALS['srcdir']}/group.inc");
34 function group_attendance_report($pid, $encounter, $cols, $id)
37 global $therapy_group;
39 $sql = "SELECT * FROM `form_group_attendance` WHERE id=? AND group_id = ? AND encounter_id = ?";
40 $res = sqlStatement($sql, array($id,$therapy_group, $_SESSION["encounter"]));
41 $form_data = sqlFetchArray($res);
42 $group_data = getGroup($therapy_group);
43 $group_name = $group_data['group_name'];
45 if ($form_data) { ?>
46 <table style='border-collapse:collapse;border-spacing:0;width: 100%;'>
47 <tr>
48 <td align='center' style='border:1px solid #ccc;padding:4px;'><span class=bold><?php echo xlt('Date'); ?></span></td>
49 <td align='center' style='border:1px solid #ccc;padding:4px;'><span class=bold><?php echo xlt('Group'); ?></span></td>
50 </tr>
51 <tr>
52 <td style='border:1px solid #ccc;padding:4px;'><span class=text><?php echo text($form_data['date']); ?></span></td>
53 <td style='border:1px solid #ccc;padding:4px;'><span class=text><?php echo text($group_name); ?></span></td>
54 </tr>
55 </table>
56 <?php