Question
· Oct 13, 2016

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/7ea42a2555b40fea40c7516bec6c3d66

Non-Medicare Example JSON:

https://gist.github.com/zaeem/88b77c112dbd56f8427ca66557a09ab4

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!

Discussion (6)0
Log in or sign up to continue

Disclaimer. I am not familiar with EDI.

Some solutions would be:

  • Get official EDI 271 xsd schema files and import them into Caché
  • Alternatively you can read EDI 271 specification/check examples and write your own classes

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:

  • Old json via %ZEN.proxyObject/%ZEN.auxillary.jsonProvider
  • New json via dynamic objects