-
Notifications
You must be signed in to change notification settings - Fork 155
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
Add support for removing fields by index or by item/type #75
Conversation
HAPI link is a dead link. As I have no context for this change, I'll close. If still needed or reopened, please provide updated link for comparison. |
@Usualdosage the closest link I found which exists is: @nkm8 can you find in the new documentation what you were referring to? |
@Usualdosage found the new version of the link: |
to do this we would need to add functionality to AbstractSegment.cs |
@nkm8 its hard to tell what your changes are because it looks like the methods have been moved around, could you update the PR to only show the changes required to add the functionality. |
@milkshakeuk There weren't any merge conflicts, but I pulled from master and updated the PR. If you ignore the whitespace changes, the PR is straight-forward: https://github.com/nHapiNET/nHapi/pull/75/files?diff=split&w=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the discussion, this seems fine, I may add some unit tests at some point anyway.
Manually merged to avoid merge bubble of nhapi/master into nkm8/scratch and better preserve the git history as if nkm8/scratch had been rebased first before the PR merge.. |
I am surprised no one has required this functionality before, but I need the ability to remove specific instances of repeatable fields. This is not an ideal solution because I don't have the means (documentation) to re-generate the Model classes from a database properly. However, this solution is flexible enough to cover my use case.
This functionality already exists in
hapi
: http://hl7api.sourceforge.net/v26/apidocs/src-html/ca/uhn/hl7v2/model/v26/segment/PV1.html#line.388FindField
was added as a helper method because I also have a pull request dib0/NHapiTools#5 to update nHapiTools to generate extension methods for removing repeatable fields.I am open to alternative approaches or any suggestions you may have.