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

Subcomponent 1 with no delimiter #101

Open
valainisgt opened this issue Nov 20, 2024 · 0 comments · May be fixed by #102
Open

Subcomponent 1 with no delimiter #101

valainisgt opened this issue Nov 20, 2024 · 0 comments · May be fixed by #102

Comments

@valainisgt
Copy link

valainisgt commented Nov 20, 2024

When you attempt to get subcomponent 1 and there is no subcomponent delimiter, the value is truncated to just the first character. For example, given the HL7 segment:

NME|foo^bar|

performing the following operation:

segment.getComponent(1,2,1)

returns b as opposed to bar.

If the segment is instead:

NME|foo^bar&|

then you get bar as expected.

This is a bit of a corner case since any subcomponent other than the first would require the subcomponent delimiter.

This example may not technically comply with the HL7 standard (I don't actually know), but I have seen large vendors send the first example and they are not willing to change.

@valainisgt valainisgt linked a pull request Nov 20, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant