Fix to the consolidation of procedure codes to that each dupliate procedure is on...
[openemr.git] / patients / get_allergies.php
bloba670e9dc7bb2bd2e9d56f9bd5b91036eb30ab613
1 <?php
2 // Copyright (C) 2011 Cassian LUP <cassi.lup@gmail.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 require_once("verify_session.php");
11 $sql = "SELECT * FROM lists WHERE pid = ? AND type = 'allergy' ORDER BY begdate";
13 $res = sqlStatement($sql, array($pid) );
15 if(sqlNumRows($res)>0)
18 <table class="class1">
19 <tr class="header">
20 <th><?php echo htmlspecialchars( xl('Title'),ENT_NOQUOTES); ?></th>
21 <th><?php echo htmlspecialchars( xl('Reported Date'),ENT_NOQUOTES); ?></th>
22 <th><?php echo htmlspecialchars( xl('Start Date'),ENT_NOQUOTES); ?></th>
23 <th><?php echo htmlspecialchars( xl('End Date'),ENT_NOQUOTES); ?></th>
24 <th><?php echo htmlspecialchars( xl('Referrer'),ENT_NOQUOTES); ?></th>
25 </tr>
26 <?php
27 $even=false;
28 while ($row = sqlFetchArray($res)) {
29 if ($even) {
30 $class="class1_even";
31 $even=false;
32 } else {
33 $class="class1_odd";
34 $even=true;
36 echo "<tr class='".$class."'>";
37 echo "<td>".htmlspecialchars( $row['title'],ENT_NOQUOTES)."</td>";
38 echo "<td>".htmlspecialchars( $row['date'],ENT_NOQUOTES)."</td>";
39 echo "<td>".htmlspecialchars( $row['begdate'],ENT_NOQUOTES)."</td>";
40 echo "<td>".htmlspecialchars( $row['enddate'],ENT_NOQUOTES)."</td>";
41 echo "<td>".htmlspecialchars( $row['referredby'],ENT_NOQUOTES)."</td>";
42 echo "</tr>";
44 echo "</table>";
46 else
48 echo htmlspecialchars( xl("No Results"),ENT_NOQUOTES);