cdisc-org / cdisc-rules-engine

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

Rule blocked: CORERULES-150 #518

Closed gerrycampion closed 11 months ago

gerrycampion commented 1 year ago

Links to related JIRA Tickets

Rule Information

Describe the problem There needs to be a way to use relrec to join an FA domain to its parent domain in order to write a rule for CG0174

Proposed rule logic Check Logic is incomplete for CG0174

Check:
  all:
    - any:
        - name: --TERM
          operator: exists
        - name: --DECOD
          operator: exists
        - name: --TRT
          operator: exists
    - all:
        - name: FAOBJ
          operator: not_equal_to
          value: --TERM
        - name: FAOBJ
          operator: not_equal_to
          value: --DECOD
        - name: FAOBJ
          operator: not_equal_to
          value: --TRT
Match Datasets:
  - Name: RELREC
    Is Relationship: true

Sample Positive/Negative Test Data See sample relrec, FA, AE data in sharepoint here: Documents - CORE Rules\unitTesting\Samples and Templates\CDISCPILOT01\Clean\excel

The primary missing piece is the ability to match datasets using the relrec dataset. To match on relrec, Find all sets of relrec rows where RDOMAIN is the current domain, grouped by RELID. Given the matching relrec rows, match the set of datasets in RDOMAIN on the variables provided in IDVAR, along with USUBJID.

RamilCDISC commented 11 months ago

The issue is clear from QA validations. The engine now executes the rule properly. All the chnages have been carefully validated. Rule executes properly gainst positive and negative cases. No previous implementations are affected from these changes.

518