Billing Manager and Some Module fixes (#7747)
[openemr.git] / interface / patient_file / summary / vitals_fragment.php
blob8da9c061bb8ea521c5ffcf44d382c27e14f73cad
1 <?php
3 /**
4 * vitals_fragment.php
6 * @package OpenEMR
7 * @link http://www.open-emr.org
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2018 Brady Miller <brady.g.miller@gmail.com>
10 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 require_once("../../globals.php");
15 use OpenEMR\Common\Csrf\CsrfUtils;
17 if (!CsrfUtils::verifyCsrfToken($_POST["csrf_token_form"])) {
18 CsrfUtils::csrfNotVerified();
22 <div id='vitals''><!--outer div-->
23 <?php
24 //retrieve most recent set of vitals.
25 $result = sqlQuery("SELECT FORM_VITALS.date, FORM_VITALS.id FROM form_vitals AS FORM_VITALS LEFT JOIN forms AS FORMS ON FORM_VITALS.id = FORMS.form_id WHERE FORM_VITALS.pid=? AND FORMS.deleted != '1' ORDER BY FORM_VITALS.date DESC", array($pid));
27 if (!$result) { //If there are no disclosures recorded
29 <span class='text'> <?php echo xlt("No vitals have been documented.");
31 </span>
32 <?php
33 } else {
35 <span class='text'><b>
36 <?php echo xlt('Most recent vitals from:') . " " . text($result['date']); ?>
37 </b></span>
38 <br />
39 <br />
40 <?php include_once($GLOBALS['incdir'] . "/forms/vitals/report.php");
41 vitals_report('', '', 1, $result['id']);
42 ?> <span class='text'>
43 <br />
44 <a href='../encounter/trend_form.php?formname=vitals' onclick='top.restoreSession()'><?php echo xlt('Click here to view and graph all vitals.');?></a>
45 </span><?php
46 } ?>
47 </div>