8 * @link https://www.open-emr.org
9 * @author Brady Miller <Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2022 Brady Miller <Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
14 if (php_sapi_name() !== 'cli') {
15 echo "Only php cli can execute a command\n";
19 $siteDefault = 'default';
20 foreach ($argv as $arg) {
21 if (str_contains($arg, "--site=")) {
22 $siteDefault = explode("=", $arg)[1];
25 $_GET['site'] = $siteDefault;
28 // Since from command line, set $sessionAllowWrite since need to set site_id session and no benefit to set to false
29 $sessionAllowWrite = true;
30 require_once __DIR__
. '/../interface/globals.php';
32 use OpenEMR\Common\Command\AclModify
;
33 use OpenEMR\Common\Command\CcdaNewpatientImport
;
34 use OpenEMR\Common\Command\CcdaNewpatient
;
35 use OpenEMR\Common\Command\CcdaImport
;
36 use OpenEMR\Common\Command\Register
;
37 use OpenEMR\Common\Command\ZfcModule
;
38 use Symfony\Component\Console\Application
;
40 $app = new Application();
41 $app->add(new AclModify());
42 $app->add(new CcdaNewpatientImport());
43 $app->add(new CcdaNewpatient());
44 $app->add(new CcdaImport());
45 $app->add(new Register());
46 $app->add(new ZfcModule());