Repository navigation
Treat an unknown ACK code in an XML response as invalid - #577
Open
Hisham-InfoGleam wants to merge 1 commit into
Open
Hisham-InfoGleam wants to merge 1 commit into
Hisham-InfoGleam wants to merge 1 commit into
Conversation
HL7v2ResponseValidator handles ER7 and XML responses in separate branches. The ER7 branch marks a response as invalid when MSA.1 is not one of the configured successful, error or rejected codes. The XML branch had no such fallthrough: it left the response status unchanged, so a destination that received an XML ACK with an unknown code stayed SENT. Give the XML branch the same fallthrough. The response is QUEUED with "Invalid HL7 v2.x acknowledgement received.", as on the ER7 path. Both branches now share one helper for this. An XML response with no MSA.1 value is invalid too, which matches a missing MSA segment in ER7. The test that pinned the old behaviour now expects the invalid result. A second test covers an XML response without an MSA segment. Part of OpenIntegrationEngine#560 (item 2) Assisted-by: Claude:claude-fable-5-2 Signed-off-by: Hisham Alrashdan <hisham@infogleam.com>
Hisham-InfoGleam
marked this pull request as ready for review
November 13, 2026 05:32
Hisham-InfoGleam
requested review from
a team,
gibson9583,
jonbartels,
kayyagari,
kpalang,
mgaffigan,
pacmano1 and
ssrowe
November 13, 2026 05:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #560 (item 2). Items 1 and 3 are not touched.
HL7v2ResponseValidatorhandles ER7 and XML responses in separate branches. On the ER7 path, an ACK code that is not in the successful, error or rejected lists makes the response invalid. The XML path had no such fallthrough. It left the status unchanged, so the destination stayed SENT.This change gives the XML path the same fallthrough: the response is QUEUED with "Invalid HL7 v2.x acknowledgement received." Both paths now call one small helper for this.
Behaviour change to note
An XML response with no
MSA.1value also becomes invalid, because an empty code matches none of the lists. This matches the ER7 path, where a missing MSA segment is already invalid. Before this change, such a response kept its status.Tests
testXmlUnknownAckCodeLeavesStatusUnchangedis replaced bytestXmlUnknownAckCodeIsInvalid.testXmlMissingMsaIsInvalid../gradlew :server:testpasses locally (850 tests).