Closed ASL-rmarshall closed 7 months ago
This rule has the same problem as 99912 and others. We like to check within a parent id and that requires a combination of different functions. Is the function present_on_multiple_rows giving a false result if there is no result and when the max number is achieved then that one would work. But that is not clear from the operator description. @ASL-rmarshall: did you already try that option?
Created rule with same logic as DDF00012 based on ResponseCode class and grouped parentIds. positive test data: 3 BCs -> 1 with 2 out of 4 response codes enabled -> 1 with 1 out of 4 response codes enabled -> 1 with 3 out of 3 response codes enabled negative test data: 2 BCs -> both with 4 response codes which are all not enabled.
Ran the test data. The negative test data returned an error for each record, similarly to the way DDF00012 returns as error for each record, rather than each group of errors. The positive data returned no errors.
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: 'DDF00034'
Version: '1'
Validator Rule Message: ''
Version: '1.0'
Version: '3.0'
Check:
all:
- name: $st_parent_id
operator: does_not_contain
value: true
value_is_literal: true
Core:
Id: CORE-000426
Status: Draft
Version: '1'
Description: 'If a BiomedicalConceptProperty is related to any ResponseCodes,
then at least one response code should be enabled.'
Executability: Fully Executable
Operations:
- group:
- parent_id
id: $st_parent_id
name: isEnabled
operator: distinct
Outcome:
Message: 'A BiomedicalConceptProperty is linked to one or more ResponseCodes,
but no ResponseCode is enabled.'
Output Variables:
- parent_entity
- parent_rel
- parent_id
- id
- isEnabled
- code.code
- code.decode
Rule Type: Record Data
Scope:
Entities:
Include:
- ResponseCode
Sensitivity: Record
Create rule defined for #138