#116 AbstractSegment Insert Repetion Fails

closed-fixed
nobody
None
5
2011-05-22
2011-03-31
No

When inserting a repetition in the last field of the segment, the insertRepetion method fails because the check on the fieldNum parameter is incorrect. The boolean expression on line 556 reads

if (fieldNum < 1 || fieldNum >= fields.size())

Because field number is indexed starting at 1 according to the HL7 standard, the expression must read

if (fieldNum < 1 || fieldNum > fields.size())

This will allow inserts to the last field in a segment. The same problem exists in the removeRepetion method.

Discussion

  • James Agnew

    James Agnew - 2011-05-22
    • status: open --> closed-fixed
     
  • James Agnew

    James Agnew - 2011-05-22

    Thanks for submitting!

    This fix has been applied and will be released in version 1.2 of HAPI.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks