Skip to content

Conversation

@Karthikeyannhs
Copy link
Contributor

@Karthikeyannhs Karthikeyannhs commented May 23, 2025

Description

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@Karthikeyannhs Karthikeyannhs changed the title Eli 258 introduce cohort label field in rules Introduced COHORT_LABEL field in iteration rules May 23, 2025
@Karthikeyannhs Karthikeyannhs force-pushed the eli-258-introduce_cohort_label_field_in_rules branch from ba8f7b4 to 7f199f3 Compare May 23, 2025 18:54

class IterationRuleFactory(ModelFactory[rules.IterationRule]): ...
class IterationRuleFactory(ModelFactory[rules.IterationRule]):
attribute_target = None
Copy link
Contributor Author

@Karthikeyannhs Karthikeyannhs May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no random values will be ret for target_attribute and cohort_label.

Copy link
Contributor

@ayeshalshukri1-nhs ayeshalshukri1-nhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

ir
for ir in iteration_rule_group
if ir.type in (rules.RuleType.filter, rules.RuleType.suppression)
and (ir.cohort_label is None or (ir.cohort_label in self.person_cohorts))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it will work for the case of multiple rules, with the same priority, that are executed in an AND

@Karthikeyannhs Karthikeyannhs marked this pull request as ready for review May 27, 2025 11:13
Copy link
Contributor

@ayeshalshukri1-nhs ayeshalshukri1-nhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (reviewed non draft)

@Karthikeyannhs Karthikeyannhs merged commit 3c2136c into main May 27, 2025
23 checks passed
@Karthikeyannhs Karthikeyannhs deleted the eli-258-introduce_cohort_label_field_in_rules branch May 29, 2025 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants