Class HL7MessageUtils


  • public class HL7MessageUtils
    extends Object
    • Constructor Detail

      • HL7MessageUtils

        public HL7MessageUtils()
    • Method Detail

      • parse

        public static ca.uhn.hl7v2.model.Message parse​(String msg,
                                                       boolean validate)
                                                throws ca.uhn.hl7v2.HL7Exception
        Throws:
        ca.uhn.hl7v2.HL7Exception
      • parse

        public static ca.uhn.hl7v2.model.Message parse​(String msg,
                                                       ca.uhn.hl7v2.parser.Parser preProcessor)
                                                throws ca.uhn.hl7v2.HL7Exception
        Throws:
        ca.uhn.hl7v2.HL7Exception
      • createSynapseMessageContext

        public static org.apache.synapse.MessageContext createSynapseMessageContext​(ca.uhn.hl7v2.model.Message message,
                                                                                    org.apache.synapse.inbound.InboundProcessorParams params)
                                                                             throws ca.uhn.hl7v2.HL7Exception,
                                                                                    org.apache.axis2.AxisFault
        Throws:
        ca.uhn.hl7v2.HL7Exception
        org.apache.axis2.AxisFault
      • createErrorMessageContext

        public static org.apache.synapse.MessageContext createErrorMessageContext​(String rawMessage,
                                                                                  Exception errorMsg,
                                                                                  org.apache.synapse.inbound.InboundProcessorParams params)
                                                                           throws org.apache.axis2.AxisFault,
                                                                                  ca.uhn.hl7v2.HL7Exception
        Throws:
        org.apache.axis2.AxisFault
        ca.uhn.hl7v2.HL7Exception
      • generateHL7RawMessaegElement

        public static org.apache.axiom.om.OMElement generateHL7RawMessaegElement​(String hl7XmlMessage)
      • createNack

        public static ca.uhn.hl7v2.model.Message createNack​(ca.uhn.hl7v2.model.Message hl7Msg,
                                                            String errorMsg)
                                                     throws ca.uhn.hl7v2.HL7Exception
        Throws:
        ca.uhn.hl7v2.HL7Exception
      • createDefaultNack

        public static ca.uhn.hl7v2.model.Message createDefaultNack​(String errorMsg)
      • getBoolean

        public static boolean getBoolean​(String key,
                                         org.apache.synapse.inbound.InboundProcessorParams params)
      • payloadToHL7Message

        public static ca.uhn.hl7v2.model.Message payloadToHL7Message​(org.apache.synapse.MessageContext ctx,
                                                                     org.apache.synapse.inbound.InboundProcessorParams params)
                                                              throws ca.uhn.hl7v2.HL7Exception,
                                                                     NoSuchElementException
        Get the hl7message from the MessageContext
        Parameters:
        ctx -
        Returns:
        Throws:
        ca.uhn.hl7v2.HL7Exception
        NoSuchElementException