Merge pull request #7679 from bradymiller/fix-ci_10
[openemr.git] / interface / forms / note / report.php
blob7b3953884c580bd209f4be10e800fc0db99840de
1 <?php
3 /*
4 * Work/School Note Form report.php
6 * @package OpenEMR
7 * @link http://www.open-emr.org
8 * @author Nikolai Vitsyn
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2004-2005 Nikolai Vitsyn
11 * @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
12 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
17 require_once(dirname(__FILE__) . '/../../globals.php');
18 require_once($GLOBALS["srcdir"] . "/api.inc.php");
20 function note_report($pid, $encounter, $cols, $id)
22 $count = 0;
23 $data = formFetch("form_note", $id);
24 if ($data) {
25 print "<table><tr>";
26 foreach ($data as $key => $value) {
27 if (
28 $key == "id" ||
29 $key == "pid" ||
30 $key == "user" ||
31 $key == "groupname" ||
32 $key == "authorized" ||
33 $key == "activity" ||
34 $key == "date" ||
35 $value == "" ||
36 $value == "0000-00-00 00:00:00"
37 ) {
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 } elseif ($key == "Date Of Signature") {
51 print "<td><span class=bold>" . xlt($key) . ": </span><span class=text>" . oeFormatShortDate($value) . "</span></td>";
52 } else {
53 print "<td><span class=bold>" . xlt($key) . ": </span><span class=text>" . text($value) . "</span></td>";
56 $count++;
57 if ($count == $cols) {
58 $count = 0;
59 print "</tr><tr>\n";
64 print "</tr></table>";