minor changes to prior commit
[openemr.git] / interface / patient_file / summary / vitals_fragment.php
blobdbf540388128ba4d0b223027398f2d4ef63310a4
1 <?php
2 /*******************************************************************************\
3 * Copyright (C) Brady Miller (brady.g.miller@gmail.com) *
4 * *
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. *
9 * *
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. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
18 ********************************************************************************/
22 require_once("../../globals.php");
25 <div id='vitals' style='margin-top: 3px; margin-left: 10px; margin-right: 10px'><!--outer div-->
26 <br>
27 <?php
28 //retrieve most recent set of vitals.
29 $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));
31 if (!$result) { //If there are no disclosures recorded
33 <span class='text'> <?php echo htmlspecialchars(xl("No vitals have been documented."), ENT_NOQUOTES);
35 </span>
36 <?php
37 } else {
38 ?>
39 <span class='text'><b>
40 <?php echo htmlspecialchars(xl('Most recent vitals from:')." ".$result['date'], ENT_NOQUOTES); ?>
41 </b></span>
42 <br />
43 <br />
44 <?php include_once($GLOBALS['incdir'] . "/forms/vitals/report.php");
45 call_user_func("vitals_report", '', '', 2, $result['id']);
46 ?> <span class='text'>
47 <br />
48 <a href='../encounter/trend_form.php?formname=vitals' onclick='top.restoreSession()'><?php echo htmlspecialchars(xl('Click here to view and graph all vitals.'), ENT_NOQUOTES);?></a>
49 </span><?php
50 } ?>
51 <br />
52 <br />
53 </div>