Leo-
Thanks for the reply it helped me zero in on the problem.  If you try your code 
with version 2.3.1 you will get an exception.  It seems like a bug with the 
terser because it works with every other version.  I don't think the spec is 
really any different so i am kind of lost here.  Work around anyone?

Date: Wed, 12 Dec 2007 09:57:07 +0100
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [HAPI-devel] terser problem

It works for me:
        ADT_A01 msg2 = new ADT_A01();
        Terser t2 = new Terser(msg2);
        t2.set("/INSURANCE(0)/IN1-1", "1");
        t2.set("/INSURANCE(1)/IN1-1", "2");


        t2.set("MSH-1", "|");
        t2.set("MSH-2", "^~\\&");

        Parser p = new GenericParser();
        System.out.println(p.encode(msg2));

luck!



On 12/12/2007, epic winter <[EMAIL PROTECTED]> wrote:





I am trying to add the insurance group to my ADT_A01 and I keep getting :
Caused by: ca.uhn.hl7v2.HL7Exception: End of message reached while iterating 
without loop

I am only setting the IN1 segmant and I only have problems when adding the 
second iteration.  I address the first one as: "/.INSURANCE(0)/IN1....."

When I reference the second as "/.INSURANCE(1)/IN1....." I get the error.  

As far as I can tell the insurance group can be repeated.  Am I reading the 
spec wrong or is my syntax wrong?  

thanks

-Ryan

Share life as it happens with the new Windows Live. 
Share now!

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.

http://sourceforge.net/services/buy/index.php
_______________________________________________

Hl7api-devel mailing list
[email protected]

https://lists.sourceforge.net/lists/listinfo/hl7api-devel




_________________________________________________________________
Share life as it happens with the new Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to