Skip to content

Commit

Permalink
CDR Module: Bug Fixes.
Browse files Browse the repository at this point in the history
 - Allow listing of rules that are not activated
 - Fix Adminstration->Rules browse screen to collect
   rules and rules titles correctly, and to only show
   Reminder as a type for now.
  • Loading branch information
bradymiller committed Apr 9, 2011
1 parent ac14c01 commit 17df773
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
13 changes: 3 additions & 10 deletions interface/super/rules/controllers/browse/controller.php
Expand Up @@ -19,17 +19,10 @@ function _action_list() {
function _action_getrows() {
$rows = array();

$rules = resolve_rules_sql();
$rules = resolve_rules_sql('','0',TRUE);
foreach( $rules as $rowRule ) {
$titleResult = sqlFetchArray( sqlStatement(
"SELECT title FROM list_options WHERE option_id = ?", array( $rowRule['id'] ) ) );
$title = $titleResult['title'];
$type = $rowRule['patient_reminder_flag'] == 1 ? "Reminder" : "CQM/AMC";

if ( $rowRule['cqm_flag'] == 1 || $rowRule['amc_flag'] == 1 ) {
// for now, only
continue;
}
$title = getLabel($rowRule['id'],'clinical_rules');
$type = "Reminder";

$row = array(
"title" => $title,
Expand Down
2 changes: 1 addition & 1 deletion interface/super/rules/library/CdrAlertManager.class.php
Expand Up @@ -37,7 +37,7 @@ function CdrActivationManager ($id = "", $prefix = "") {
function populate() {
$cdra = array();

$rules = resolve_rules_sql(NULL, 0, TRUE);
$rules = resolve_rules_sql('', 0, TRUE);

foreach( $rules as $rowRule ) {
$rule_id = $rowRule['id'];
Expand Down
10 changes: 2 additions & 8 deletions library/clinical_rules.php
Expand Up @@ -837,14 +837,8 @@ function resolve_rules_sql($type='',$patient_id='0',$configurableOnly=FALSE,$pla
}
}
else {
if ($goRule['active_alert_flag'] == 1 ||
$goRule['passive_alert_flag'] == 1 ||
$goRule['cqm_flag'] == 1 ||
$goRule['amc_flag'] == 1 ||
$goRule['patient_reminder_flag'] == 1) {
// active, so use the rule
array_push($newReturnArray,$goRule);
}
// no filter, so return the rule
array_push($newReturnArray,$goRule);
}
}
$returnArray = $newReturnArray;
Expand Down

0 comments on commit 17df773

Please sign in to comment.