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 DDF00022: A relationship cannot exist between an instance of a class and itself #130

Closed ASL-rmarshall closed 4 months ago

ASL-rmarshall commented 5 months ago

Create multi-target relationship rule defined for #115

ASL-rmarshall commented 5 months ago

Split into two separate rules, which both need to be reviewed:

ASL-rmarshall commented 4 months ago

With the inclusion of rel_type and referenced instances in the datasets created by the USDM conversion, it is no longer necessary to split this rule. Rule DDF00021 has been updated to cover all scenarios, so DDF00022 can be deleted. Saving a copy of the rule definition before deleting from the Rules Editor:

Authorities:
  - Organization: 'CDISC'
    Standards:
      - Name: 'DDF'
        References:
          - Citations:
              - Cited Guidance: 'USDM'
                Document: "USDM v2.6"
            Origin: 'DDF Conformance Rules'
            Rule Identifier:
              Id: 'DDF00022'
              Version: '1'
            Validator Rule Message: 'The relationship links an entity instance to itself,
              which is invalid'
            Version: '1.0'
        Version: '2'
Check:
  all:
    - name: parent_attr
      operator: equal_to
      value: childrenIds
    - name: value
      operator: equal_to
      value: parent_id
Core:
  Status: Published
  Version: '1'
  Id: CORE-000415
Description: "A relationship cannot link an instance of a class to itself. If
  specified, any value of childrenIds must not be the same as the value of id."
Executability: Fully Executable
Outcome:
  Message: "The 'children' relationship links an entity instance to itself
    (parent_attr = 'childrenIds' and value = parent_id), which is invalid"
  Output Variables:
    - parent_entity
    - parent_id
    - parent_attr
    - value
Rule Type: Record Data
Scope:
  Entities:
    Include:
      - Multiple_Values
Sensitivity: Record