Parsing EDI 271 input into JSON output
My organization has been tasked with parsing raw EDI 271 messages into JSON strings in order to feed a downstream application. A few key details about the task:
- The raw EDI 271 will be coming across as a standard format from a single outbound upstream system
- The EDI 271 messages adhere to the 5010 standard
- We do not need EVERY field from the EDI message, only a select number of fields. However some of the fields we need (e.g. coverage details) are dynamic in size and will be variable in # of segments both on the EDI side as well as the receiving JSON side.
- We will be looking to build one incoming business operation for the stream of 271 messages which will then be parsed into Medicare and non-Medicare
- The JSON output has a static format per class of payor (sample can be referenced below for both Medicare and non-Medicare payors):
Medicare Example JSON:
https://gist.github.com/zaeem/
Non-Medicare Example JSON:
https://gist.github.com/zaeem/
Our ask to the community: has anyone tackled a similar situation like this before? If so, can you provide some guidance on how you went about working through this challenge?
Please let me know if any further information would be helpful.
Thanks!
Do you have persistent classes for these messages?
No Eduard
Hi Eduard,
I thought I'd add to my previous response to give some context.
We have not yet established an approach to tackling this issue however based on your question would you suggest that a persistent class is the best place to start? Any pointers in the right direction will be very helpful. Thanks.
If you have classes (persistent or not) producing JSON is much easier.
How will you approach it Eduard?
Please bear in mind some of these fields vary in segment and are dynamic.
Disclaimer. I am not familiar with EDI.
Some solutions would be:
Then you need a dtl to transform incoming message into your new classes. If there's a lot of them maybe it would be better to write one generic transformer or write a transformer generator based on class (which would generate transformation method based on class properties).
After that you can transform your class object into json via several ways:
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue