-
Notifications
You must be signed in to change notification settings - Fork 6
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
Refactor HapiHL7Message.getName
to return more useful identifier
#1636
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
...2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/external/hapi/HapiHL7FileMatcher.java
Outdated
Show resolved
Hide resolved
PR Code Suggestions ✨Explore these optional code suggestions:
|
HapiHL7Message.getName
to return more useful nameHapiHL7Message.getName
to return more useful identifier
@@ -35,8 +35,8 @@ class HapiHL7FileMatcherTest extends Specification { | |||
def mockInputMessage2 = Mock(Message) | |||
def mockOutputMessage1 = Mock(Message) | |||
def mockOutputMessage2 = Mock(Message) | |||
spyFileMatcher.mapMessageByControlId(mockInputFiles) >> [ "001": mockInputMessage1, "002": mockInputMessage2 ] | |||
spyFileMatcher.mapMessageByControlId(mockOutputFiles) >> [ "001": mockOutputMessage1, "002": mockOutputMessage2 ] | |||
spyFileMatcher.parseAndMapMessageByControlId(mockInputFiles) >> ["001": mockInputMessage1, "002": mockInputMessage2 ] |
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.
Isn't parseAndMapMessageByControlId
now returning a map of string to HapiHL7Message
now? This test here, and below, are still returning a map of a string to Message
. Shouldn't this be updated?
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 catch. I'll update it
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.
Done
Quality Gate passedIssues Measures |
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.
Looking good.
Description
This PR removes
HapiHL7Message.getName
method and addsHapiHL7Message.getIdentifier
which returns MSH-10 that identifies the message. Using this value we can now identify which test message failed for a specific rule in the Automated Test failure logsBefore:
Assertion failed for rule (ORU)
After:
Assertion failed for rule (009)
There is also some refactoring to better isolate the Hapi HL7 library using the
HapiHL7Message
wrapper andHealthData
interfaceIssue
#1621