Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/X12.Hipaa.ClaimParser/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Xml;

using Fonet;
Expand Down
9 changes: 4 additions & 5 deletions src/X12.Parsing/X12StreamReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,12 @@ public X12FlatTransaction ReadNextTransaction()
{
var segments = new StringBuilder();

string segmentString = this.ReadNextSegment();
string segmentId = this.ReadSegmentId(segmentString);
string segmentString;
string segmentId;
do
{
segmentString = this.ReadNextSegment();
segmentId = this.ReadSegmentId(segmentString);
switch (segmentId)
{
case "ISA":
Expand All @@ -195,9 +197,6 @@ public X12FlatTransaction ReadNextTransaction()
segments.Append(this.Delimiters.SegmentTerminator);
break;
}

segmentString = this.ReadNextSegment();
segmentId = this.ReadSegmentId(segmentString);
}
while (!string.IsNullOrEmpty(segmentString) && segmentId != "SE");

Expand Down