Questionnaire encounter report (#5757)
[openemr.git] / portal / get_medications.php
blob95dc688304198897fb3d813e0ad9e6658d7e2871
1 <?php
3 /**
5 * Copyright (C) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
6 * Copyright (C) 2011 Cassian LUP <cassi.lup@gmail.com>
8 * LICENSE: This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 3
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
19 * @package OpenEMR
20 * @author Cassian LUP <cassi.lup@gmail.com>
21 * @author Jerry Padgett <sjpadgett@gmail.com>
22 * @link http://www.open-emr.org
26 require_once("verify_session.php");
28 $sql = "SELECT * FROM lists WHERE pid = ? AND type = 'medication' ORDER BY begdate";
30 $res = sqlStatement($sql, array($pid));
32 if (sqlNumRows($res) > 0) {
34 <table class="table table-striped">
35 <tr>
36 <th><?php echo xlt('Drug'); ?></th>
37 <th><?php echo xlt('Start Date'); ?></th>
38 <th><?php echo xlt('End Date'); ?></th>
39 <th><?php echo xlt('Referrer'); ?></th>
40 </tr>
41 <?php
42 $even = false;
43 while ($row = sqlFetchArray($res)) {
44 echo "<tr class='" . text($class ?? '') . "'>";
45 echo "<td>" . text($row['title']) . "</td>";
46 echo "<td>" . text($row['begdate']) . "</td>";
47 echo "<td>" . text($row['enddate']) . "</td>";
48 echo "<td>" . text($row['referredby']) . "</td>";
49 echo "</tr>";
52 echo "</table>";
53 } else {
54 echo xlt("No Results");