4 * Functions to globally validate and prepare data for sql database insertion.
7 * @link http://www.open-emr.org
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @author Rod Roark <rod@sunsetsystems.com>
10 * @copyright Copyright (c) 2010-2018 Brady Miller <brady.g.miller@gmail.com>
11 * @copyright Copyright (c) 2011 Rod Roark <rod@sunsetsystems.com>
12 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
15 require_once("../../globals.php");
17 use OpenEMR\Common\Csrf\CsrfUtils
;
19 if (!CsrfUtils
::verifyCsrfToken($_POST["csrf_token_form"])) {
20 CsrfUtils
::csrfNotVerified();
23 $lbf_form_id = $_GET['formname'];
25 <div id
='<?php echo attr($lbf_form_id); ?>' style
='margin-top: 3px; margin-left: 10px; margin-right: 10px'>
28 // Retrieve most recent instance of this form for this patient.
30 "SELECT f.form_id, f.form_name, fe.date " .
31 "FROM forms AS f, form_encounter AS fe WHERE " .
32 "f.pid = ? AND f.formdir = ? AND " .
33 "f.deleted = 0 AND " .
34 "fe.pid = f.pid AND fe.encounter = f.encounter " .
35 "ORDER BY fe.date DESC, f.encounter DESC, f.date DESC " .
37 array($pid, $lbf_form_id)
40 if (!$result) { //If there are none
42 <span
class='text'> <?php
echo xlt("None have been documented"); ?
>
45 <span
class='text'><b
>
47 echo text(xl('Most recent from') . ": " .
48 oeFormatShortDate(substr($result['date'], 0, 10)));
54 include_once($GLOBALS['incdir'] . "/forms/LBF/report.php");
55 lbf_report('', '', 2, $result['form_id'], $lbf_form_id);
59 <a href
='../encounter/trend_form.php?formname=<?php echo attr_url($lbf_form_id); ?>' onclick
='top.restoreSession()'>
60 <?php
echo xlt('Click here to view and graph'); ?
>