3 // Copyright (C) 2005 Rod Roark <rod@sunsetsystems.com>
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.
10 require_once("../../globals.php");
11 require_once($GLOBALS["srcdir"] . "/api.inc.php");
13 function hist_exam_plan_report($pid, $encounter, $cols, $id)
15 $cols = 1; // force always 1 column
17 $data = sqlQuery("SELECT *
18 FROM form_hist_exam_plan WHERE
19 id = ? AND activity = '1'", array($id));
21 print "<table cellpadding='0' cellspacing='0'>\n<tr>\n";
22 foreach ($data as $key => $value) {
24 $key == "id" ||
$key == "pid" ||
$key == "user" ||
$key == "groupname" ||
25 $key == "authorized" ||
$key == "activity" ||
$key == "date" ||
26 $value == "" ||
$value == "0" ||
$value == "0.00"
35 $key = ucwords(str_replace("_", " ", $key));
36 print "<td valign='top'><span class='bold'>" . text($key) . ": </span><span class='text'>" . text($value) . " </span></td>\n";
38 if ($count == $cols) {
40 print "</tr>\n<tr>\n";
44 print "</tr>\n</table>\n";