Fee sheet and Codes revenue code (#7415)
[openemr.git] / controllers / C_PracticeSettings.class.php
blob820f22b141a12c5c11c156ce6a33b63258af1308
1 <?php
3 use OpenEMR\Common\Acl\AclMain;
4 use OpenEMR\Common\Twig\TwigContainer;
6 class C_PracticeSettings extends Controller
8 var $template_mod;
10 var $direction;
12 function __construct($template_mod = "general")
14 parent::__construct();
15 $this->template_mod = $template_mod;
16 $this->assign("FORM_ACTION", $GLOBALS['webroot'] . "/controller.php?" . attr($_SERVER['QUERY_STRING']));
17 $this->assign("TOP_ACTION", $GLOBALS['webroot'] . "/controller.php?" . "practice_settings" . "&");
18 $this->assign("STYLE", $GLOBALS['style']);
19 $this->direction = ($GLOBALS['_SESSION']['language_direction'] == 'rtl') ? 'right' : 'left';
21 if (!AclMain::aclCheckCore('admin', 'practice')) {
22 echo (new TwigContainer(null, $GLOBALS['kernel']))->getTwig()->render('core/unauthorized.html.twig', ['pageTitle' => xl("Practice Settings")]);
23 exit;
27 function default_action($display = "")
29 $this->assign("display", $display);
30 $this->assign("direction", $this->direction);
31 $this->display($GLOBALS['template_dir'] . "practice_settings/" . $this->template_mod . "_list.html");
34 function pharmacy_action($arg)
36 $c = new Controller();
38 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
39 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
40 //and value passing
42 $fga = func_get_args();
44 $fga = array_slice($fga, 1);
45 $args = array_merge(array("pharmacy" => "", $arg => ""), $fga);
46 $this->assign("direction", $this->direction);
47 $display = $c->act($args);
48 $this->assign("ACTION_NAME", xl("Pharmacies"));
49 $this->default_action($display);
52 function insurance_company_action($arg)
54 $c = new Controller();
56 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
57 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
58 //and value passing
60 $fga = func_get_args();
62 $fga = array_slice($fga, 1);
63 $args = array_merge(array("insurance_company" => "", $arg => ""), $fga);
65 $display = $c->act($args);
66 $this->assign("direction", $this->direction);
67 $this->assign("ACTION_NAME", xl("Insurance Companies"));
68 $this->default_action($display);
71 function insurance_numbers_action($arg)
73 $c = new Controller();
75 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
76 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
77 //and value passing
79 $fga = func_get_args();
81 $fga = array_slice($fga, 1);
82 $args = array_merge(array("insurance_numbers" => "", $arg => ""), $fga);
84 $display = $c->act($args);
86 $this->assign("ACTION_NAME", xl("Insurance Numbers"));
87 $this->assign("direction", $this->direction);
88 $this->default_action($display);
91 function document_action($arg)
93 $c = new Controller();
95 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
96 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
97 //and value passing
99 $fga = func_get_args();
101 $fga = array_slice($fga, 1);
102 $args = array_merge(array("document" => "", $arg => ""), $fga);
104 $display = $c->act($args);
106 $this->assign("ACTION_NAME", xl("Documents"));
107 $this->assign("direction", $this->direction);
108 $this->default_action($display);
111 function document_category_action($arg)
113 $c = new Controller();
115 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
116 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
117 //and value passing
119 $fga = func_get_args();
121 $fga = array_slice($fga, 1);
122 $args = array_merge(array("document_category" => "", $arg => ""), $fga);
124 $display = $c->act($args);
126 $this->assign("ACTION_NAME", xl("Documents"));
127 $this->assign("direction", $this->direction);
128 $this->default_action($display);
131 function x12_partner_action($arg)
133 $c = new Controller();
135 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
136 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
137 //and value passing
139 $fga = func_get_args();
141 $fga = array_slice($fga, 1);
142 $args = array_merge(array("x12_partner" => "", $arg => ""), $fga);
144 $display = $c->act($args);
146 $this->assign("ACTION_NAME", xl("X12 Partners"));
147 $this->assign("direction", $this->direction);
148 $this->default_action($display);
152 function hl7_action($arg)
154 $c = new Controller();
156 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
157 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
158 //and value passing
160 $fga = func_get_args();
161 $fga = array_slice($fga, 1);
162 $args = array_merge(array("hl7" => "", $arg => ""), $fga);
163 $display = $c->act($args);
164 $this->assign("ACTION_NAME", xl("HL7 Viewer"));
165 $this->assign("direction", $this->direction);
166 $this->default_action($display);