Highway to PSR2
[openemr.git] / interface / super / rules / controllers / browse / controller.php
blob6b8eb53f39cb1ba36bbbcd853c4adbc2e1ecadd4
1 <?php
2 // Copyright (C) 2010-2011 Aron Racho <aron@mi-squred.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 require_once(src_dir() . "/clinical_rules.php");
11 class Controller_browse extends BaseController
14 function _action_list()
16 $this->set_view("list.php");
19 function _action_plans_config()
21 $this->set_view("plans_config.php");
24 function _action_getrows()
26 $rows = array();
28 $rules = resolve_rules_sql('', '0', true);
29 foreach ($rules as $rowRule) {
30 $title = getLabel($rowRule['id'], 'clinical_rules');
31 $type = xl("Reminder");
33 $row = array(
34 "title" => $title,
35 "type" => $type,
36 "id" => $rowRule['id']
38 $rows[] = $row;
41 $this->emit_json($rows);