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

Are segment field idx numbers supposed to match HL7 field seq numbers? #123

Open
Obversity opened this issue Apr 5, 2023 · 0 comments
Open

Comments

@Obversity
Copy link

Obversity commented Apr 5, 2023

Hi guys,

Question: does the segment field idx match up to the HL7 spec's field seq numbers? E.g. should MSH-9 (Message Type) be accessible via msg[:MSH][9]?

Background: Trying to build a tool to dynamically extract data from HL7 segments by users specifying the Segment name and the field number.

Problem: I immediately ran into problems doing that, discovering that in the MSH segment, the field with IDX = 9 isn't the Message Type field.

image

All documentation on HL7 MSH segment indicates that the Message Type should be MSH-9.

I figured maybe it was just zero-based indexing and I could offset by one, but that doesn't seem to be the case for other segments, e.g. for this OBR segment, 4 is the correct sequence for the Universal Service Identifier, and that's what's in the file I'm looking at.

image

Some clarification would be great so I can confidently use the library, thanks in advance!

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