Announcement

Collapse
No announcement yet.

How would convert an ADT^A38 to and ADT^A11 message

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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;
    }

    Comment

    Working...
    X