Throughout the forum, I find examples of using the method getSegmentByIndex to get the segment as I loop through the HL7 message segments.
Today I spent way too long trying to figure out why I could not modify the segment with this same method. I reached out to my more experienced team and I showed where I got the base code from what I was doing, but I myself could not find the documentation of the method.
After some time, we stumbled upon the GetMutableSegmentAt and GetSegmentAt methods and plugged the mutable method in its place and what do you know, it worked!
.png)
.png)
.png)
.png)