Highway to PSR2
[openemr.git] / interface / forms / note / report.php
blobb2d55e83bca53d9431ea6c490507d3509d876c7c
1 <?php
2 /**
3 * Work/School Note Form created by Nikolai Vitsyn: 2004/02/13 and update 2005/03/30
4 * Copyright (C) Open Source Medical Software
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 include_once(dirname(__FILE__).'/../../globals.php');
21 include_once($GLOBALS["srcdir"]."/api.inc");
22 function note_report($pid, $encounter, $cols, $id)
24 $count = 0;
25 $data = formFetch("form_note", $id);
26 if ($data) {
27 print "<table><tr>";
28 foreach ($data as $key => $value) {
29 if ($key == "id" ||
30 $key == "pid" ||
31 $key == "user" ||
32 $key == "groupname" ||
33 $key == "authorized" ||
34 $key == "activity" ||
35 $key == "date" ||
36 $value == "" ||
37 $value == "0000-00-00 00:00:00") {
38 continue;
41 if ($value == "on") {
42 $value = "yes";
45 $key=ucwords(str_replace("_", " ", $key));
46 print("<tr>\n");
47 print("<tr>\n");
48 if ($key == "Note Type") {
49 print "<td><span class=bold>" . xlt($key) . ": </span><span class=text>" . xlt($value) . "</span></td>";
50 } else {
51 print "<td><span class=bold>" . xlt($key) . ": </span><span class=text>" . text($value) . "</span></td>";
54 $count++;
55 if ($count == $cols) {
56 $count = 0;
57 print "</tr><tr>\n";
62 print "</tr></table>";