From: William B. <wb...@pa...> - 2004-02-29 22:07:56
|
OK here's a newbie question: I worked through the introductory tutorial fine including the interaction between TestPanel and SimpleServer. However when I programmatically read an HL7 file containing: MSH|^~\&| ...blah... |P|2.3|1508 EVN|A08|20031105133757|||hearnm .... into the string stringFromFile. and send it to an instance of PipeParser as parser = new PipeParser() message = parser.parse(stringFromFile) I get: Traceback (innermost last): File "<console>", line 1, in ? Caused by: java.lang.NumberFormatException: For input string: "1508 EVN" at java.lang.NumberFormatException.forInputString(NumberFormatException.jav a:48) at java.lang.Integer.parseInt(Integer.java:477) at java.lang.Integer.parseInt(Integer.java:518) at ca.uhn.hl7v2.model.primitive.CommonNM.setValue(CommonNM.java:105) ... 25 more ca.uhn.hl7v2.model.DataTypeException: ca.uhn.hl7v2.model.DataTypeException: java.lang.NumberFormatException: For input string: "1508 EVN": Segment: MSH (rep 0) Field #12 The same text copied and pasted into TestPanel works fine. I guess the end of the line is not being recognized. Can anything be done to help this? Thanks, Bill Butler Mass General Hospital |