Fee sheet and Codes revenue code (#7415)
[openemr.git] / interface / therapy_groups / index.php
blob564a13f4e86c9fe22ae14c399614aa2c71f2470d
1 <?php
3 /**
4 * interface/therapy_groups/index.php routing for therapy groups
6 * Contains the routing for therapy groups controllers.
8 * Copyright (C) 2016 Shachar Zilbershlag <shaharzi@matrix.co.il>
9 * Copyright (C) 2016 Amiel Elboim <amielel@matrix.co.il>
11 * LICENSE: This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 3
14 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
22 * @package OpenEMR
23 * @author Shachar Zilbershlag <shaharzi@matrix.co.il>
24 * @author Amiel Elboim <amielel@matrix.co.il>
25 * @link http://www.open-emr.org
28 require_once dirname(__FILE__) . '/../globals.php';
29 require_once dirname(__FILE__) . '/therapy_groups_controllers/therapy_groups_controller.php';
30 require_once dirname(__FILE__) . '/therapy_groups_controllers/participants_controller.php';
32 $method = $_GET['method'];
34 switch ($method) {
35 case 'addGroup':
36 $controller = new TherapyGroupsController();
37 $controller->index();
38 break;
40 case 'listGroups':
41 $controller = new TherapyGroupsController();
42 $controller->listGroups();
43 break;
45 case 'groupDetails':
46 if (!isset($_GET['group_id'])) {
47 die('Missing group ID');
50 $controller = new TherapyGroupsController();
51 if ($_GET['group_id'] == 'from_session') {
52 $controller->index($therapy_group);
53 } else {
54 $controller->index($_GET['group_id']);
56 break;
57 case 'groupParticipants':
58 if (!isset($_GET['group_id'])) {
59 die('Missing group ID');
62 $controller = new ParticipantsController();
63 $controller->index($_GET['group_id']);
64 break;
65 case 'addParticipant':
66 $controller = new ParticipantsController();
67 $controller->add($_GET['group_id']);
68 break;