Highway to PSR2
[openemr.git] / interface / forms / newpatient / report.php
blob516e5f44c5ce2a41d661d658b10247f86466cb8e
1 <?php
2 /**
3 * Encounter form report function.
5 * LICENSE: 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.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
16 * @package OpenEMR
17 * @author Brady Miller <brady.g.miller@gmail.com>
18 * @link http://www.open-emr.org
21 include_once(dirname(__file__)."/../../globals.php");
23 function newpatient_report($pid, $encounter, $cols, $id)
25 $res = sqlStatement("select e.*, f.name as facility_name from form_encounter as e join facility as f on f.id = e.facility_id where e.pid=? and e.id=?", array($pid,$id));
26 print "<table><tr><td>\n";
27 while ($result = sqlFetchArray($res)) {
28 print "<span class=bold>" . xlt('Facility') . ": </span><span class=text>" . text($result{"facility_name"}) . "</span><br>\n";
29 if (acl_check('sensitivities', $result['sensitivity'])) {
30 print "<span class=bold>" . xlt('Reason') . ": </span><span class=text>" . nl2br(text($result{"reason"})) . "</span><br>\n";
34 print "</td></tr></table>\n";