Added stripe package (#1085)
[openemr.git] / interface / therapy_groups / index.php
blob826a11e25dc661af9edc47b88015cbd9d750cc7f
1 <?php
2 /**
3 * interface/therapy_groups/index.php routing for therapy groups
5 * Contains the routing for therapy groups controllers.
7 * Copyright (C) 2016 Shachar Zilbershlag <shaharzi@matrix.co.il>
8 * Copyright (C) 2016 Amiel Elboim <amielel@matrix.co.il>
10 * LICENSE: This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 3
13 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
21 * @package OpenEMR
22 * @author Shachar Zilbershlag <shaharzi@matrix.co.il>
23 * @author Amiel Elboim <amielel@matrix.co.il>
24 * @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;