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