web stats
How would convert an ADT^A38 to and ADT^A11 message - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2018, 04:09 PM
Rubicon Rubicon is offline
OBX.2 Kenobi
 
Join Date: Feb 2013
Posts: 98
Rubicon is on a distinguished road
Default How would convert an ADT^A38 to and ADT^A11 message

Hello all,
I'm getting little confused on how I can convert an A38 (cancel pre-admit) messages to an A11 (cancel admit) message. So if an A38 Message comes into Mirth I will need to convert that to an A11 and then send that converted A11 message to the vendor.

Is this possible to do in Mirth Version 2.2.1 ?

Thanks!

Rubi
Reply With Quote
  #2  
Old 04-15-2018, 11:25 PM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 167
seaston is on a distinguished road
Default

Code:
var MessageEvent = msg['MSH']['MSH.9']['MSH.9.2'].toString();
if (MessageEvent == "A38") {
	MessageEvent = "A11";
	msg['MSH']['MSH.9']['MSH.9.2'] = MessageEvent;
	msg['EVN']['EVN.1']['EVN.1.1'] = MessageEvent;
}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:43 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Mirth Corporation