From: Sara F. <sar...@gm...> - 2014-06-26 09:49:02
|
Hi, I am working on sending the HL7 message to PAM simulator <http://gazelle.ihe.net/PatientManager/pdc/PDC.seam?cid=4835#>, but I am facing the below error. I am unable to resolve this. > ca.uhn.hl7v2.model.DataTypeException: Failed validation rule for value > "MSH": Matches the regular expression (\+|\-)?\d*\.?\d*: Segment: ERR Field > #2 > at ca.uhn.hl7v2.model.AbstractPrimitive.setValue(AbstractPrimitive.java:89) > at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:408) > at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:351) > at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:1119) I am using this sample <https://svn.code.sf.net/p/hl7api/code/branches/RELEASE_1_0/hapi-mvn/hapi-examples/src/main/java/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.java> as helper code. I have committed the code to Git hub <https://github.com/saramirza14/openmrs-module-IHEInteroperability/tree/hapi/api>, for you to have a look. Here is where <https://github.com/saramirza14/openmrs-module-IHEInteroperability/blob/hapi/api/src/main/java/org/openmrs/module/IHEInteroperability/CreateMessageUtility.java> I am creating the HL7 message, and this is the code <https://github.com/saramirza14/openmrs-module-IHEInteroperability/blob/hapi/api/src/main/java/org/openmrs/module/IHEInteroperability/SendMessageUtility.java> which I am using to send message to the PAMSimulator. This is the message which I am sending, > MSH|^~\&|TestSendingSystem||PAMSimulator||||^A05^ADT > A05|20140626150246|P|2.5.1|123 > PID||71|||Barber^Steve|||||^ABVGJ|&13 Park > Street^^Ina^ANB^7899^INHJ|||||^MARRIED|||||||Hyd|||^Indian Thanks & Regards Sara Fatima |