Sorry for my flippant response... I forgot that bhs's were batch headers. So
far as i'm aware, HAPI doesn't directly support the batch mechanism... The
parser always expects a message to start with an MSH... Personally, I'd just
strip the bhs/bts off and split the messages out one-by-one. Alternatively, if
you've got control over the sending and receiving systems, just envelope the
messages in mllp and you're good to go...
PK
On 2011-02-18, at 5:33 PM, "venu gopal" <[email protected]> wrote:
Hi Jonathan,
Yes, It was a typo. I figured out later.
But even though, I corrected it, I was getting the same exception.
Exception in thread "main" ca.uhn.hl7v2.parser.EncodingNotSupportedException:
Can't parse message beginning BHS|^~\&||IHS0032||MA0000|199505221605||VAXBAX9505
at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:156)
at
com.org.hl7.v231.SendAndReceiveAMessage.main(SendAndReceiveAMessage.java:86)
Hey Patrick,
So if I don't want to start with BHS, how will I parse 2 messages or more?
Any sugegstions??
From: Jonathan Bartels <[email protected]>
Cc: [email protected]
Sent: Fri, February 18, 2011 11:20:56 AM
Subject: Re: [HAPI-devel] Hapi newbie
Typo, you want to concatenate strings on line 5., msg+=msgBHS+msgBTS.
From: venu gopal [mailto:[email protected]]
Sent: Friday, February 18, 2011 1:34 PM
To: rahul somasunderam
Cc: [email protected]
Subject: Re: [HAPI-devel] Hapi newbie
Hi,
I am trying to use BHS segment to parse 2 or more messages of type (ADTA01 or
any other message type). But I tried to parse just one message first as shown
in below..
String msg = "MSH|^~\\&|HIS|RIH|EKG|EKG|199904140038||ADT^A01|12345|P|2.2\r";
String msgBHS =
"BHS|^~\\&||IHS0032||MA0000|199505221605||VAXBAX950522G||11254||\r";
String msgBTS = "BTS|||\r";
msg = msgBHS+msgBTS;
Parser p = new GenericParser();
Message adt = p.parse(msg);
I am getting the below stack trace...
Exception in thread "main" ca.uhn.hl7v2.parser.EncodingNotSupportedException:
Can't parse message beginning BHS|^~\&||IHS0032||MA0000|199505221605||VAXBAX9505
at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:156)
at
com.org.hl7.v231.SendAndReceiveAMessage.main(SendAndReceiveAMessage.java:86)
Any suggestions from you guys.. Please advice.
From: rahul somasunderam <[email protected]>
To: venu gopal <[email protected]>
Cc: [email protected]
Sent: Mon, February 7, 2011 10:55:26 AM
Subject: Re: [HAPI-devel] Hapi newbie
Venu,
The ADT_A08 message uses the structure of the ADT_A01.
If you have the html version of the spec, look
at /v26/hl7v26eventA08.htm.
So if you're creating a message, then use the ADT_A01 structure and then
set the MSH-9 to ADT^A08.
If you're parsing one, then be prepared to receive an ADT_A01. And check
for the value in MSH-9.
R,
rahul
On Mon, 2011-02-07 at 10:42 -0800, venu gopal wrote:
> nt versions of HAPI, but I found it only in version 2.3.1. Can we have
> the same message in version 2.6? Please let me know your sugegstions..
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel