cdisc-org / cdisc-rules-engine

Open source offering of the cdisc rules engine
MIT License
46 stars 12 forks source link

Rule blocked: CORERULES-FDAB054.7 #652

Open bdevriendt opened 6 months ago

bdevriendt commented 6 months ago

Links to related JIRA Tickets Not existing at the moment

Rule Information

Describe the problem The FDAB054 rule can be broken down in multiple sub-rules, one of them being: A same list of POOLDEF.USUBJID values should be unique to one POOLDEF.POOLID value or in other words a POOLID is a list of USUBJIDs and there cannot be two lists identical in the POOLDEF dataset Positive
|| POOLID || USUBJID ||
|| 0001 || B0001 || || 0001 || B0003 || || 0001 || B0005 || || 0001 || B0006 || || 0002 || B0001 ||
|| 0002 || B0002 ||
|| 0002 || B0003 || || 0002 || B0005 || Negative || POOLID || USUBJID ||
|| 0001 || B0001 || || 0001 || B0003 || || 0001 || B0005 || || 0001 || B0006 || || 0002 || B0001 || || 0002 || B0003 || || 0002 || B0005 || || 0002 || B0006 || Currently we do not have a way to compare two list of values in a specific subset of data.

Describe the solution We would need to be able to retrieve the lists of USUBJIDs per POOLID and compare them to each other to make sure each list is unique

Proposed rule logic

Check:
  all:
    - name: POOLID
      operator: 'contains_a_unique_list_of_values'
      value: USUBJID