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

Rule blocked: CORERULES-642

Open
#1,206 1 comment 0 reactions 1 assignee Claimed by @aniemes View on GitHub
SEND
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/projects/CORERULES/issues/CORERULES-642

**Rule Information**
- **Standard**: SENDIG
- **Rule ID**: SEND203
- **Rule Description**: TFDETECT: If the tumor was detected as a palpable mass, then TFDETECT is based off the PM domain variable PMDTC (Start Date/Time of Observation). This is calculated as (PMDTC - EXSTDTC) + 1.
- **Rule Logic**: TFDETECT = (PMDTC - EXSTDTC) + 1

**Describe the problem**
I was trying to extract the day portion of these two fields (PMDTC & EXSTDTC) and compare them, but there is no way to compare these values with the engine as far as I am aware.

**Describe the solution**
I was going to extract these day portions to variables and use the check to compare them. Hoping there can be a way to do something like this. Maybe in the yml logic below this 'offset' could be allow negative values which would represent a value to subtract from this difference. In my case I need to add based on this rule logic.

**Proposed rule logic**
```
Check:
all:
- name: TFDETECT
operator: not_equal_to_difference
value1: $pm_day
value2: $ex_day
offset: 1

Operations:
- name: "PMDTC"
id: $pm_day
operator: "date_component"
date_component: "day"
- name: "EXSTDTC"
id: $ex_day
operator: "date_component"
date_component: "day"
```

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.