Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X12 - incorrect mapping #58

Closed
nycbauer opened this issue Jul 26, 2018 · 13 comments
Closed

X12 - incorrect mapping #58

nycbauer opened this issue Jul 26, 2018 · 13 comments

Comments

@nycbauer
Copy link

There is an issue with the L1000A_835Map. It is incorrectly marking the TechnicalContactInformation as required when it is only situational.

As well, all of the PER types segments on this layout should all be SegmentLists as they can repeat up to twice.

@ahives
Copy link
Contributor

ahives commented Jul 26, 2018

@nycbauer Is this still an issue after our chat room discussion?

@nycbauer
Copy link
Author

I've investigated this further, and it's a similar but different issue. In the L1000A loop there are two PER sections, the first is the Payer Business Contact Information, which starts as PERCX, and that is an optional segment, while the next one is the Payer Technical Contact Information which comes in as PERBL, which is required.
When the parser gets to the first PER parser, it says it found it, but it found the PERBL, not the PERCX (which is not found, but is OK). It should also be checking the Contact Function Code to determine if it is in fact the correct match.

@ahives
Copy link
Contributor

ahives commented Aug 14, 2018

If BusinessContactInformation is present it must have at least ContactFunctionCode. Everything else can be empty. Do you have some data that is not real to show the issue so that I can create tests with?

@nycbauer
Copy link
Author

Right, but my situation is where there is no BusinessContactInformation.

You can try this file
Test835x12.txt

ahives added a commit to ahives/Machete that referenced this issue Aug 19, 2018
ahives added a commit to ahives/Machete that referenced this issue Aug 28, 2018
phatboyg pushed a commit to MassTransit/Machete that referenced this issue Aug 28, 2018
@ahives
Copy link
Contributor

ahives commented Aug 28, 2018

fixed in 1.0.239

@nycbauer
Copy link
Author

Issue85_passing.txt
Attached is the same file as above but with an added PERCX line above the PERBL so that it will pass.

@phatboyg phatboyg reopened this Aug 29, 2018
ahives added a commit to ahives/Machete that referenced this issue Aug 29, 2018
phatboyg pushed a commit that referenced this issue Aug 29, 2018
phatboyg pushed a commit to MassTransit/Machete that referenced this issue Aug 29, 2018
@ahives
Copy link
Contributor

ahives commented Aug 30, 2018

If a Layout was defined that has an optional segment of a particular type and the very next property as a required list of segments of the same type the parser gets confused. A good example of this is L1000A_835. It defines a segment BusinessContactInformation that is optional followed by a segment list TechnicalContactInformation that is required. The parser seems to get confused here because if the optional one, BusinessContactInformation, is missing it doesn't understand how to parse the other one. Also, I think this may be a problem moving forward if it confuses these and add BusinessContactInformation into the segment list that is TechnicalContactInformation

@phatboyg
Copy link
Owner

phatboyg commented Sep 4, 2018

So, you realize there isn't any way to differentiate between the two different segments at this point, given how the parser is mapping segments right now, right?

With this:

        Segment<PER> BusinessContactInformation { get; }
        
        SegmentList<PER> TechnicalContactInformation { get; }
        
        Segment<PER> PayerWebsite { get; }

There needs to be a way in the mapping to specify a condition beyond just [0] == "PER" - since it depends upon values defined in other elements of the segment.

@ahives
Copy link
Contributor

ahives commented Sep 4, 2018

Now that I think about it, this is similar to the issue in HL7 for orders where you should be able to OR segments (issue #34). This problem is exceptionally difficult for a couple reasons:

  • Some segments are optional
  • They are of the same type of entity
  • There is a segment list involved
  • They are defined back-to-back

Would it be wrong to just represent it as:
SegmentList<PER> ContactInformation { get; }

I am assuming there is something in the segment that separates them apart anyway.

phatboyg added a commit that referenced this issue Sep 4, 2018
@phatboyg
Copy link
Owner

phatboyg commented Sep 4, 2018

So, this solves the broker test.

ahives added a commit to ahives/Machete that referenced this issue Sep 5, 2018
@phatboyg
Copy link
Owner

phatboyg commented Sep 5, 2018

Dude, you broke the test by putting an invalid character in the time. Look at your diff, that test worked before

ahives added a commit to ahives/Machete that referenced this issue Sep 5, 2018
@ahives
Copy link
Contributor

ahives commented Sep 5, 2018

This is fixed in 1.0.241. Waiting confirmation from @nycbauer

@nycbauer
Copy link
Author

nycbauer commented Sep 5, 2018

Confirmed! Thank you very much!

@phatboyg phatboyg closed this as completed Sep 5, 2018
ahives added a commit to ahives/Machete that referenced this issue Sep 23, 2018
fixed test issue

add more conditions to X12 maps

added conditional logic to several X12 maps

created more conditions in maps and created failing unit test for issue phatboyg#65
ahives added a commit to ahives/Machete that referenced this issue Sep 23, 2018
fixed test issue

add more conditions to X12 maps

added conditional logic to several X12 maps

created more conditions in maps and created failing unit test for issue phatboyg#65

added new failing test for issue phatboyg#65
ahives added a commit to ahives/Machete that referenced this issue Oct 8, 2018
fixed test issue

add more conditions to X12 maps

added conditional logic to several X12 maps

created more conditions in maps and created failing unit test for issue phatboyg#65

added new failing test for issue phatboyg#65

updated readme and added tests for issue phatboyg#65
ahives added a commit to ahives/Machete that referenced this issue Oct 8, 2018
fixed test issue

add more conditions to X12 maps

added conditional logic to several X12 maps

created more conditions in maps and created failing unit test for issue phatboyg#65

added new failing test for issue phatboyg#65

updated readme and added tests for issue phatboyg#65

fixed gitter link
ahives added a commit to ahives/Machete that referenced this issue Oct 10, 2018
fixed test issue

add more conditions to X12 maps

added conditional logic to several X12 maps

created more conditions in maps and created failing unit test for issue phatboyg#65

added new failing test for issue phatboyg#65

updated readme and added tests for issue phatboyg#65

fixed gitter link

added appveyor badge

added nuget version badge

added appveyor test status badge

added appveyor test status badge

added appveyor test status badge

modified the readme

added license section to readme
ahives added a commit to ahives/Machete that referenced this issue Oct 10, 2018
fixed test issue

add more conditions to X12 maps

added conditional logic to several X12 maps

created more conditions in maps and created failing unit test for issue phatboyg#65

added new failing test for issue phatboyg#65

updated readme and added tests for issue phatboyg#65

fixed gitter link

added appveyor badge

added nuget version badge

added appveyor test status badge

added appveyor test status badge

added appveyor test status badge

modified the readme

added license section to readme

modified readme

added more stuff to readme

modified readme

modified readme
ahives added a commit to ahives/Machete that referenced this issue Dec 16, 2018
fixed test issue

add more conditions to X12 maps

added conditional logic to several X12 maps

created more conditions in maps and created failing unit test for issue phatboyg#65

added new failing test for issue phatboyg#65

updated readme and added tests for issue phatboyg#65

fixed gitter link

added appveyor badge

added nuget version badge

added appveyor test status badge

added appveyor test status badge

added appveyor test status badge

modified the readme

added license section to readme

modified readme

added more stuff to readme

modified readme

modified readme

modified readme and tests

updated tests and readme

added tests for X12

added more X12 tests

fixed issue phatboyg#68 and added tests

fixed issue phatboyg#69 and added more X12 parsing tests

added more tests and fixed some X12 schema issues
ahives added a commit to ahives/Machete that referenced this issue Dec 16, 2018
fixed test issue

add more conditions to X12 maps

added conditional logic to several X12 maps

created more conditions in maps and created failing unit test for issue phatboyg#65

added new failing test for issue phatboyg#65

updated readme and added tests for issue phatboyg#65

fixed gitter link

added appveyor badge

added nuget version badge

added appveyor test status badge

added appveyor test status badge

added appveyor test status badge

modified the readme

added license section to readme

modified readme

added more stuff to readme

modified readme

modified readme

modified readme and tests

updated tests and readme

added tests for X12

added more X12 tests

fixed issue phatboyg#68 and added tests

fixed issue phatboyg#69 and added more X12 parsing tests

added more tests and fixed some X12 schema issues

modified X12 schema and added several tests

added more X12 tests

added more X12 parser tests

made some changes to HL7 schema

fixed issue phatboyg#70

added X12 tests and fixed issue phatboyg#68 for both HL7 and X12

added more X12 tests

made some schema changes and added some tests
phatboyg pushed a commit to MassTransit/Machete that referenced this issue Dec 16, 2018
fixed test issue

add more conditions to X12 maps

added conditional logic to several X12 maps

created more conditions in maps and created failing unit test for issue phatboyg#65

added new failing test for issue phatboyg#65

updated readme and added tests for issue phatboyg#65

fixed gitter link

added appveyor badge

added nuget version badge

added appveyor test status badge

added appveyor test status badge

added appveyor test status badge

modified the readme

added license section to readme

modified readme

added more stuff to readme

modified readme

modified readme

modified readme and tests

updated tests and readme

added tests for X12

added more X12 tests

fixed issue phatboyg#68 and added tests

fixed issue phatboyg#69 and added more X12 parsing tests

added more tests and fixed some X12 schema issues

modified X12 schema and added several tests

added more X12 tests

added more X12 parser tests

made some changes to HL7 schema

fixed issue phatboyg#70

added X12 tests and fixed issue phatboyg#68 for both HL7 and X12

added more X12 tests

made some schema changes and added some tests
phatboyg pushed a commit that referenced this issue May 23, 2020
fixed test issue

add more conditions to X12 maps

added conditional logic to several X12 maps

created more conditions in maps and created failing unit test for issue #65

added new failing test for issue #65

updated readme and added tests for issue #65

fixed gitter link

added appveyor badge

added nuget version badge

added appveyor test status badge

added appveyor test status badge

added appveyor test status badge

modified the readme

added license section to readme

modified readme

added more stuff to readme

modified readme

modified readme

modified readme and tests

updated tests and readme

added tests for X12

added more X12 tests

fixed issue #68 and added tests

fixed issue #69 and added more X12 parsing tests

added more tests and fixed some X12 schema issues

modified X12 schema and added several tests

added more X12 tests

added more X12 parser tests

made some changes to HL7 schema

fixed issue #70

added X12 tests and fixed issue #68 for both HL7 and X12

added more X12 tests

made some schema changes and added some tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants