Refactor previous name into dedicated service (#7571)
[openemr.git] / contrib / forms / ped_GI / report.php
blob79b81a17cd05e1290cfb8fd654a6f638293d2639
1 <?php
3 //
5 require_once("../../globals.php");
6 require_once($GLOBALS["srcdir"] . "/api.inc.php");
8 function ped_GI_report($pid, $encounter, $cols, $id)
10 $count = 0;
11 $data = formFetch("form_ped_GI", $id);
12 if ($data) :
13 print "<table span class=text><tr>";
14 foreach ($data as $key => $value) {
15 if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
16 continue;
19 if ($value == "on") {
20 $value = "yes";
23 $key = ucwords(str_replace("_", " ", $key));
25 print "<td><span class=bold>" . text($key) . ": </span><span class=text>" . text($value) . "</span></td>";
27 $count++;
28 if ($count == $cols) {
29 $count = 0;
30 print "</tr><tr>\n";
34 print "</tr></table>";
35 endif;