- Attach test dataset files that can be used to test the new feature
- Replace the "###" in the issue title with the primary JIRA ticket number for the rule.
- Fill in the following information
Links to related JIRA Tickets
https://jira.cdisc.org/browse/CORERULES-1779
Rule Information
- ADaM:
- Rule 204:
- When the value of ADSL.USUBJID is equal to the value of
DM.USUBJID, ADSL.AGE must equal to DM.AGE:
Describe the problem
Mismatched data values in the negative data is not being flagged by the engine.
This is a matched analysis where ADaM dataset (ADSL) is being compared to SDTM DM domain. Matching key is specified as usubjid, yet mismatches in test data for age for the same usubjid are not being caught.

Describe the solution*
Initial investigation suggests issue with rule engine function defining Is_relationship

|
def is_relationship_dataset(self, domain: str) -> bool: |
Proposed rule logic
update engine function: def is_relationship_dataset(self, domain: str) to handle ADaM -> SDTM for the match operation:
Match Datasets:
I can see why this function is defined to test hierarchical relationships / parent child but the "match dataset" operation maybe should not have this restriction & leave the relationship definition to the user by defining key(s) to merge datasets on. I as a user know the relationship that should exist between between datasets irrespective of model (SDTM/ADaM)
Links to related JIRA Tickets
https://jira.cdisc.org/browse/CORERULES-1779
Rule Information
DM.USUBJID, ADSL.AGE must equal to DM.AGE:
Describe the problem
Mismatched data values in the negative data is not being flagged by the engine.
This is a matched analysis where ADaM dataset (ADSL) is being compared to SDTM DM domain. Matching key is specified as usubjid, yet mismatches in test data for age for the same usubjid are not being caught.
Describe the solution*
Initial investigation suggests issue with rule engine function defining Is_relationship
cdisc-rules-engine/cdisc_rules_engine/utilities/rule_processor.py
Line 363 in cca17a7
Proposed rule logic
update engine function: def is_relationship_dataset(self, domain: str) to handle ADaM -> SDTM for the match operation:
Match Datasets:
Name: DM
I can see why this function is defined to test hierarchical relationships / parent child but the "match dataset" operation maybe should not have this restriction & leave the relationship definition to the user by defining key(s) to merge datasets on. I as a user know the relationship that should exist between between datasets irrespective of model (SDTM/ADaM)