Has anyone successfully processed HL7 XML batches yet? I noticed there's an option for "process batch files" but it doesn't seem to apply to a file that contains a batch of hl7 messages. I've successfully extracted the batch's payload:
var oru = msg['MESSAGEBATCH']['MESSAGES'].toString();
var hl7 = SerializerFactory.getHL7Serializer(false, false).fromXML(oru);
globalMap.put('oru',hl7);
but I don't know how to split the files and process each message individually. The second line in the script will always fail because the batch contents (the stuff in the CDATA block) isn't going to be valid XML because there's no document root.
Any suggestions on how to implement this would be appreciated. Particularly if there's some feature of Mirth that can do this automatically without a lot of custom transformer javascript programming.
thanks!
var oru = msg['MESSAGEBATCH']['MESSAGES'].toString();
var hl7 = SerializerFactory.getHL7Serializer(false, false).fromXML(oru);
globalMap.put('oru',hl7);
but I don't know how to split the files and process each message individually. The second line in the script will always fail because the batch contents (the stuff in the CDATA block) isn't going to be valid XML because there's no document root.
Any suggestions on how to implement this would be appreciated. Particularly if there's some feature of Mirth that can do this automatically without a lot of custom transformer javascript programming.
thanks!
Comment