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

MSH.24.2 should not be marked as required #518

Open
MarceloLaser opened this issue Apr 11, 2024 · 0 comments
Open

MSH.24.2 should not be marked as required #518

MarceloLaser opened this issue Apr 11, 2024 · 0 comments

Comments

@MarceloLaser
Copy link

Describe the bug
Same as described in #76.

To Reproduce
Attempt to convert any otherwise valid and supported HL7v2 message which contains an MSH segment but not the MSH.24 field.

Expected behavior
FHIR resource is created including a MessageHeader resource.

Desktop (please complete the following information):

  • OS: macOS
  • Version Sonoma 14.2

Additional context
I have run into the same problem described in issue #76, that is, that the MessageHeader resource is not created when MSH.24 is absent. This is due to MSH.24.2 being required in secondary/Source.yml. The specification listed by @pbhallam (https://www.hl7.org/fhir/messageheader.html) marks source as required, but not endpoint. Also, secondary/Destination.yml has a different format for its endpoint, despite being represented the same way in HL7v2: for Destination, it allows the converter to fall back on MSH.6 if MSH.25 is absent.

To clarify, the faulty behavior is not that the conversion fails altogether, but rather that a FHIR bundle is generated without a MessageHeader resource. This may be why you were unable to reproduce the issue previously. I am currently running into the same problem when using either the source code from the current master branch, or the version 1.1.0 dependency from Maven Central (https://mvnrepository.com/artifact/io.github.linuxforhealth/hl7v2-fhir-converter/v1.1.0).

My recommendation would be to unmark endpoint in both Source.yml and Destination.yml as required, and to either modify Source.yml to allow falling back on MSH.4, or modify Destination.yml to disallow falling back on MSH.6 (this option seems more in line with the FHIR specification). I'd be happy to send in a PR making these changes, if there is agreement that it is an appropriate solution.

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