Highway to PSR2
[openemr.git] / interface / forms / newpatient / new.php
blobffbbf1dca9f812f3f76b4bfce7fa0d67e9f6e003
1 <?php
2 /**
3 * Encounter form new script.
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
24 include_once("../../globals.php");
25 include_once("$srcdir/acl.inc");
26 include_once("$srcdir/lists.inc");
28 // Check permission to create encounters.
29 $tmp = getPatientData($pid, "squad");
30 if (($tmp['squad'] && ! acl_check('squads', $tmp['squad'])) ||
31 !acl_check_form('newpatient', '', array('write', 'addonly'))) {
32 echo "<body>\n<html>\n";
33 echo "<p>(" . xlt('New encounters not authorized') . ")</p>\n";
34 echo "</body>\n</html>\n";
35 exit();
38 $viewmode = false;
39 require_once("common.php");