Skip to content

substring operation (on dates) and datediff (not "FDA-math") #1792

Description

@JozefAerts

Standard

CDISC SEND

Reference Rule ID(s)

SEND406

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

CORE-

JIRA Ticket

https://jira.cdisc.org/projects/CORERULES/issues/CORERULES-

Proposed Rule YAML

see https://rule-editor.cdisc.org/ rule SEND406
which is just a first start ... (I got stuck)

Attach any sample test data file(s)

For SEND-(DART-)406, I need to take the earliest date from SJ.SJSTDTC, so I use "min_date", but then I may only use the date part (first 10 characters), and then subtract 2 such dates from each other. I can however not use the "dy" method, as that is specific for DM-RFSTDTC which excludes "0". So I need to have the "real" (not-FDA-method) difference.
I did sofar not find any operators for this.
How do I get the first 10 characters? Is there something like a "substring" operation? We urgently need such a (simple) operator.
What we also need is an operation like "datediff" that provides the "real" (not-FDA-method) difference between dates, i.e. allows "0" as the result.

The rule is: "'RPPLENDY should be populated using the planned repro phase day of observation end algorithm."
and "RPPLENDY=planned event date- (date portion of SJSTDTC) + RPRFDY"

SENDIG_406_positive.xlsx
SENDIG_406_positive_SJSTDTC_date_only.xlsx

Expected output

correct implementation of "substring" (Python: slicing, see e.g. https://stackoverflow.com/questions/509211/how-slicing-in-python-works)
correct implementation of "datediff" (Python: see e.g. Answer 1 of: https://stackoverflow.com/questions/8419564/difference-between-two-dates-in-python)

Any Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Priority

    None yet

    T-shirt sizing

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions