Skip to content

Conversation

@mint-thompson
Copy link
Collaborator

Normalize payer and plan in column definitions to be all lowercase

Problem

When validating the columns of a CSV wide file, differences in capitalization in payer or plan name will result in different payers and plans being defined for each variation. For example, standard_charge | Payer ABC | PPO | negotiated_dollar and standard_charge | Payer ABC | Ppo | negotiated_percentage would defined two different payer-plans. This means that two sets of columns would be expected to match that payer-plan, typically resulting in errors from failing to find those columns.

Solution

When detecting the set of payers and plans present in CSV wide columns, make the string lowercase before adding it to the set.

Result

Payer-plan combinations that only differ by capitalization will only appear once in the set of payer-plans. CSV wide files that have variation in capitalization of payer-plan names in columns may now pass the validator. Since the list of expected columns no longer preserves case of payer-plan names, error messages for missing columns will now show all-lowercase payer-plan names, regardless of original capitalization.

Test Plan

Add tests that explicitly check the results of CsvValidator.getPayersPlans in cases where capitalization of payers and plans vary. Since the expected columns vary based on specified data dictionary version, add tests for different data dictionary versions. Update existing tests that check CsvValidator.normalizedColumns to reflect that the normalized column names for columns that include payer-plans no longer preserve capitalization.

Copy link
Collaborator

@shaselton-usds shaselton-usds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@shaselton-usds shaselton-usds merged commit f8ab018 into main Dec 22, 2025
5 checks passed
@shaselton-usds shaselton-usds deleted the payer-plan-case-sensitivity branch December 22, 2025 16:29
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.

3 participants