Hi all,
I want to add a filter so that only AE type messages are routed to my response channel but I seem to be getting error "TypeError: Cannot read property "MSA.1" from undefined"
Anyone know why it's failing?
I want to add a filter so that only AE type messages are routed to my response channel but I seem to be getting error "TypeError: Cannot read property "MSA.1" from undefined"
Anyone know why it's failing?
Code:
var AckResponsePro = globalChannelMap.get('AckResponseProcessor'); var hl7Response = SerializerFactory.getSerializer('HL7V2').fromXML(t mp); var msa1 = hl7Response['MSA']['MSA.1']['MSA.1.1'].toString(); if (msa1 == 'AE') { router.routeMessage(AckResponsePro, hl7Response); } else { return false; }
Comment