Question
· Dec 8, 2016

JSON to HL7

I have a project to convert a JSON message with two patient identifiers into an HL7 ADT^A31.  Is there any documentation or training that you would think is appropriate?

 

Currently using Ensemble 2014.1.5 on AIX

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

The example at this URL in the documentation shows how to create a REST business service which retrieves JSON data, converts it to a proxy object, and then extracts values from the proxy object to store in a response:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

Assuming you are retrieving your JSON data from a REST service, your use case is similar.  Instead of storing the values in a response, you would want to create a new request class to hold the values.  Replace pResponse in the example with an instance of your new request class, fill it with data from the JSON proxy object, then send it to a message router component with ..SendRequestAsync.

Then, in your message router, you can add a DTL which transforms your new request class into an ADT_A31 HL7 message.