/** * @see org.openmrs.hl7.HL7Service#processHL7Message(ca.uhn.hl7v2.model.Message) */ @Override public Message processHL7Message(Message message) throws HL7Exception { // Any post-parsing (pre-routing) processing would go here // or a module can use AOP to do the post-parsing Message response; try { if (!router.canProcess(message)) { throw new HL7Exception("No route for hl7 message: " + message.getName() + ". Make sure you have a module installed that registers a hl7handler for this type"); } response = router.processMessage(message); } catch (ApplicationException e) { throw new HL7Exception("Error while processing HL7 message: " + message.getName(), e); } return response; }