CORE: Generic or specific checks for unique children
- Dominant language
- No language data
- Stars
- 52
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
At the moment we have a mix of generic and specific checks defined to check for uniqueness of child instances. For example:
- Generic:
- CHK0009: The names of all child instances of the same parent class must be unique.
- Specific:
- CHK0059: The same Biomedical Concept Category must not be referenced more than once from the same activity.
- CHK0187: A study definition document version must not be referenced more than once by the same study version.
- CHK0241: A study definition document version must not be referenced more than once by the same study design.
All these specific rules could be replaced with a single rule:
- The ids of all child instances referenced by the same parent class must be unique.
One argument for having specific rules is that each rule's error message and output variables can be tailored to provide additional information.
Theoretically, there should be a check for unique id values for every class attribute that allows a list of id references. For USDM v3.0, we only have 1 such rule defined (see CHK0059 above), but the following attributes allow a list of id references:
| Class | Attribute |
| ---------------------------- | -------------------- |
| Activity | bcCategoryIds |
| Activity | bcSurrogateIds |
| Activity | biomedicalConceptIds |
| BiomedicalConceptCategory | childIds |
| BiomedicalConceptCategory | memberIds |
| Condition | appliesToIds |
| Condition | contextIds |
| NarrativeContent | childIds |
| ScheduledActivityInstance | activityIds |
| StudyArm | populationIds |
| StudyCell | elementIds |
| StudyElement | studyInterventionIds |
| StudyProtocolDocumentVersion | childIds |
Which of the following should we implement for USDM v3.0 and USDM v4.0:
- A single generic rule to check for unique id values whenever multiple id references are allowed (requires removing at least one rule and creating the new generic rule),
- A specific rule for every attribute (or class) where multiple id references are allowed (requires creation of new specific rules), or
- A selected set of specific rules for some of the attributes where multiple id references are allowed (no change unless we're not satisfied with the rule(s) that already exist)?
Contributor guide
Assessment
This issue has not been assessed yet.