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 DDF00023: StudyEpochs are ordered chronologically (StudyEpoch components) #73

Closed ASL-rmarshall closed 5 months ago

ASL-rmarshall commented 10 months ago

Create rule defined for #48

ASL-rmarshall commented 8 months ago

I think there will be several components to this rule, each of which must be satisfied within a given StudyDesign. Some components will be checked for each StudyDesign and some for each StudyEpoch, which are in separate PBIs because the StudyDesign rule is a blocked cross-class rule: StudyEpoch checks (DDF99997 -> DDF00023)

StudyDesign checks (see #117)

These components should ensure that StudyEpochs are ordered in a single, non-looping, non-branching series, but there is nothing that can be used to check if the order is chronological.

ASL-rmarshall commented 8 months ago

@DianeWold I created separate PBIs for the separate rules to check StudyEpoch and StudyDesign components so that the StudyEpoch rule can be reviewed and marked as done (assuming it's acceptable). Please review DDF00023. Thanks

DianeWold commented 8 months ago

Ran the positive and negative test data. Negative test data showed 6 errors, as expected, Positive test data passed.

ASL-rmarshall commented 8 months ago

The following check component needs to be modified only to apply to study designs that have more than one epoch:

As this modification involves StudyDesign-level information (i.e., only one epoch in the study design), the check component may need to be moved into a separate rule or simply removed. The check component can be removed because it would be superseded by a StudyDesign check for "every StudyDesign must have exactly one study epoch with nextId blank and exactly one with previousId blank", (where the "exactly one" epoch can be the same epoch - with both nextId and previousId blank - in a study design with only one epoch).

ASL-rmarshall commented 8 months ago

Based on the comment above and this comment in #89, DDF00023 should be changed to check only for invalid id values because both nextId and previousId may be blank in study designs with only one epoch and checking of id uniqueness can be a generic rule.

ASL-rmarshall commented 8 months ago

@DianeWold This is now ready for re-testing - the rule now only checks for use of id values that are not valid for the StudyDesign instance. Please use the test data files from the 02 folder for both negative and positive. Thanks

DianeWold commented 8 months ago

Ran test data files from the 02 folder. Negative testing spotted the 6 rows with invalid epochs for the study design. Positive testing passed.

ASL-rmarshall commented 6 months ago

This rule has been updated to only report where rel_type = "definition". Associated test data have been updated and unit tests have been rerun successfully.