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

Fix: MSH offset on array getters and setters #141

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LucasMontorio
Copy link
Collaborator

Description

Fixes #123

The MSH-1 field has a special behaviour, and does not appear in the output of the HL7 string for this segment, hence breaking the indexing of the other fields by causing an offset.
This PR fixes the offset and restores the order of indexes as expected.

Checklist

  • 💡 The PR has a concise and explicit title
  • 📝 The PR contains a clear description of the changes
  • 🧪 There are unit tests that prove that the fix is effective or that the feature works

…nd #[]= methods to respect the order of fields
@Stratus3D
Copy link
Contributor

Rubocop is failing.

@LucasMontorio
Copy link
Collaborator Author

Rubocop is failing.

Thanks, it's fixed

@LucasMontorio
Copy link
Collaborator Author

Rubocop is failing.

Thanks, it's fixed

Hi @Stratus3D, is there anything else blocking in the PR according to you? :)

Copy link
Contributor

@Stratus3D Stratus3D left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understate the index offset logic. I don't have time to put into this project, so I'll leave this PR up to you. I'd be nice if one of the other old maintainers could weight in on PRs like this.

@LucasMontorio
Copy link
Collaborator Author

Not sure I understate the index offset logic. I don't have time to put into this project, so I'll leave this PR up to you. I'd be nice if one of the other old maintainers could weight in on PRs like this.

I'll keep it open at least until the preparation of the next version bump, in hope for another review. Thanks for checking it anyway

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 this pull request may close these issues.

Are segment field idx numbers supposed to match HL7 field seq numbers?
2 participants