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

Do not use HL7MessageParser in non-streaming scenario #49

Open
ahives opened this issue Mar 22, 2018 · 0 comments
Open

Do not use HL7MessageParser in non-streaming scenario #49

ahives opened this issue Mar 22, 2018 · 0 comments

Comments

@ahives
Copy link
Contributor

ahives commented Mar 22, 2018

Currently the HL7MessageParser is being used in the non-streaming scenario and we do not enforce the parser blowing up if there is no MSH segment. Below is the conversation we had on a recent PR:

phatboyg commented 4 days ago
But this is for parsing a stream of messages, right?
It should just return Unmatched after the first matching message, instead of throwing an exception.

ahives commented 4 days ago • edited
Hmm, you are partially correct. It gets called for both and maybe that is the problem. For stream this might be bad but the question is that for stream parsing do we retain knowledge of the delimiters? If we do then it is a useless check for both, which means we probably should just hard code the delimiters.

ahives commented 4 days ago
That said, if I have a malformed message that was discovered on the first read then why would I want to continue parsing? Moreover, why would that be considered a successful parse if I find the data I am looking for downstream on a malformed message?

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

No branches or pull requests

1 participant