/
C_PracticeSettings.class.php
168 lines (125 loc) · 6.08 KB
/
C_PracticeSettings.class.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
use OpenEMR\Common\Acl\AclMain;
use OpenEMR\Common\Twig\TwigContainer;
class C_PracticeSettings extends Controller
{
var $template_mod;
var $direction;
function __construct($template_mod = "general")
{
parent::__construct();
$this->template_mod = $template_mod;
$this->assign("FORM_ACTION", $GLOBALS['webroot'] . "/controller.php?" . attr($_SERVER['QUERY_STRING']));
$this->assign("TOP_ACTION", $GLOBALS['webroot'] . "/controller.php?" . "practice_settings" . "&");
$this->assign("STYLE", $GLOBALS['style']);
$this->direction = ($GLOBALS['_SESSION']['language_direction'] == 'rtl') ? 'right' : 'left';
if (!AclMain::aclCheckCore('admin', 'practice')) {
echo (new TwigContainer(null, $GLOBALS['kernel']))->getTwig()->render('core/unauthorized.html.twig', ['pageTitle' => xl("Practice Settings")]);
exit;
}
}
function default_action($display = "")
{
$this->assign("display", $display);
$this->assign("direction", $this->direction);
$this->display($GLOBALS['template_dir'] . "practice_settings/" . $this->template_mod . "_list.html");
}
function pharmacy_action($arg)
{
$c = new Controller();
//this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
//and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
//and value passing
$fga = func_get_args();
$fga = array_slice($fga, 1);
$args = array_merge(array("pharmacy" => "", $arg => ""), $fga);
$this->assign("direction", $this->direction);
$display = $c->act($args);
$this->assign("ACTION_NAME", xl("Pharmacies"));
$this->default_action($display);
}
function insurance_company_action($arg)
{
$c = new Controller();
//this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
//and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
//and value passing
$fga = func_get_args();
$fga = array_slice($fga, 1);
$args = array_merge(array("insurance_company" => "", $arg => ""), $fga);
$display = $c->act($args);
$this->assign("direction", $this->direction);
$this->assign("ACTION_NAME", xl("Insurance Companies"));
$this->default_action($display);
}
function insurance_numbers_action($arg)
{
$c = new Controller();
//this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
//and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
//and value passing
$fga = func_get_args();
$fga = array_slice($fga, 1);
$args = array_merge(array("insurance_numbers" => "", $arg => ""), $fga);
$display = $c->act($args);
$this->assign("ACTION_NAME", xl("Insurance Numbers"));
$this->assign("direction", $this->direction);
$this->default_action($display);
}
function document_action($arg)
{
$c = new Controller();
//this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
//and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
//and value passing
$fga = func_get_args();
$fga = array_slice($fga, 1);
$args = array_merge(array("document" => "", $arg => ""), $fga);
$display = $c->act($args);
$this->assign("ACTION_NAME", xl("Documents"));
$this->assign("direction", $this->direction);
$this->default_action($display);
}
function document_category_action($arg)
{
$c = new Controller();
//this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
//and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
//and value passing
$fga = func_get_args();
$fga = array_slice($fga, 1);
$args = array_merge(array("document_category" => "", $arg => ""), $fga);
$display = $c->act($args);
$this->assign("ACTION_NAME", xl("Documents"));
$this->assign("direction", $this->direction);
$this->default_action($display);
}
function x12_partner_action($arg)
{
$c = new Controller();
//this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
//and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
//and value passing
$fga = func_get_args();
$fga = array_slice($fga, 1);
$args = array_merge(array("x12_partner" => "", $arg => ""), $fga);
$display = $c->act($args);
$this->assign("ACTION_NAME", xl("X12 Partners"));
$this->assign("direction", $this->direction);
$this->default_action($display);
}
function hl7_action($arg)
{
$c = new Controller();
//this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
//and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
//and value passing
$fga = func_get_args();
$fga = array_slice($fga, 1);
$args = array_merge(array("hl7" => "", $arg => ""), $fga);
$display = $c->act($args);
$this->assign("ACTION_NAME", xl("HL7 Viewer"));
$this->assign("direction", $this->direction);
$this->default_action($display);
}
}