Highway to PSR2
[openemr.git] / interface / forms / aftercare_plan / report.php
blobac4d735ab08253e99c2ef3f6ff4a971336a57f07
1 <?php
2 /**
4 * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
6 * LICENSE: 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 3
9 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
17 * @package OpenEMR
18 * @author Naina Mohamed <naina@capminds.com>
19 * @link http://www.open-emr.org
23 include_once(dirname(__FILE__).'/../../globals.php');
24 include_once($GLOBALS["srcdir"]."/api.inc");
25 function aftercare_plan_report($pid, $encounter, $cols, $id)
27 $count = 0;
28 $data = formFetch("form_aftercare_plan", $id);
29 if ($data) {
30 print "<table><tr>";
31 foreach ($data as $key => $value) {
32 if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
33 continue;
36 if ($value == "on") {
37 $value = "yes";
40 $key=ucwords(str_replace("_", " ", $key));
41 print "<td><span class=bold>".xlt($key). ": </span><span class=text>".text($value)."</span></td>";
42 $count++;
43 if ($count == $cols) {
44 $count = 0;
45 print "</tr><tr>\n";
50 print "</tr></table>";