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

Map condition doesn't work when SegmentList is followed by Segment of same entity type #65

Open
ahives opened this issue Sep 23, 2018 · 1 comment

Comments

@ahives
Copy link
Contributor

ahives commented Sep 23, 2018

If you have the following data:

...

PER*CX*PROVIDER SERVICES*TE*321321321*UR*www.default.org
PER*BL*PROVIDER SERVICES*TE*321321321*UR*www.default.org
PER*BL*PROVIDER SERVICES*TE*321321321*UR*www.default.org
PER*BL*PROVIDER SERVICES*TE*321321321*UR*www.default.org
PER*IC*PROVIDER SERVICES*TE*321321321*UR*www.default.org

...

...and a map that looks like this...

...
Segment(x => x.BusinessContactInformation, 4,
x => x.Condition = parser => parser.Where(p => p.ContactFunctionCode.IsEqualTo("CX")));
Segment(x => x.TechnicalContactInformation, 5,
x => x.IsRequired().Condition = parser => parser.Where(p => p.ContactFunctionCode.IsEqualTo("BL")));
Segment(x => x.PayerWebsite, 6,
x => x.Condition = parser => parser.Where(p => p.ContactFunctionCode.IsEqualTo("IC")));
...

...then the expectation is that I should be able to match on all PER segments that have a ContactFunctionCode of "BL" and return a SegmentList on the TechnicalContactInformation property. This works but when it is followed by another segment of the same entity type (e.g. PER) with different condition (e.g. ContactFunctionCode = "IC") it will return that segment as part of the previous segment list. This is similar to issue #58 but for segments of the same type coming after a segment list.

I have a failing unit test, Layout835Tests.Verify_can_parse_PayerWebsite_when_multiple_TechnicalContactInformation_segments_present

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
Copy link
Contributor Author

ahives commented Sep 23, 2018

This is also the case when you have only 3 in a row, 1 BusinessContactInformation = CX, 1 TechnicalContactInformation = BL, and 1 PayerWebsite = IC

ahives added a commit to ahives/Machete that referenced this issue Oct 8, 2018
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

1 participant