Add support for removing fields by index or by item/type#75
Add support for removing fields by index or by item/type#75nkm8 wants to merge 2 commits intonHapiNET:masterfrom
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 |
milkshakeuk
left a comment
There was a problem hiding this comment.
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.388FindFieldwas 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.