web stats
Mirth Community - View Single Post - How to preprocess an HL7 message?
View Single Post
  #2  
Old 05-27-2011, 05:12 AM
martzin martzin is offline
What's HL7?
 
Join Date: Oct 2009
Posts: 2
martzin is on a distinguished road
Default

Hi,
create Transformer for receiving channel "Channel Task>Edit Transformer>Add New Step"
Change type of new step to JavaScript

Add this code
Code:
var splited = msg['PV1']['PV1.7']['PV1.7.1'].toString().split(" ");

tmp['PV1']['PV1.7']['PV1.7.1']=splited[0]+","+splited[1];

//for testing only:
logger.error(msg['PV1']['PV1.7']['PV1.7.1'].toString());
logger.error(tmp['PV1']['PV1.7']['PV1.7.1'].toString());
logger.error(splited[0]);
logger.error(splited[1]);
Best regards,
Marcin

Last edited by martzin; 05-28-2011 at 04:14 AM.
Reply With Quote