-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add 99717-49 Local Code to 76030-6 LOINC mapping #1453
base: main
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
.../cdc/trustedintermediary/etor/ruleengine/transformation/custom/MapLocalObservationCodes.java
Outdated
Show resolved
Hide resolved
PR Code Suggestions ✨Explore these optional code suggestions:
|
Non-issue. IntelliJ flags duplicates. |
We should also update our RS E2E tests to test this. |
…or expected exceptions. Co-authored-by: luis-pabon-tf Co-authored-by: jorg3lopez
Co-authored-by: luis-pabon-tf
Remove an unused import
Add coverage
* refactor: use stream instead of for loop use IllegalArgumentException instead of NullPointerException make tests pass add helper method isLocalCode add helper method processCoding add helper method validateField * refactoring + all tests pass
Manual RS end to end testing was successful. Used file 020 and added an extra OBX for 99717-49:
transformed:
|
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.
Seems like there are some extracted functions that have a single line of code and are used only once. Are they needed? There's a tradeoff when refactoring to extract code to functions and adding too many can create unnecessary overhead. If they are added to help understand what the code does, you could consider adding a comment instead
private void logUnmappedLocalCode(Bundle bundle, Coding coding) { | ||
var msh41Identifier = HapiHelper.getMSH4_1Identifier(bundle); | ||
var msh41Value = msh41Identifier != null ? msh41Identifier.getValue() : null; | ||
private void logUnmappedLocalCode(Coding coding, String msh41Identifier, String messageId) { |
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.
Looks like this is only used once, it has a single line and the content is pretty straightforward. Does it need to extracted into its own function?
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.
Good suggestion. I'll inline the extracting method and keep the logging one as is to keep the logging logic in one area.
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.
What I meant is that we probably don't need logUnmappedLocalCode
as it's adding more abstraction without the benefits. You could directly call logger.logWarning
without putting it into its own function
Quality Gate passedIssues Measures |
Adds 99717-49 Local Code to 76030-6 LOINC mapping
This PR:
transformation_definitions.json
Issue
#1452
This PR covers engineering tasks 1 and 2. Task 3 (Add RS E2E tests for the mapping transformation) will be addressed in another PR.
Checklist
Note: You may remove items that are not applicable