Skip to content

Commit

Permalink
fix: cdr fix to correctly show actions that are due, due soon, past d…
Browse files Browse the repository at this point in the history
…ue in expanded listings (#7211)
  • Loading branch information
bradymiller committed Mar 9, 2024
1 parent 1ab5fd6 commit 254f078
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions library/clinical_rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1066,16 +1066,16 @@ function test_rules_clinic($provider = '', $type = '', $dateTarget = '', $mode =
// Check if pass target
$passTarget = test_targets($rowPatient['pid'], $rowRule['id'], '', $dateFocus);
if ($passTarget) {
// increment pass target counter
// increment pass target counter (used for reporting)
$pass_target++;
// If report itemization is turned on, then record the "passed" item and set the flag
if (!empty($GLOBALS['report_itemizing_temp_flag_and_id'])) {
insertItemReportTracker($GLOBALS['report_itemizing_temp_flag_and_id'], $GLOBALS['report_itemized_test_id_iterator'], 1, $rowPatient['pid']);
$temp_track_pass = 1;
}

// send to reminder results
if ($mode == "reminders-all") {
// send to reminder results for reminders-all when not_due (ie. $dateCounter == 1)
if (($mode == "reminders-all") && ($dateCounter == 1)) {
// place the completed actions into the reminder return array
$actionArray = resolve_action_sql($rowRule['id'], '1');
foreach ($actionArray as $action) {
Expand Down Expand Up @@ -1189,16 +1189,16 @@ function test_rules_clinic($provider = '', $type = '', $dateTarget = '', $mode =
//Check if pass target
$passTarget = test_targets($rowPatient['pid'], $rowRule['id'], $i, $dateFocus);
if ($passTarget) {
// increment pass target counter
// increment pass target counter (used for reporting)
$pass_target++;
// If report itemization is turned on, then record the "passed" item and set the flag
if ($GLOBALS['report_itemizing_temp_flag_and_id'] ?? null) {
insertItemReportTracker($GLOBALS['report_itemizing_temp_flag_and_id'], $GLOBALS['report_itemized_test_id_iterator'], 1, $rowPatient['pid']);
$temp_track_pass = 1;
}

// send to reminder results
if ($mode == "reminders-all") {
// send to reminder results for reminders-all when not_due (ie. $dateCounter == 1)
if (($mode == "reminders-all") && ($dateCounter == 1)) {
// place the completed actions into the reminder return array
$actionArray = resolve_action_sql($rowRule['id'], $i);
foreach ($actionArray as $action) {
Expand Down

0 comments on commit 254f078

Please sign in to comment.