3 * Script to configure the Rules.
5 * Copyright (C) 2015 Brady Miller <brady@sparmy.com>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
20 * @author Brady Miller <brady@sparmy.com>
21 * @link http://www.open-emr.org
24 require_once(dirname(__FILE__
)."/../../../../../../library/acl.inc");
25 global $phpgacl_location;
26 require_once("$phpgacl_location/gacl_api.class.php");
29 <table
class="header">
31 <td
class="title"><?php
echo out( xl('Clinical Decision Rules Alert Manager') ); ?
></td
>
36 <a href
="javascript:document.cdralertmgr.submit();" class="css_button" onclick
="top.restoreSession()"><span
><?php
echo out( xl('Save') ); ?
></span
></a
><a href
="javascript:document.cdralertmgr.reset();" class="css_button" onclick
="top.restoreSession()"><span
><?php
echo out( xl('Reset') ); ?
></span
></a
>
43 <form name
="cdralertmgr" method
="post" action
="index.php?action=alerts!submitactmgr" onsubmit
="return top.restoreSession()">
44 <table cellpadding
="1" cellspacing
="0" class="showborder">
45 <tr
class="showborder_head">
46 <th width
="250px"><?php
echo out( xl('Title') ); ?
></th
>
47 <th width
="40px"> 
;</th
>
48 <th width
="10px"><?php
echo out( xl('Active Alert') ); ?
></th
>
49 <th width
="40px"> 
;</th
>
50 <th width
="10px"><?php
echo out( xl('Passive Alert') ); ?
></th
>
51 <th width
="40px"> 
;</th
>
52 <th width
="10px"><?php
echo out( xl('Patient Reminder') ); ?
></th
>
53 <th width
="40px"> 
;</th
>
54 <th width
="100px"><?php
echo out( xl('Access Control') ); ?
> <span title
='<?php echo out( xl('User is required to have this access control
for Active Alerts
and Passive Alerts
') ); ?>'>?
</span
></th
>
58 <?php
foreach($viewBean->rules
as $rule) {?
>
61 <td
><?php
echo out( xl($rule->get_rule()) );?
></td
>
63 <?php
if ($rule->active_alert_flag() == "1"){ ?
>
64 <td
><input type
="checkbox" name
="active[<?php echo $index ?>]" checked
="yes"></td
>
66 <td
><input type
="checkbox" name
="active[<?php echo $index ?>]" ></td
>
69 <?php
if ($rule->passive_alert_flag() == "1"){ ?
>
70 <td
><input type
="checkbox" name
="passive[<?php echo $index ?>]]" checked
="yes"></td
>
72 <td
><input type
="checkbox" name
="passive[<?php echo $index ?>]]"></td
>
75 <?php
if ($rule->patient_reminder_flag() == "1"){ ?
>
76 <td
><input type
="checkbox" name
="reminder[<?php echo $index ?>]]" checked
="yes"></td
>
78 <td
><input type
="checkbox" name
="reminder[<?php echo $index ?>]]"></td
>
82 <?php
//Place the ACO selector here
83 $gacl_temp = new gacl_api();
84 $list_aco_objects = $gacl_temp->get_objects(NULL, 0, 'ACO');
85 foreach ($list_aco_objects as $key => $value) {
86 asort($list_aco_objects[$key]);
88 echo "<select name='access_control[" . $index . "]'>";
89 foreach ($list_aco_objects as $section => $array_acos) {
90 $aco_section_data = $gacl_temp->get_section_data($section, 'ACO');
91 $aco_section_title = $aco_section_data[3];
92 foreach ($array_acos as $aco) {
93 $aco_id = $gacl_temp->get_object_id($section, $aco,'ACO');
94 $aco_data = $gacl_temp->get_object_data($aco_id, 'ACO');
95 $aco_title = $aco_data[0][3];
97 if ($rule->access_control() == $section.":".$aco) {
100 echo "<option value='" . attr($section) . ":" . attr($aco) . "' " . $select . ">" . xlt($aco_section_title) . ": " . xlt($aco_title) . "</option>";
106 <td
><input style
="display:none" name
="id[<?php echo $index ?>]]" value
=<?php
echo out($rule->get_id()); ?
> /></td
>