Skip to content

error handling and removed if conditional#1670

Merged
SFJohnson24 merged 8 commits into
mainfrom
supp
Mar 20, 2026
Merged

error handling and removed if conditional#1670
SFJohnson24 merged 8 commits into
mainfrom
supp

Conversation

@SFJohnson24
Copy link
Copy Markdown
Collaborator

@SFJohnson24 SFJohnson24 commented Mar 16, 2026

This PR removes the If conditional for the pivot logic that is needed for other supp domains to collapse, previously limited to SUPPDM only. After pivoting QNAM values into columns, process_supp produces one sparse row per original QNAM record. The groupby/agg collapse is required for all SUPP domains to produce a single wide row per unique key.

I tested this on cg0371, fb0101, FB5801, and CG0531 for their various supp conditions.

I also added logic for when common keys (contained in both parent and supp) have 0 alignment--a preprocessingerror is thrown to prevent silent failing, and raise the issue in the report.

@SFJohnson24 SFJohnson24 linked an issue Mar 16, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@RamilCDISC RamilCDISC left a comment

Choose a reason for hiding this comment

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

The AC and PR description both requires removal of if conditional which I could not find in the changes. Could you also please add a case for dask dataset.

@SFJohnson24
Copy link
Copy Markdown
Collaborator Author

@RamilCDISC sorry I was doing A/B testing and forgot to remove the if statement. removed it

Comment thread cdisc_rules_engine/utilities/data_processor.py Outdated
Comment thread cdisc_rules_engine/utilities/data_processor.py
@SFJohnson24 SFJohnson24 merged commit 7ed67a3 into main Mar 20, 2026
12 checks passed
@SFJohnson24 SFJohnson24 deleted the supp branch March 20, 2026 13:00
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.

Incomplete pivot for SUPP merge

3 participants