QTY segment missing in 2400 loop for 837

Jan 21, 2015 at 6:24 PM
Been using this fabulous software for several years now - fantastic work!

We started receiving 837P files from a new source and ran into something I thought I'd report. When we run it through the parser we can see the follow exception:

Unhandled Exception: OopFactory.X12.Parsing.Model.TransactionValidationException
: Segment 'SVD122020HC:99100*0' in segment position 11539 within transaction
'000000006' cannot be identified within the supplied specification for transact
ion set 837 in any of the expected loops: 2000A[388],2000B[389],2300. To change
this to a warning, pass throwExceptionOnSyntaxErrors = false to the X12Parser c

The long and short of it is we discovered that the parser wasn't expecting a QTY segment within the 2400 loop. We added the following to the Ansi-837-5010Specification.xml file (after reviewing the 837 spec and being sure that it belongs and what the correct parameters are) and now it works great (Note: The new line added is the last one shown.):
  <Loop LoopId="2400" Usage="Required" LoopRepeat="50">
    <StartingSegment SegmentId="LX" Usage="Required" Repeat="1"/>
    <Segment SegmentId="SV1" Usage="Required" Repeat="1"/>
    <Segment SegmentId="SV5" Usage="Situational" Repeat="1"/>
    <Segment SegmentId="PWK" Usage="Situational" Repeat="11"/>
    <Segment SegmentId="CR1" Usage="Situational" Repeat="1"/>
    <Segment SegmentId="CR3" Usage="Situational" Repeat="1"/>
    <Segment SegmentId="CRC" Usage="Situational" Repeat="5"/>
    <Segment SegmentId="DTP" Usage="Situational" Repeat="35"/>
    <Segment SegmentId="MEA" Usage="Situational" Repeat="5"/>
    <Segment SegmentId="CN1" Usage="Situational" Repeat="1"/>
    <Segment SegmentId="REF" Usage="Situational" Repeat="19"/>
    <Segment SegmentId="AMT" Usage="Situational" Repeat="2"/>
    <Segment SegmentId="K3" Usage="Situational" Repeat="10"/>
    <Segment SegmentId="NTE" Usage="Situational" Repeat="2"/>
    <Segment SegmentId="PS1" Usage="Situational" Repeat="1"/>
    <Segment SegmentId="HCP" Usage="Situational" Repeat="1"/>
    <!-- Institutional Specific Segments-->
    <Segment SegmentId="SV2" Usage="Required" Repeat="1"/>
    <!-- Dental Specific Segments-->
    <Segment SegmentId="SV3" Usage="Required" Repeat="1"/>
    <Segment SegmentId="TOO" Usage="Required" Repeat="25"/>
    <Segment SegmentId="QTY" Usage="Situational" Repeat="1"/>
If anyone sees anything wrong with the approach we took please holler!