The Third Reminders email bug fix - contributed by arnabnaha
[openemr.git] / interface / patient_file / summary / vitals_fragment.php
blob8393ff460d0e68739780f73efe29a379dacdddf6
1 <?php
2 /*******************************************************************************\
3 * Copyright (C) Brady Miller (brady@sparmy.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 ********************************************************************************/
20 //SANITIZE ALL ESCAPES
21 $sanitize_all_escapes=true;
24 //STOP FAKE REGISTER GLOBALS
25 $fake_register_globals=false;
28 require_once("../../globals.php");
31 <div id='vitals' style='margin-top: 3px; margin-left: 10px; margin-right: 10px'><!--outer div-->
32 <br>
33 <?php
34 //retrieve most recent set of vitals.
35 $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) );
37 if ( !$result ) //If there are no disclosures recorded
38 { ?>
39 <span class='text'> <?php echo htmlspecialchars(xl("No vitals have been documented."),ENT_NOQUOTES);
41 </span>
42 <?php
43 } else
45 ?>
46 <span class='text'><b>
47 <?php echo htmlspecialchars(xl('Most recent vitals from:')." ".$result['date'],ENT_NOQUOTES); ?>
48 </b></span>
49 <br />
50 <br />
51 <?php include_once($GLOBALS['incdir'] . "/forms/vitals/report.php");
52 call_user_func("vitals_report", '', '', 2, $result['id']);
53 ?> <span class='text'>
54 <br />
55 <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>
56 </span><?php
57 } ?>
58 <br />
59 <br />
60 </div>