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

Need operator for "substring" on value or array of values

Open
#1,762 1 comment 0 reactions 0 assignees View on GitHub
SEND
Dominant language
Python
Stars
113
Forks
43
Avg merge
14h 51m
Merged PRs (30d)
14

Description

### Standard

CDISC SEND

### Reference Rule ID(s)

SEND-406

### Conformance Rule ID(s) (if published in CORE)

_No response_

### JIRA Ticket

https://jira.cdisc.org/browse/CORERULES-9140

### Proposed Rule YAML

```YAML
N/A see SEND406 in old rule-editor
```

### Attach any sample test data file(s)

for SEND406, we need to take all the values of SJSTDTC for each subject, which usually is a datetime, but not always, and only take the date part, and of these, take the lowest value. I did not find an operator representing "substring" though. I tried with "min_date" but it throws an error when there is a mixture of dates and datetimes.

[SENDIG_406_positive.xlsx](https://github.com/user-attachments/files/28875573/SENDIG_406_positive.xlsx)

### Expected output

date part (substring($x,1,10) of a datetime when > 10 character, original value when 10 characters.

### Any Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the SEND-406 rule context, the existing min_date operator, and the attached SENDIG_406_positive.xlsx sample. Compare the requested substring behavior for mixed dates and datetimes, then verify that the resulting value matches the expected date part for each subject.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.