Normalize payer plan to be all lowercase #85
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_dollarandstandard_charge | Payer ABC | Ppo | negotiated_percentagewould 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.getPayersPlansin 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 checkCsvValidator.normalizedColumnsto reflect that the normalized column names for columns that include payer-plans no longer preserve capitalization.