Skip to content

Commit

Permalink
minor changes to prior commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Apr 21, 2024
1 parent 236693a commit 8ee2683
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions library/clinical_rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1048,13 +1048,7 @@ function test_rules_clinic($provider = '', $type = '', $dateTarget = '', $mode =
if (!empty($GLOBALS['report_itemizing_temp_flag_and_id'])) {
$temp_track_pass = 0;
}
} else {
// did not pass filters.
// skip analysis of individual targets via check on $passFilter below
;
}

if ($passFilter) {
foreach ($target_dates as $dateFocus) {
//Skip if date is set to SKIP
if ($dateFocus == "SKIP") {
Expand Down Expand Up @@ -1169,6 +1163,13 @@ function test_rules_clinic($provider = '', $type = '', $dateTarget = '', $mode =
$temp_track_pass = 1;
}

// Check if pass filter
/*
HR: moved the test_filter() check to this location, outside
foreach ($target_dates as $dateFocus)
Filters do not need to be tested against each $dateFocus value (see below) and filters were inappropriately failing to evaluate to true when
filters were evaluated against $dateFoucs rather than $dateTarget.
*/
$passFilter = test_filter($rowPatient['pid'], $rowRule['id'], $dateTarget);
if ($passFilter === "EXCLUDED") {
$passFilter = false;
Expand All @@ -1179,9 +1180,7 @@ function test_rules_clinic($provider = '', $type = '', $dateTarget = '', $mode =
if (!empty($GLOBALS['report_itemizing_temp_flag_and_id'])) {
$temp_track_pass = 0;
}
}

if ($passFilter) {
foreach ($target_dates as $dateFocus) {
//Skip if date is set to SKIP
if ($dateFocus == "SKIP") {
Expand Down

0 comments on commit 8ee2683

Please sign in to comment.