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 DDF00030: For classes with next and previous relationships, the next and previous relationships must establish an ordered list of instances of the class (valid EligibilityCriteria id values for nextId and previousId). #135

Closed ASL-rmarshall closed 5 months ago

ASL-rmarshall commented 8 months ago

Create rule to check for valid nextId and previousId values for EligibilityCriteria as defined for #79

ASL-rmarshall commented 8 months ago

@DianeWold This one is also ready for review. It's checking that the id values used in nextId and previousId in the EligibilityCritieria class are valid for both the study design and category.

DianeWold commented 8 months ago

Ran the negative test data. There were six errors, which it took me a while to understand. Row 1: EligibilityCriteria_0 is not an eligibility criterion for this study design. (doesn't exist in the data) Row 3: EligibilityCriteria_4 is not an eligibility criterion in the right category (C25532) Row 5: EligibilityCriteria_6 is not an eligibility criterion for this study design. (wrong study design) Row 7: EligibilityCriteria_1 is not an eligibility criterion for this study design (wrong study design) Row 9: EligibilityCriteria_8 is not an eligibiliity criterion in the right category (C25370) Row 10: EligibilityCriteria_11 is not an eligibility criterion for this study design (doesn't exist in the data) Will error messages eventually be more specific? Positive test data ran as expected.

BSnoeijerCD commented 8 months ago

@DianeWold @ASL-rmarshall The description of the core rule is not specific enough. It checks whether if a previous or next reference exists, then this reference is also existing in the list of eligibility criteria. Can we make it more specific?

From the actual check perspective, I think it would also be possible to include in this check that it does not reference to itself. or " previousID=id" or "nextId=id". Do you want to include that?

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.

BSnoeijerCD commented 6 months ago

@DianeWold @ASL-rmarshall This check is now performed within a category: Inclusion / Exclusion However, we do not have to include that restriction as we can indicate the overall ordering of criteria without the limitation of category.