Class HL7MessageUtils
java.lang.Object
org.wso2.carbon.inbound.endpoint.protocol.hl7.util.HL7MessageUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ca.uhn.hl7v2.model.MessagecreateDefaultNack(String errorMsg) static org.apache.synapse.MessageContextcreateErrorMessageContext(String rawMessage, Exception errorMsg, org.apache.synapse.inbound.InboundProcessorParams params) static ca.uhn.hl7v2.model.MessagecreateNack(ca.uhn.hl7v2.model.Message hl7Msg, String errorMsg) static org.apache.synapse.MessageContextcreateSynapseMessageContext(ca.uhn.hl7v2.model.Message message, org.apache.synapse.inbound.InboundProcessorParams params) static org.apache.axiom.om.OMElementgenerateHL7MessageElement(String hl7XmlMessage) static org.apache.axiom.om.OMElementgenerateHL7RawMessaegElement(String hl7XmlMessage) static booleangetBoolean(String key, org.apache.synapse.inbound.InboundProcessorParams params) static intstatic ca.uhn.hl7v2.model.Messagestatic ca.uhn.hl7v2.model.Messagestatic ca.uhn.hl7v2.model.MessagepayloadToHL7Message(org.apache.synapse.MessageContext ctx, org.apache.synapse.inbound.InboundProcessorParams params) Get the hl7message from the MessageContext
-
Constructor Details
-
HL7MessageUtils
public HL7MessageUtils()
-
-
Method Details
-
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.HL7Exceptionorg.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.AxisFaultca.uhn.hl7v2.HL7Exception
-
generateHL7MessageElement
public static org.apache.axiom.om.OMElement generateHL7MessageElement(String hl7XmlMessage) throws XMLStreamException - Throws:
XMLStreamException
-
generateHL7RawMessaegElement
-
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
-
getInt
public static int getInt(String key, org.apache.synapse.inbound.InboundProcessorParams params) throws NumberFormatException - Throws:
NumberFormatException
-
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.HL7ExceptionNoSuchElementException
-