Closed ASL-rmarshall closed 7 months ago
@DianeWold This one is also ready for review. This rule checks for id
values used more than once in nextId
or previousId
(within StudyDesign). It's a generic check that's specified (via Scope) to run for the Activity
, EligibilityCriteria
, Encounter
and StudyEpoch
classes.
Ran negative data. It found 20 errors, which I think can be accounted for as follows: For StudyEpoch, 4 records in first study design with nextIds that are not unique For StudyEpoch, 2 records for second study design the nextIds that are not unique For StudyEpoch, 2 records for second study design the priorIds that are not unique For Encounter, 3 records in first study design with nextIds that are not unique For Encounter, 2 records in second study design with nextIds that are not unique For Encounter, 2 records in second study design with priorIds that are not unique For Activity, 2 records with nextIds that are not unique For Activity, 2 records with priorIds that are not unique For EligibilityCriteria, 2 records in the first category with nextIds that are not unique. 8+7+4+1 = 20 Positive data returned 4 positives. I assume that is one for each of the datasets. @ASL-rmarshall -- can you confirm I've interpreted the test results properly?
@DianeWold I don't think your results quite tally. Each dataset record with a problem is only reported once, even if it has more than one problem. The 20 reported issues break down like this:
StudyEpoch
: total of 7 records with errors:
nextId
only (rows 1 and 4)nextId
and previousId
(rows 2 and 3)nextId
only (row 7)nextId
and previousId
(row 8)previousId
only (row 9)Encounter
: total of 6 records with errors:
nextId
only (rows 1, 2 and 3)nextId
only (row 5)nextId
and previousId
(row 6)previousId
only (row 7)Activity
: total of 4 records with errors:
nextId
only (rows 1 and 5)previousId
only (rows 2 and 6)EligibilityCriteria
: total of 3 records with errors:
nextId
only (row 1)nextId
and previousId
(row 2)previousId
only (row 3)7 + 6 + 4 + 3 = 20
You're right that the 4 positives is one for each dataset.
For StudyEpoch, I counted row 8 twice, when it should only be counted once, though it has two problems. Similar miscount for Encounters. Count for Activities okay. For EligibilityCriteria, I counted errors only within a category, but I see now that the check is within a StudyDesign. That makes sense -- one wouldn't want a criterion twice, even in different categories. Thanks, @ASL-rmarshall , for the detailed help. I now understand the results of both the negative and positive testing, and am moving this issue to Done.
This rule has been updated to only report where rel_type = "definition"
. Associated test data have been updated and unit tests have been rerun successfully.
Create generic rule to check for unique values in nextId and previousId as defined for #89