Skip to content

Rule blocked: CORERULES-1691 #292

Description

@FITZPST
  • Attach test dataset files that can be used to test the new feature
  • Replace the "###" in the issue title with the primary JIRA ticket number for the rule.
  • Fill in the following information

Links to related JIRA Tickets

Rule Information

  • Standard: ADaM
  • Rule ID: 70
  • Rule Description: A variable with a prefix of TR, containing AG with a suffix of N is present and a variable with the same root without a suffix of N is not present

Describe the problem
Cannot check prefixes/suffixes or any arbitrary substring of a variable name in submitted datasets.

Ability to check whether root variable exists in submitted dataset,

Describe the solution
A clear and concise description of how this problem could be solved.

Check any variable name (in submitted dataset - not define) for any prefix, suffix or arbitrary string. Check whether root variable is present - see ADaM chk 6 where root variable existence also required.

Proposed rule logic

A variable with a prefix of TR, containing AG with a suffix of N is present and a variable with the same root without a suffix of N is not present

Check:
  all:
    - name: variable name #in dataset not define 
      operator: starts_with 
      value : 'TR'        
    - name: variable name #in dataset not define 
      operator: contains 
      value : 'AG'      
    - name: variable name #in dataset not define 
      operator: ends_with 
      value : 'N' 
  - name:  variable name #in dataset not define 
     operator: Root  #returns true for exist - false otherwise
      
  
    (ROOT (variable) #substring(length(variable)-1) -> substring/cut up to 'N' defines root),  and check if variable (ROOT) exits! 
     

**Screenshots**
If applicable, add screenshots to help explain your problem and solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    Priority

    None yet

    T-shirt sizing

    None yet

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions