-
Notifications
You must be signed in to change notification settings - Fork 33
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
base: master
Are you sure you want to change the base?
Conversation
.providerCredential(providerCredential) | ||
.build(); | ||
String json = objectMapper.writeValueAsString(npiData); | ||
dos.write((npi + "\t" + json).getBytes()); |
There was a problem hiding this comment.
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.
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.