psr2 fixes to prior commit
[openemr.git] / portal / get_allergies.php
blob6808b2cbd3c2c936ea6b0f382efa3908e3b0bbb5
1 <?php
2 /**
4 * Copyright (C) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
5 * Copyright (C) 2011 Cassian LUP <cassi.lup@gmail.com>
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 Cassian LUP <cassi.lup@gmail.com>
20 * @link http://www.open-emr.org
23 require_once("verify_session.php");
25 $sql = "SELECT * FROM lists WHERE pid = ? AND type = 'allergy' ORDER BY begdate";
27 $res = sqlStatement($sql, array($pid));
29 if (sqlNumRows($res)>0) {
31 <table class="table table-striped">
32 <tr class="header">
33 <th><?php echo xlt('Title'); ?></th>
34 <th><?php echo xlt('Reported Date'); ?></th>
35 <th><?php echo xlt('Start Date'); ?></th>
36 <th><?php echo xlt('End Date'); ?></th>
37 <th><?php echo xlt('Referrer'); ?></th>
38 </tr>
39 <?php
40 $even=false;
41 while ($row = sqlFetchArray($res)) {
42 echo "<tr class='".$class."'>";
43 echo "<td>".text($row['title'])."</td>";
44 echo "<td>".text($row['date'])."</td>";
45 echo "<td>".text($row['begdate'])."</td>";
46 echo "<td>".text($row['enddate'])."</td>";
47 echo "<td>".text($row['referredby'])."</td>";
48 echo "</tr>";
51 echo "</table>";
52 } else {
53 echo xlt("No Results");