Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BFD-3706: Refactor NPI Enrichment #2471

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft

BFD-3706: Refactor NPI Enrichment #2471

wants to merge 20 commits into from

Conversation

dondevun
Copy link
Contributor

JIRA Ticket:
BFD-3706

What Does This PR Do?

This code refactors the NPI enrichment to a cleaner, more object oriented approach.

The TSV that is stored on disk and in memory at runtime has been changed to use JSON. When the retrieveNPiOrgDisplay() method is called, the JSON is mapped to a POJO (instead of a TSV string, as exists right now). This is a much cleaner approach, which allows all of the information that we could possible need from an NPI enrichment to be stored in a single, easy to understand object. This also allows us to easily add more fields as needed, without the need for much refactoring.

What Should Reviewers Watch For?

If you're reviewing this PR, please check for these things in particular:

What Security Implications Does This PR Have?

Please indicate if this PR does any of the following:

  • Adds any new software dependencies

  • Modifies any security controls

  • Adds new transmission or storage of data

  • Any other changes that could possibly affect security?

  • I have considered the above security implications as it relates to this PR. (If one or more of the above apply, it cannot be merged without the ISSO or team security engineer's (@sb-benohe) approval.)

Validation

Have you fully verified and tested these changes? Is the acceptance criteria met? Please provide reproducible testing instructions, code snippets, or screenshots as applicable.

@dondevun dondevun marked this pull request as draft October 29, 2024 19:24
.providerCredential(providerCredential)
.build();
String json = objectMapper.writeValueAsString(npiData);
dos.write((npi + "\t" + json).getBytes());
Copy link
Contributor

@aschey-forpeople aschey-forpeople Nov 7, 2024

Choose a reason for hiding this comment

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

Since we're in refactoring mode here, I think we may want to also use a CSV writer here instead of hardcoding the tab character. Since we know this NPI data is poorly validated, it's not implausible to think that maybe someone could put a tab character in their org name or something.

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