Clinical_rules - missing display of rule status on reminder details page

3 for today

This one is an easy one
On the Clinical Reminder detail page (the page you get to by clicking the pencil in the Clinical Reminders widget on a patient’s dashboard), the only status text that shows up is “Past Due”.
I checked this in v7.0.2 (as well as 7.0.1 (1) that I’m using - the code is the same)

The code below lives in test_rules_clinic(), and executes when a rule target evaluates to true for one of three interval-based phases of the analysis. It is always setting the status to not_done (which for some reason doesn’t cause any text to display, despite not_done being listed in the Clinical Rules Reminder Due Options list). It should set a different status depending on which interval phase succeeded. The code below shows my updated logic

                        // send to reminder results
                        if ($mode == "reminders-all") {
							if ($rowRule['id'] == 'rule_81')
								error_log('cr reminders-all');
                            // place the completed actions into the reminder return array
                            $actionArray = resolve_action_sql($rowRule['id'], '1');
							if ($rowRule['id'] == 'rule_81')
								error_log('cr reminders-all actionArray got');
                            foreach ($actionArray as $action) {								
								if ($rowRule['id'] == 'rule_81')
									error_log('cr reminders-all setting not done');
                                $action_plus = $action;
								
								// original line
                                $action_plus['due_status'] = "not_due";
								
								// My replacement lines
								// if passed during this pass, this is the status
								if ($dateCounter == 1) {
									// not_due doesn't cause any text to show. Labels come from Clinical Rules Reminder Due Options. Has not_due, so not sure why that does not work
									$reminder_status = "Not Due";
								} elseif ($dateCounter == 2) {
									$reminder_status = "soon_due";
								} else { // $dateCounter == 3
									$reminder_status = "due";
								}

								$action_plus['due_status'] = $reminder_status;
                                $action_plus['pid'] = $rowPatient['pid'];
                                $action_plus['rule_id'] = $rowRule['id'];
                                $results = reminder_results_integrate($results, $action_plus);
                            }
                        }