Merge branch 'master' of https://github.com/openemr/openemr into signer-templates
[openemr.git] / portal / patient / _app_config.php
blobb4d527a30f37ab68fb452bfb0634e469abcdde0e
1 <?php
2 /**
3 * @package Portal
5 * APPLICATION-WIDE CONFIGURATION SETTINGS
7 * This file contains application-wide configuration settings. The settings
8 * here will be the same regardless of the machine on which the app is running.
10 * This configuration should be added to version control.
12 * No settings should be added to this file that would need to be changed
13 * on a per-machine basic (ie local, staging or production). Any
14 * machine-specific settings should be added to _machine_config.php
16 * From phreeze package
17 * @license http://www.gnu.org/copyleft/lesser.html LGPL
21 /**
22 * APPLICATION ROOT DIRECTORY
23 * If the application doesn't detect this correctly then it can be set explicitly
25 if (! GlobalConfig::$APP_ROOT) {
26 GlobalConfig::$APP_ROOT = realpath("./");
29 /**
30 * check is needed to ensure asp_tags is not enabled
32 if (ini_get('asp_tags')) {
33 die('<h3>Server Configuration Problem: asp_tags is enabled, but is not compatible with Savant.</h3>' . '<p>You can disable asp_tags in .htaccess, php.ini or generate your app with another template engine such as Smarty.</p>');
36 /**
37 * INCLUDE PATH
38 * Adjust the include path as necessary so PHP can locate required libraries
40 set_include_path(GlobalConfig::$APP_ROOT . '/libs/' . PATH_SEPARATOR . GlobalConfig::$APP_ROOT . '/fwk/libs' . PATH_SEPARATOR . get_include_path());
42 /**
43 * COMPOSER AUTOLOADER
44 * Uncomment if Composer is being used to manage dependencies
46 // $loader = require 'vendor/autoload.php';
47 // $loader->setUseIncludePath(true);
49 /**
50 * SESSION CLASSES
51 * Any classes that will be stored in the session can be added here
52 * and will be pre-loaded on every page
54 //require_once "App/SecureApp.php";
56 /**
57 * RENDER ENGINE
58 * You can use any template system that implements
59 * IRenderEngine for the view layer.
60 * Phreeze provides pre-built
61 * implementations for Smarty, Savant and plain PHP.
63 require_once 'verysimple/Phreeze/SavantRenderEngine.php';
64 GlobalConfig::$TEMPLATE_ENGINE = 'SavantRenderEngine';
65 GlobalConfig::$TEMPLATE_PATH = GlobalConfig::$APP_ROOT . '/templates/';
67 /**
68 * ROUTE MAP
69 * The route map connects URLs to Controller+Method and additionally maps the
70 * wildcards to a named parameter so that they are accessible inside the
71 * Controller without having to parse the URL for parameters such as IDs
73 GlobalConfig::$ROUTE_MAP = array (
75 // default controller when no route specified
76 // 'GET:' => array('route' => 'Default.Home'),
77 'GET:' => array (
78 'route' => 'Provider.Home'
80 'GET:provider' => array (
81 'route' => 'Provider.Home'
84 // authentication routes
85 'GET:loginform' => array (
86 'route' => 'SecureApp.LoginForm'
88 'POST:login' => array (
89 'route' => 'SecureApp.Login'
91 'GET:secureuser' => array (
92 'route' => 'SecureApp.UserPage'
94 'GET:secureadmin' => array (
95 'route' => 'SecureApp.AdminPage'
97 'GET:logout' => array (
98 'route' => 'SecureApp.Logout'
101 // Patient
102 'GET:patientdata' => array (
103 'route' => 'Patient.ListView'
105 'GET:patient/(:num)' => array (
106 'route' => 'Patient.SingleView',
107 'params' => array (
108 'id' => 1
111 'GET:api/patientdata' => array (
112 'route' => 'Patient.Query'
114 'POST:api/patient' => array (
115 'route' => 'Patient.Create'
117 'GET:api/patient/(:num)' => array (
118 'route' => 'Patient.Read',
119 'params' => array (
120 'id' => 2
123 'PUT:api/patient/(:num)' => array (
124 'route' => 'Patient.Update',
125 'params' => array (
126 'id' => 2
129 'DELETE:api/patient/(:num)' => array (
130 'route' => 'Patient.Delete',
131 'params' => array (
132 'id' => 2
135 'PUT:api/portalpatient/(:num)' => array (
136 'route' => 'PortalPatient.Update',
137 'params' => array (
138 'id' => 2
141 'GET:api/portalpatient/(:num)' => array (
142 'route' => 'PortalPatient.Read',
143 'params' => array (
144 'id' => 2
148 // OnsiteDocument
149 'GET:onsitedocuments' => array (
150 'route' => 'OnsiteDocument.ListView'
152 'GET:onsitedocument/(:num)' => array (
153 'route' => 'OnsiteDocument.SingleView',
154 'params' => array (
155 'id' => 1
158 'GET:api/onsitedocuments' => array (
159 'route' => 'OnsiteDocument.Query'
161 'POST:api/onsitedocument' => array (
162 'route' => 'OnsiteDocument.Create'
164 'GET:api/onsitedocument/(:num)' => array (
165 'route' => 'OnsiteDocument.Read',
166 'params' => array (
167 'id' => 2
170 'PUT:api/onsitedocument/(:num)' => array (
171 'route' => 'OnsiteDocument.Update',
172 'params' => array (
173 'id' => 2
176 'DELETE:api/onsitedocument/(:num)' => array (
177 'route' => 'OnsiteDocument.Delete',
178 'params' => array (
179 'id' => 2
183 // OnsitePortalActivity
184 'GET:onsiteportalactivities' => array (
185 'route' => 'OnsitePortalActivity.ListView'
187 'GET:onsiteportalactivity/(:num)' => array (
188 'route' => 'OnsitePortalActivity.SingleView',
189 'params' => array (
190 'id' => 1
193 'GET:api/onsiteportalactivities' => array (
194 'route' => 'OnsitePortalActivity.Query'
196 'POST:api/onsiteportalactivity' => array (
197 'route' => 'OnsitePortalActivity.Create'
199 'GET:api/onsiteportalactivity/(:num)' => array (
200 'route' => 'OnsitePortalActivity.Read',
201 'params' => array (
202 'id' => 2
205 'PUT:api/onsiteportalactivity/(:num)' => array (
206 'route' => 'OnsitePortalActivity.Update',
207 'params' => array (
208 'id' => 2
211 'DELETE:api/onsiteportalactivity/(:num)' => array (
212 'route' => 'OnsitePortalActivity.Delete',
213 'params' => array (
214 'id' => 2
217 // OnsiteActivityView
218 'GET:onsiteactivityviews' => array (
219 'route' => 'OnsiteActivityView.ListView'
221 'GET:onsiteactivityview/(:any)' => array (
222 'route' => 'OnsiteActivityView.SingleView',
223 'params' => array (
224 'id' => 1
227 'GET:api/onsiteactivityviews' => array (
228 'route' => 'OnsiteActivityView.Query'
230 'POST:api/onsiteactivityview' => array (
231 'route' => 'OnsiteActivityView.Create'
233 'GET:api/onsiteactivityview/(:any)' => array (
234 'route' => 'OnsiteActivityView.Read',
235 'params' => array (
236 'id' => 2
239 'PUT:api/onsiteactivityview/(:any)' => array (
240 'route' => 'OnsiteActivityView.Update',
241 'params' => array (
242 'id' => 2
245 'DELETE:api/onsiteactivityview/(:any)' => array (
246 'route' => 'OnsiteActivityView.Delete',
247 'params' => array (
248 'id' => 2
252 // User
253 'GET:users' => array (
254 'route' => 'User.ListView'
256 'GET:user/(:num)' => array (
257 'route' => 'User.SingleView',
258 'params' => array (
259 'id' => 1
262 'GET:api/users' => array (
263 'route' => 'User.Query'
265 'POST:api/user' => array (
266 'route' => 'User.Create'
268 'GET:api/user/(:num)' => array (
269 'route' => 'User.Read',
270 'params' => array (
271 'id' => 2
274 'PUT:api/user/(:num)' => array (
275 'route' => 'User.Update',
276 'params' => array (
277 'id' => 2
280 'DELETE:api/user/(:num)' => array (
281 'route' => 'User.Delete',
282 'params' => array (
283 'id' => 2
287 // UsersFacility
288 'GET:usersfacilities' => array (
289 'route' => 'UsersFacility.ListView'
291 'GET:usersfacility/(:any)' => array (
292 'route' => 'UsersFacility.SingleView',
293 'params' => array (
294 'tablename' => 1
297 'GET:api/usersfacilities' => array (
298 'route' => 'UsersFacility.Query'
300 'POST:api/usersfacility' => array (
301 'route' => 'UsersFacility.Create'
303 'GET:api/usersfacility/(:any)' => array (
304 'route' => 'UsersFacility.Read',
305 'params' => array (
306 'tablename' => 2
309 'PUT:api/usersfacility/(:any)' => array (
310 'route' => 'UsersFacility.Update',
311 'params' => array (
312 'tablename' => 2
315 'DELETE:api/usersfacility/(:any)' => array (
316 'route' => 'UsersFacility.Delete',
317 'params' => array (
318 'tablename' => 2
322 // catch any broken API urls
323 'GET:api/(:any)' => array (
324 'route' => 'Provider.ErrorApi404'
326 'PUT:api/(:any)' => array (
327 'route' => 'Provider.ErrorApi404'
329 'POST:api/(:any)' => array (
330 'route' => 'Provider.ErrorApi404'
332 'DELETE:api/(:any)' => array (
333 'route' => 'Provider.ErrorApi404'