Repeating element groups within segment for X12 830
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 490
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to parse a X12 830 file, and I am struggling to properly handle the LIN segment.
Within the LIN segment, after the 1st element which is an ID for the LIN loop, it begins alternating between "Product/Service ID Qualifier" and "Product/Service ID". Only the first alternation is required in the specs, but it is capable of alternating 15 times total.
I would like some guidance on how to handle this in three different ways, the first, which is probably going to be more valuable for my use-case, is to use conditions to store the pair of values in objects, as we know the qualifiers that we should be looking for.
The second way I would handle it is to get a list of the potential 15 product/services without explicitly defining each property separately. I am not sure how to loop through this alternating elements similar to how you would handle repeated segments.
The third way, which would be the most robust at handling custom scenarios like this but it the least ideal, would be to be able to store the entire segment in a string and parse it manually. I'm unsure how to do this after looking through documentation.
Below is an example LIN segment that I'm referring to.
LIN*00010*BP*AFH203668*EC*A*CR*5500164382*PD*TIE BAND, FIR TREE MOUNT~
Broken down, the repeating alternations end up being as follows:
1: BP*AFH203668
2: EC*A
3: CR*5500164382
4: PD*TIE BAND, FIR TREE MOUNT
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation file or test is named. Start by reviewing the LIN segment parsing and serialization documentation, then find how repeated segments or variable-length elements are represented. Use the supplied X12 830 LIN example to define and test the desired representation for multiple qualifier/product pairs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100