Closed ASL-rmarshall closed 7 months ago
Updated rule id from DDF99986 to DDF00032.
@DianeWold This is now ready for review. I created test data as follows:
AliasCode.standardCodeAliases
: the same code is used in two different external biomedical concept dictionaries, but someone mistyped the second dictionary name.Encounter.contactModes
: the same code is recorded for two different versions of the SDTM terminology. Only one version of the terminology should be used.Indication.codes
: the code is duplicated because the decodes are similar but not exactly the same (differentiated by the style of the apostrophe)StudyDesign.therapeuticAreas
: the same code is applied for inconsistent decodes in sponsor terminology.StudyDesign.trialIntentTypes
: the wrong code was used for "DIAGNOSIS"StudyDesign.trialTypes
: sponsor codes were assigned for terminology that extends the (extensible) codelist, but the sponsor code value wasn't incremented.StudyDesignPopulation.plannedSexOfParticipants
: the code for "BOTH" was used for separate entries for male and female. (If the "Sex of Participants" terminology is used for this attribute, it doesn't make sense to allow multiple codes - this may have been corrected in a later version of the model, because this rule is not listed for this class in the RuleRequirements spreadsheet).Studyintervention.codes
: the decode for the code was amended in a later version of the dictionary and both are recorded. Only one version of the dictionary should be used.StudyVersion.businessTherapeuticAreas
: one of the codes from the sponsor terminology was selected incorrectly.AliasCode.standardCodeAliases
: the name of the second dictionary was corrected. The two records are differentiated by codeSystem
.Encounter.contactModes
: the record for one of the terminology versions was removed.Indication.codes
: code and decode were changed for the second record.StudyDesign.therapeuticAreas
: parent_id
was changed - the newer version of the sponsor terminology (with the different decode) was used for a second study design. The records are differentiate by parent_id
.StudyDesign.trialIntentTypes
: the code for "DIAGNOSIS" was corrected.StudyDesign.trialTypes
: the sponsor code value was incremented.StudyDesignPopulation.plannedSexOfParticipants
: one of the records was removed and the decode of the remaining record was changed to "BOTH" to align with the code.Studyintervention.codes
: the record for one of the terminology versions was removed.StudyVersion.businessTherapeuticAreas
: the code for the second record was correcteed.Note that the created rule does not implement the "If the cardinality of a relationship between any class and Code allows for more than one instance of code" part of the description - it runs across all instances of the Code class, regardless of the cardinality of the relationship from the parent class.
Negative and positive test data ran as described above.
@DianeWold @ASL-rmarshall I think the check description can be more precise as you check for reuse of codes within an instance of a class. That is ok but not reflected in the test description. Also the Negative tests as described above do not seem to resemble the check description as it also seems to check for the use of different coding systems. As, far as I understand the code only checks for duplicates within a unique combination of parent class, instance, attribute and codesystem used.
Saving a copy of the POC rule before overwriting for DDF4:
Authorities:
- Organization: 'CDISC'
Standards:
- Name: USDM
References:
- Citations:
- Cited Guidance: 'USDM'
Document: 'USDM v2.6'
Origin: USDM Conformance Rules
Release Notes: ''
Rule Identifier:
Id: 'DDF00032'
Version: '1'
Validator Rule Message: ''
Version: '1.0'
Version: '3.0'
Check:
all:
- name: code
operator: is_not_unique_set
value:
- parent_entity
- parent_id
- parent_rel
- codeSystem
Core:
Id: CORE-000424
Status: Draft
Version: '1'
Description: 'For any Class with a relationship to the Code class, the
combinations of codeSystem and code related to the class through that
relationship should be unique.'
Executability: Fully Executable
Outcome:
Message: 'The combination of Code and CodeSystem for a set of instances of a
relationship from a Class to the Code class includes duplicates'
Output Variables:
- parent_entity
- parent_id
- parent_rel
- id
- code
- codeSystem
- codeSystemVersion
- decode
Rule Type: Record Data
Scope:
Entities:
Include:
- Code
Sensitivity: Record
Create rule defined for #109