Healthcare identifier recognizers cannot fire on structured or delimited text because their context is inside the regex
Describe the bug
UsClaimNumberRecognizer, UsPriorAuthorizationNumberRecognizer and UsPrescriptionNumberRecognizer (#2159) require their context words inside the pattern, as lookbehinds (e.g. (?<=\bclaim...)), and UsHealthInsuranceMemberIdRecognizer scores 0.1 and relies on context words. On text with no prose around the value — CSV/tabular data through presidio-structured, EDI, form fields — they either return nothing or lose to a generic recognizer. The recognizer rulebook says this should be handled by thresholds, not required context, for exactly this reason (.github/instructions/recognizers.instructions.md, "Suppress low-confidence matches with score_thresholds, not by requiring context: presidio-structured has no surrounding text to draw context from"), and the same point was raised in the #2159 review.
To Reproduce (analyzer from main, en_core_web_lg, all four recognizers added, score_threshold=0)
NM1*IL*1*DOE*JOHN****MI*W739345074~ -> US_DRIVER_LICENSE 0.30, US_HEALTH_INSURANCE_MEMBER_ID 0.10
Subscriber John Doe, member ID W739345074. -> US_HEALTH_INSURANCE_MEMBER_ID 0.45
CLM*PCN000001*450.00***11:B:1*Y*A*Y*Y~ -> no US_CLAIM_NUMBER at all
Claim number PCN000001 for 450.00. -> no US_CLAIM_NUMBER at all (NRP 0.85 from NER)presidio-structured on a DataFrame with a member_id column of such values selects US_DRIVER_LICENSE for the column.
Expected behavior
Each recognizer carries a context-free weak pattern (0.05–0.1 per the score bands) so the value is detectable without prose and thresholds decide; the existing lookbehind patterns stay as the strong ones. UsClaimNumberRecognizer should accept alphanumeric claim numbers (X12 CLM01 is alphanumeric, up to 38 characters); today PCN000001 is not matched even with "Claim number" in front of it.
Happy to open the PR. Drafted with Claude Code assistance and verified by hand against main.
Source: data-privacy-stack/presidio