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-3875 adding a shadow flag to test Samhsa 2.0 changes with ConsentInterceptorSimulation #2561

Draft
wants to merge 2 commits into
base: feature/samhsa2.0
Choose a base branch
from

Conversation

MahiFentaye
Copy link
Contributor

@MahiFentaye MahiFentaye commented Feb 20, 2025

JIRA Ticket:
BFD-3875

adding a shadow flag to test Samhsa 2.0 changes with ConsentInterceptorSimulation

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.

…w flag

BFD-3875 add V2SamhsaConsentSimulatiion to test Samhsa 2.0 with shadow flag
Copy link
Contributor Author

@MahiFentaye MahiFentaye Feb 20, 2025

Choose a reason for hiding this comment

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

changes in SecurityTagManager.java are just recommended refactor, not related to the shadow flag change

Bundle v2SamhsaScrubbedResource =
(Bundle) v2SamhsaConsentSimulation.simulateScrubbing(requestDetails, resourceCopy);
v2SamhsaConsentSimulation.logMissingClaimIds(v2SamhsaScrubbedResource, bundleResource);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my question here is that bundleResource which comes from createBundleFor already went through the old way of scrubbing SAMHSA data. And will it make sense to have another resource or duplicate createBundleFor without the SAMHSA filter being applied?

Copy link
Contributor

@aschey-forpeople aschey-forpeople Feb 20, 2025

Choose a reason for hiding this comment

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

Thinking about this some more... rather than trying to compare the resources after they've been modified, it might be easier/more performant to just compare the outputs of the functions that say whether the claim has SAMHSA data. For the old code, that would be samhsaMatcher.test(claim) and shouldRedactResource(resource) for the new one. It doesn't exercise the entire flow, but I think we can be reasonably sure the rest of the code works as long as the logic that determines if SAMHSA data is present works correctly.

return new ArrayList<>();
}

List<String> securityTags = queryTagsForClaim(claimId, tagClass).stream().toList();
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't strictly related to this PR, but I just noticed that this is going to be doing a separate DB query for each claim. That might be okay since the query is simple, but some EOB resources will have a lot of claims which means a lot of roundtrips to the database. We may want to think about loading these in a single query.

…w flag

BFD-3875 add V2SamhsaConsentSimulatiion to test Samhsa 2.0 with shadow flag
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.

2 participants