cdisc-org / ddf-core-poc

This repository will contain the results from the Proof of Concept project.
MIT License
0 stars 1 forks source link

Create rule DDF00041: Each primary objective must contain at least one primary endpoint, and each primary endpoint must be contained by a primary objective. #125

Closed ASL-rmarshall closed 7 months ago

ASL-rmarshall commented 10 months ago

Create rule defined for #112

ASL-rmarshall commented 9 months ago

This is not blocked - should be able to use the same logic as for DDF00034 (see #146)

ASL-rmarshall commented 8 months ago

The implementation of this rule relies on the fact that "level" is only reference to Code from Objective. We can therefore create a distinct list of all codes and decodes from Code grouped by parent_id. When this is joined to Endpoint (by parent_id) it is only the Objective.level codes and decodes that will be linked.

ASL-rmarshall commented 8 months ago

@BSnoeijerCD @DianeWold This is now ready for review. The negative and positive test data is similar - it shows 8 endpoints for 3 objectives (two primary and one secondary). In the negative test data, the level is swapped for the 2nd and 3rd objectives. Only 6 negative results are expected (for each of the endpoints in the 2nd and 3rd objectives), but 7 are reported due to the Scope issue (the rule runs against the Code dataset too and an invalid negative is reported.

DianeWold commented 8 months ago

Ran the negative test data, which returned 7 errors:

ASL-rmarshall commented 8 months ago

@DianeWold There are 2 positives for the same reason that there is one (negative) error for the Code - it is the Scope issue. Although, the Scope indicates the rule should only be run for the Endpoint dataset, it is being run for both the Endpoint and Code datasets.

DianeWold commented 8 months ago

My brain gets tangled trying to understand this, but I believe that the test data ran successfully.

BSnoeijerCD commented 7 months ago

@ASL-rmarshall : this one needs to be reconsidered since it does not check the direct relationship between the objective and the corresponding endpoint. It only checks that if a primary exists in one it also exists in the other class.