6 * @link http://www.open-emr.org
7 * @author Joe Slam <joe@produnis.de>
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2014 Joe Slam <joe@produnis.de>
10 * @copyright Copyright (c) 2018 Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
15 require_once("../../globals.php");
17 if (!verifyCsrfToken($_POST["csrf_token_form"])) {
22 <div id
='labdata' style
='margin-top: 3px; margin-left: 10px; margin-right: 10px'><!--outer div
-->
25 //retrieve most recent set of labdata.
26 $spell = "SELECT procedure_report.date_collected AS thedate, " .
27 "procedure_order_code.procedure_name AS theprocedure, " .
28 "procedure_order.encounter_id AS theencounter " .
29 "FROM procedure_report " .
30 "JOIN procedure_order ON procedure_report.procedure_order_id = procedure_order.procedure_order_id " .
31 "JOIN procedure_order_code ON procedure_order.procedure_order_id = procedure_order_code.procedure_order_id " .
32 "WHERE procedure_order.patient_id = ? " .
33 "ORDER BY procedure_report.date_collected DESC ";
34 $result=sqlQuery($spell, array($pid));
36 if (!$result) { //If there are no lab data recorded
38 <span
class='text'> <?php
echo xlt("No lab data documented.");
44 <span
class='text'><b
>
45 <?php
echo xlt('Most recent lab data:'); ?
>
49 echo xlt('Procedure') . ": " . text($result['theprocedure']) . " (" . text($result['thedate']) . ")<br>";
50 echo xlt('Encounter') . ": <a href='../../patient_file/encounter/encounter_top.php?set_encounter=" . attr_url($result['theencounter']) . "' target='RBot'>" . text($result['theencounter']) . "</a>";
53 </span
><span
class='text'>
55 <a href
='../summary/labdata.php' onclick
='top.restoreSession()'><?php
echo xlt('Click here to view and graph all labdata.');?
></a
>