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 DDF00033: A StudyAmendmentReason is linked to a StudyAmendment either as a primaryReason or as a secondaryReason, but not both. #140

Closed ASL-rmarshall closed 7 months ago

ASL-rmarshall commented 9 months ago

Create rule defined for #114

ASL-rmarshall commented 9 months ago

Rule id updated from DDF99987 to DDF00033.

ASL-rmarshall commented 9 months ago

@DianeWold This one is also ready for review. I created test data as follows:

DianeWold commented 9 months ago

@ASL-rmarshall Should discuss whether the rule needs to be modified. Negative and positive test data ran as expected. However, rule may need to be modified to allow multiple instances of the code for "other" if values of otherReason are different.
Also note comment above about checking needed for the same code used for different study amendments.

DianeWold commented 9 months ago

Agreed that multiple instances of the code "other" should trigger the rule, as in this case otherReason would have to be checked by hand. Comparing otherReason values electronically could easily miss slight representations of the same reason.

BSnoeijerCD commented 9 months ago

@DianeWold and @ASL-rmarshall I would say that reasons can be the same across different amendments. So the check should be within an amendment. Not within a study definition. I cannot see whether this now done based on the Core ruled definition. Not sure whether multiple instances of Other should trigger the rule. Although I agree with your point Diane, I believe the check description text should then be different - indicating that it could be right but should be checked. While twice filling the same reason is really an error.

ASL-rmarshall commented 5 days ago

Saving a copy of the POC rule definition before deleting for DDF 4:

Authorities:
  - Organization: 'CDISC'
    Standards:
      - Name: USDM
        References:
          - Citations:
              - Cited Guidance: 'USDM'
                Document: 'USDM v2.6'
            Origin: USDM Conformance Rules
            Release Notes: ''
            Rule Identifier:
              Id: 'DDF00033'
              Version: '1'
            Version: '1.0'
        Version: '3.0'
Check:
  all:
    - name: code.code
      operator: is_not_unique_set
      value:
        - parent_id
Core:
  Id: CORE-000425
  Status: Draft
  Version: '1'
Description: 'For a Study Amendment, the set of codes for StudyAmendmentReason
  must not include duplicates.'
Executability: Fully Executable
Outcome:
  Message: 'The StudyAmendmentReason codes for a StudyAmendment includes duplicates'
  Output Variables:
    - parent_entity
    - parent_id
    - parent_rel
    - id
    - code.code
    - code.decode
    - otherReason
Rule Type: Record Data
Scope:
  Entities:
    Include:
      - StudyAmendmentReason
Sensitivity: Record