Closed ASL-rmarshall closed 7 months ago
This is not blocked - should be able to use the same logic as for DDF00034 (see #146)
The implementation of this rule relies on the fact that "level" is only reference to Code
from Objective
. We can therefore create a distinct
list of all code
s and decode
s from Code
grouped by parent_id
. When this is joined to Endpoint
(by parent_id
) it is only the Objective.level
codes and decodes that will be linked.
@BSnoeijerCD @DianeWold This is now ready for review. The negative and positive test data is similar - it shows 8 endpoints for 3 objectives (two primary and one secondary). In the negative test data, the level is swapped for the 2nd and 3rd objectives. Only 6 negative results are expected (for each of the endpoints in the 2nd and 3rd objectives), but 7 are reported due to the Scope issue (the rule runs against the Code
dataset too and an invalid negative is reported.
Ran the negative test data, which returned 7 errors:
@DianeWold There are 2 positives for the same reason that there is one (negative) error for the Code
- it is the Scope
issue. Although, the Scope
indicates the rule should only be run for the Endpoint
dataset, it is being run for both the Endpoint
and Code
datasets.
Code
dataset because the rule only reports the primary objective without any primary endpoints (it can't report primary endpoints in a non-primary objective because the Code
dataset doesn't contain the level.code
and level.decode
columns that are needed to identify primary endpoints).Code
dataset because all the objectives that have level = "Primary Objective"
also have at primary endpoints (and, again, the rule can't report primary endpoints in a non-primary objective because the Code
dataset doesn't contain the level.code
and level.decode
columns that are needed to identify primary endpoints).My brain gets tangled trying to understand this, but I believe that the test data ran successfully.
@ASL-rmarshall : this one needs to be reconsidered since it does not check the direct relationship between the objective and the corresponding endpoint. It only checks that if a primary exists in one it also exists in the other class.
Create rule defined for #112