2 /*******************************************************************************\
3 * Copyright (C) 2014 Joe Slam (joe@produnis.de) *
5 * This program is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU General Public License *
7 * as published by the Free Software Foundation; either version 2 *
8 * of the License, or (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * 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, *
17 * see <http://opensource.org/licenses/gpl-license.php> *
18 ********************************************************************************
20 * @author Joe Slam <joe@produnis.de>
21 * @link http://www.open-emr.org
27 require_once("../../globals.php");
30 <div id
='labdata' style
='margin-top: 3px; margin-left: 10px; margin-right: 10px'><!--outer div
-->
34 $spell = "SELECT form_name, MAX(form_track_anything_results.track_timestamp) as maxdate, form_id " .
36 "JOIN form_track_anything_results ON forms.form_id = form_track_anything_results.track_anything_id " .
37 "WHERE forms.pid = ? " .
39 "GROUP BY form_name " .
40 "ORDER BY maxdate DESC ";
41 $result = sqlQuery($spell, array($pid, 'track_anything'));
42 if (!$result) { //If there are no disclosures recorded
44 <span
class='text'> <?php
echo htmlspecialchars(xl("No tracks have been documented."), ENT_NOQUOTES
);
48 } else { // We have some tracks here...
49 echo "<span class='text'>";
50 echo xlt('Available Tracks') . ":";
53 $result=sqlStatement($spell, array($pid, 'track_anything'));
54 while ($myrow = sqlFetchArray($result)) {
55 $formname = $myrow['form_name'];
56 $thedate = $myrow['maxdate'];
57 $formid = $myrow['form_id'];
58 echo "<li><a href='../../forms/track_anything/history.php?formid=" . attr($formid) . "'>" . text($formname) . "</a></li> (" . text($thedate) . ")</li>";