/
new.php
33 lines (28 loc) · 955 Bytes
/
new.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Encounter form new script.
*
* @package OpenEMR
* @link http://www.open-emr.org
* @author Brady Miller <brady.g.miller@gmail.com>
* @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
*/
require_once(__DIR__ . "/../../globals.php");
require_once("$srcdir/lists.inc.php");
require_once("$srcdir/patient.inc.php");
use OpenEMR\Common\Acl\AclMain;
// Check permission to create encounters.
$tmp = getPatientData($pid, "squad");
if (
($tmp['squad'] && ! AclMain::aclCheckCore('squads', $tmp['squad'])) ||
!AclMain::aclCheckForm('newpatient', '', array('write', 'addonly'))
) {
// TODO: why is this reversed?
echo "<body>\n<html>\n";
echo "<p>(" . xlt('New encounters not authorized') . ")</p>\n";
echo "</body>\n</html>\n";
exit();
}
$viewmode = false;
require_once("common.php");