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

Rule blocked: SEND49

Open
#1,443 3 comments 0 reactions 1 assignee Claimed by @aniemes View on GitHub
Define-XML cross check SDTM SEND
Dominant language
Python
Stars
113
Forks
43
Avg merge
14h 51m
Merged PRs (30d)
14

Description

[unit-test-coreid-SENDIG_49.xlsx](https://github.com/user-attachments/files/23627949/unit-test-coreid-SENDIG_49.xlsx)

In SEND49 we need to test whether, when the SENDIG states that there is a codelists associated to a variable, it must be declared in the define.xml, either on the variable level or at the valuelist level.
So, we want to first check on the variable level, where we use:
- name: 'library_variable_ccode'
operator: non_empty
- name: define_variable_ccode
operator: not_equal_to
value: library_variable_ccode
if the result of the second is "false", we need to further check on the valuelist level.
So we change/add (full code is in the rule-editor):
- name: 'library_variable_ccode'
operator: non_empty
- any:
- name: define_vlm_ccode
operator: not_equal_to
value: 'test'
- name: define_variable_ccode
operator: empty
- name: define_variable_ccode
operator: not_equal_to
value: library_variable_ccode

but then we get a message "define_vlm_ccode":"Not in dataset"
As "define_vlm_ccode" is defined as "ValueListDef.ItemDef.CodeList.Alias.Name" it looks as it acts on a single ValueList-ItemDef. But as we start by checking on a variable ItemDef, it looks as the system does not recognize that a "ValueList" is added to the variable (ItemDef).

The request is to develop something so that we can check both on the variable level as on the valuelist level, i.e. when we start at the variable level, it is recognized when there is a valuelist attached to that variable, and that for each item in the valuelist, we can check on presence of a codelist and whether this codelist is the correct one to be used.

I attach a test file "define_negative_VSORRESU_ValueList_test.xml" where for VSORRESU, the codelist has been "delegated" to the ValueList level ItemDefs.
If more test files are needed, please let me know.

[define_negative_VSORRESU_ValueList_test.xml](https://github.com/user-attachments/files/23627935/define_negative_VSORRESU_ValueList_test.xml)

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.