Transforming non HL7 message to HL7 Message

What would be the preferred method to create an HL7 message from an input that is not HL7?

Would it be better to take the non-HL7 input and construct an HL7 message in the business service that then gets passed off to a routing process, or would it be best to just pass the non HL7 message to a routing process that called a data transformation to create the HL7 message?

My thought is the later, due to the fact that updates to the creation of the HL7 message are done using the graphical DTL editor rather than editing COS in the service.

 

Comments

There may be arguments in favour of either solution, depending on the types of data involved and programmer preference, but if you are to embrace the full Ensemble "model" then I think the second option is far better.

By putting the non-HL7 into a message sent to a business process,  it gets stored and becomes visible in Ensemble in it's raw form (or as close as you can make it) on the  message queue into that Process. This makes support much easier as you can see before and after messages in the Ensemble GUI. Also, a Business Service should do a minimum of work so that messages are input as fast as possible.

Using DTL is also the cleanest option, since it is meant to transform messages, but I admit that sometimes this is more effort than it is worth. I have had to deal with complex xml documents, and ended up writing methods in my custom message class to make extraction easier to understand in the DTL.

Mike