Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Component Based Rule Settings #1368

Merged
merged 25 commits into from
Feb 15, 2024

Conversation

mialy-defelice
Copy link
Contributor

@mialy-defelice mialy-defelice commented Feb 9, 2024

Component Based Rule Setting

Component-Based Rule Setting is a powerful feature in data modeling that enables users to create rules tailored to specific subsets of components or manifests. This functionality was developed to address scenarios where a data modeler needs to enforce uniqueness for certain attribute values within one manifest while allowing non-uniqueness in another.

Here's how it works:

  • Rule Definition at Attribute Level: Rules are defined at the attribute level within the data model.
  • Manifest-Level Referencing: These rules can then be applied (or not) to specific manifests within the data model. This means that rules can be selectively enforced based on the manifest they're associated with.

This feature offers flexibility and applicability beyond its original use case. The new Component-Based Rule Setting feature provides users with the following options:

Apply a Rule to All Manifests Except Specified Ones: Users can now define a rule that applies to all manifests within the data model except for those explicitly specified. In cases where exceptions are specified, users have the flexibility to define unique rules for these exceptions or opt not to apply any rule at all.

Specify a Rule for a Single Manifest: Alternatively, users can specify a rule that applies to a single manifest exclusively. This allows for fine-grained control over rule enforcement at the manifest level.

Unique Rules for Each Manifest: Users can also define unique rules for each individual manifest within the data model. This enables tailored rule enforcement based on the specific requirements and characteristics of each manifest.

By leveraging the enhanced Component-Based Rule Setting feature, data modelers can efficiently enforce rules across their data models with greater precision and flexibility, ensuring data integrity while accommodating diverse use cases and requirements.

Note: All restrictions to rule combos and implementation also apply to component based rules.

As always try the rule combos with mock data to ensure they are working as intended before using in production.

Format:

  • ^^Double carrots indicates that Component based rules are being set
  • Use ^^ to separate component rule sets
  • `# In the first position (prior to the rule) to define the component/manifest to apply the rule to
  • # character cannot be used with out the ^^` to indicate component rule sets

Use case:

  • Apply rule to all manifests except specified set.
    • validation_rule^^#ComponentA
    • validation_rule^^#ComponentA^^#ComponentB
  • Apply a unique rule to each manifest.
    • #ComponentA validation_rule_1^^#ComponentB validation_rule_2^^#ComponentC validation_rule_3
  • For specified manifest apply given validation rule, but for all others run a different rule
    • #ComponentA validation_rule_1^^validation_rule_2
    • validation_rule_2^^#ComponentA validation_rule_1
  • Apply validation rule to only one manifest
    • #ComponentA validation_rule_1^^

Testing

Testing Resources

Test Models:
TBD

Test Manifest:
Example Biospecimen Manifest

Example Patient Manifest

Testing Steps:

TBD

@mialy-defelice mialy-defelice marked this pull request as ready for review February 15, 2024 00:26
@mialy-defelice
Copy link
Contributor Author

@andrewelamb @GiaJordan I added an additional check for duplicate components in a rule, and updated the testing.

@andrewelamb andrewelamb self-requested a review February 15, 2024 19:46
Copy link

Quality Gate Passed Quality Gate passed

Issues
43 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@mialy-defelice mialy-defelice merged commit 8e8cf18 into develop Feb 15, 2024
4 checks passed
@mialy-defelice mialy-defelice deleted the develop-vr-set-per-component-FDS-1443 branch February 15, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants