cdisc-org / cdisc-org/cdisc-rules-engine

Rule blocked: CORERULES-1779

Open
#934 0 comments 0 reactions 0 assignees View on GitHub
ADaM
Dominant language
Python
Stars
113
Forks
43
Avg merge
14h 51m
Merged PRs (30d)
14

Description

- 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.

![image](https://github.com/user-attachments/assets/55fb0a39-3161-4b3a-8fa7-42f66474f06e)

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

![image](https://github.com/user-attachments/assets/ed5e2d7f-9f07-4a00-90a5-b48cc413159a)

https://github.com/cdisc-org/cdisc-rules-engine/blob/cca17a793af8b2cd65de9c2ebab89751bc8576dc/cdisc_rules_engine/utilities/rule_processor.py#L363

**Proposed rule logic**

update engine function: def is_relationship_dataset(self, domain: str) to handle ADaM -> SDTM for the match operation:
Match Datasets:
- Keys:
- USUBJID
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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.