Fix translation of groups statuses list
[openemr.git] / interface / therapy_groups / therapy_groups_models / group_statuses_model.php
blob42e499f729c82dfaedf09afbf64da92a147b159e
1 <?php
2 /**
3 * interface/therapy_groups/therapy_groups_models/group_statuses_model.php contains the model for therapy group statuses.
5 * This model fetches the statuses list for therapy group appointments from the DB.
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
27 class Group_Statuses{
29 const TABLE = 'list_options';
31 /**
32 * Gets group appointment statuses
33 * @return ADORecordSet_mysqli
35 public function getGroupStatuses(){
36 $sql = 'SELECT option_id, title FROM ' . self::TABLE . ' WHERE list_id = ?;';
37 $result = sqlStatement($sql, array('groupstat'));
38 $final_result =array();
39 while($row = sqlFetchArray($result)){
40 $final_result[] = $row;
42 return $final_result;
45 /**
46 * Gets group meeting attendance statuses
47 * @return ADORecordSet_mysqli
49 public function getGroupAttendanceStatuses(){
50 $sql = 'SELECT option_id, title FROM ' . self::TABLE . ' WHERE list_id = ?;';
51 $result = sqlStatement($sql, array('attendstat'));
52 $final_result =array();
53 while($row = sqlFetchArray($result)){
54 $row['title']=xla(trim($row['title']));
55 $final_result[] = $row;
57 return $final_result;