Describe the bug
The checksum validation for DE_HEALTH_INSURANCE (KVNR) appears to use a factor sequence that is inconsistent with the official §290 SGB V Anlage 1 method, causing valid KVNR examples to be rejected.
To Reproduce
- Go to
presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/germany/de_health_insurance_recognizer.py.
- Run the current
validate_result checksum logic for these sample KVNRs:
- Observe validation result.
Expected behavior
Both sample values should validate as true according to the official KVNR Prüfziffer method (letter -> 01..26, alternating factors 1,2,1,2,..., cross-sum, sum % 10 equals check digit).
Screenshots
N/A.
Additional context
Current implementation uses factors [2,9,8,7,6,5,4,3,2,1].
Official references:
This was noticed while validating German health insurance letter extraction after PR #1909.
Describe the bug
The checksum validation for
DE_HEALTH_INSURANCE(KVNR) appears to use a factor sequence that is inconsistent with the official §290 SGB V Anlage 1 method, causing valid KVNR examples to be rejected.To Reproduce
presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/germany/de_health_insurance_recognizer.py.validate_resultchecksum logic for these sample KVNRs:A000500015C000500021Expected behavior
Both sample values should validate as true according to the official KVNR Prüfziffer method (letter ->
01..26, alternating factors1,2,1,2,..., cross-sum,sum % 10equals check digit).Screenshots
N/A.
Additional context
Current implementation uses factors
[2,9,8,7,6,5,4,3,2,1].Official references:
This was noticed while validating German health insurance letter extraction after PR #1909.