Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-17 Thread Garrett McTear
rds,**** >> >> Jure >> >> ** ** >> >> ** ** >> >> *From:* James Agnew [mailto:ja...@jamesagnew.ca] >> *Sent:* Wednesday, November 16, 2011 10:50 PM >> *To:* Garrett McTear >> *Cc:* hl7api-devel@lists.sourceforge.net >> *

Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-17 Thread Garrett McTear
Jure > > ** ** > > ** ** > > *From:* James Agnew [mailto:ja...@jamesagnew.ca] > *Sent:* Wednesday, November 16, 2011 10:50 PM > *To:* Garrett McTear > *Cc:* hl7api-devel@lists.sourceforge.net > *Subject:* Re: [HAPI-devel] This Parser and Library are Great! Quick >

Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-16 Thread Jure Grom
ds, Jure From: James Agnew [mailto:ja...@jamesagnew.ca] Sent: Wednesday, November 16, 2011 10:50 PM To: Garrett McTear Cc: hl7api-devel@lists.sourceforge.net Subject: Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though! To that would suggest that your code may

Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-16 Thread James Agnew
To that would suggest that your code may be reading a different message. The one you provided looked like a valid A08 to me, so presumably it would parse as such. Perhaps try: Message msg = (however you are parsing) System.out.println(msg.encode().replace('\r', '\n'); Just to see if the mes

Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-16 Thread Garrett McTear
Specifically, when I do this: ADT_A08 msg = (ADT_A08)msg; I get this error: java.lang.ClassCastException: ca.uhn.hl7v2.model.v231.message.ADT_A01 cannot be cast to ca.uhn.hl7v2.model.v231.message.ADT_A08 On Wed, Nov 16, 2011 at 9:35 AM, Garrett McTear wrote: > James, > Switching operating syst

Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-16 Thread Garrett McTear
James, Switching operating systems and rebuilding took up a lot more time than I had expected. I am up and running now. I am still getting the issue with that particular message being identified as an ADT_A01 message. I will be working on this all day (and for a good while now that I have my wor

Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-11 Thread Garrett McTear
James, I think what you said at the end might be the problem. I do have the latest version of HAPI, but I was using a test txt file to throw messages in. I am switching my operating system today, and may be out of commission most of the day if things do not go smoothly. As soon as I get up and

Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-11 Thread James Agnew
Hi Garrett, Hi Garrett, Strange, I put your message into your code and it seems to work for me. The following: String msgString = "MSH|^~\\&|RAMSOFT|SENDING FACILITY|RAMSOFT|RECEIVING FACILITY|20101223202939-0400||ADT^A08|101|P|2.3.1\r" + "EVN|A08|20101223202939-0400\

Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-10 Thread Garrett McTear
James, This is pretty embarrassing... But I have found the root cause of this. It had to do with how I was putting the test HL7 messages into my test.txt file to be read in. Adding "\r" to the end of the lines in messages that were not working fixed it... I was running in circles ignoring what

Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-10 Thread Garrett McTear
Code Section: Parser p = new GenericParser(); Message hapiMsg; try { hapiMsg = p.parse(out.toString()); logger.info( "doPost() : HL7 successfully parsed" ); } catch (EncodingNotSupportedException e) { logger.info(e.getMessage()); } catch (HL7Exception e) { logger.info(e.getMessage()); } HL7 v2.3.

Re: [HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-10 Thread James Agnew
Hi Garrett, Can you post a code snippet showing the issue you are facing? James On Thu, Nov 10, 2011 at 5:20 PM, Garrett McTear wrote: > I started taking on an HL7 project about two weeks ago. The project was > left by the original programmer with very little documentation. Most of my > time

[HAPI-devel] This Parser and Library are Great! Quick (hopefully) Question Though!

2011-11-10 Thread Garrett McTear
I started taking on an HL7 project about two weeks ago. The project was left by the original programmer with very little documentation. Most of my time has been spent doing research. I have successfully used HAPI to parse messages from all of the version 2.x variants. The problem I ran into, ho