2 /*******************************************************************************\
3 * Copyright 2010 Brady Miller <brady@sparmy.com> *
4 * Copyright 2011 Rod Roark <rod@sunsetsystems.com> *
6 * This program is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU General Public License *
8 * as published by the Free Software Foundation; either version 2 *
9 * 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. *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the Free Software *
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ********************************************************************************/
21 //SANITIZE ALL ESCAPES
22 $sanitize_all_escapes = true;
24 //STOP FAKE REGISTER GLOBALS
25 $fake_register_globals = false;
27 require_once("../../globals.php");
29 $lbf_form_id = $_GET['formname'];
31 <div id
='<?php echo $lbf_form_id; ?>' style
='margin-top: 3px; margin-left: 10px; margin-right: 10px'>
34 // Retrieve most recent instance of this form for this patient.
35 $result = sqlQuery("SELECT date, form_id, form_name FROM forms WHERE pid = ? " .
36 "AND formdir = ? AND deleted = 0 ORDER BY date DESC LIMIT 1",
37 array($pid, $lbf_form_id));
39 if (!$result) { //If there are none
41 <span
class='text'> <?php
echo htmlspecialchars(xl("None have been documented"), ENT_NOQUOTES
); ?
>
44 <span
class='text'><b
>
46 echo htmlspecialchars(xl('Most recent from') . ": " .
47 substr($result['date'], 0, 10), ENT_NOQUOTES
);
53 include_once($GLOBALS['incdir'] . "/forms/LBF/report.php");
54 call_user_func("lbf_report", '', '', 2, $result['form_id'], $lbf_form_id);
58 <a href
='../encounter/trend_form.php?formname=<?php echo $lbf_form_id; ?>'
59 onclick
='top.restoreSession()'>
60 <?php
echo htmlspecialchars(xl('Click here to view and graph'),ENT_NOQUOTES
);?
>