feat: add Canada PIPEDA policy profile and register alias#561
Conversation
…olicies with Canadian identifiers
|
Thank you @AbrarH4. I reviewed this against #517 and added a maintainer follow-up commit: What changed:
Verification:
I copied #517 labels onto the PR. The branch is mergeable with no conflicts. GitHub has not reported hosted checks for this fork head, so the validation above is local. |
Sorry, @maziyarpanahi |
|
No worries at all! It's a community-driven library, we all help each other and learn while doing so. Thank you for your contributions. |
This PR implements the canada_pipeda policy profile to ensure compliance with Canada's PIPEDA, addressing the requirements for masking Canadian direct identifiers (SIN and provincial health-card numbers). It also updates existing core policies to include these identifiers to ensure consistent de-identification across the platform.
Type of Change
[x] New feature (non-breaking change which adds functionality)
[x] Test addition/improvement
Changes Made
Added openmed/core/policies/canada_pipeda.json with appropriate masking configurations.
Registered canada_pipeda (canonical) and pipeda (alias) in openmed/core/policy.py.
Updated core policy JSON files (clinical_minimal_redaction, gdpr_pseudonymization, hipaa_expert_review_assist, hipaa_safe_harbor, research_limited_dataset, strict_no_leak) to include Canadian SIN and health-card number identifiers.
Added unit tests in tests/unit/core/test_policy_profiles.py to verify profile resolution and masking efficacy.
Testing
[x] I have added tests that prove my feature works
[x] New and existing unit tests pass locally with my changes
Documentation
Code Quality
Dependencies
[x] I have not added any new dependencies
Checklist
[x] I have read the contributing guidelines
[x] My commits have clear, descriptive messages
Related Issues
Closes #517
Related to OM-327