Hi Chris,

I don't personally have any experience with these two types of messages, so
someone else on the list may have better information than me. That said...

Support for non-standard segments is indeed possible with HAPI, but it can
be slightly challenging with the currently released version of HAPI. Using
the addNonstandardSegment(String) method, you can add any number of custom
segments to a message. The method only adds a single repetition of a
segment, but if you wanted 2 reps you can use the get(String, int) method to
retrieve the second repetition once you have added the first using the
aforementioned method. The big problem is that these methods place the extra
segment at the very end of the message or group you add them to, which isn't
always what you want.

If you wanted to go the custom message structure route (probably your best
option with the current version of HAPI), I don't think there are curently
any good examples on the site, but if you downloaded one of the source jars
and copied a few classes into your IDE starting with the existing
QPB_Q11.java it probably wouldn't take to long to get aquainted with the
process.

Things get a whole lot easier in the unreleased version of HAPI currently in
CVS. I plan to have a beta out within the next week or two, but you could
download and build from CVS if you were comfortable with that beforehand. A
new method "addNonstandardSegment(String, int)" is now available which
allows you to specify an arbitrary index to add a nonstandard segment. In
addition, there is a maven plugin which allows you to generate custom
message structures using the Message Workbench tool and then compile these
to custom HAPI structure definitions.

If you're comfortable working on the bleeding edge for a bit, I'm happy to
talk you through the process of getting that working. I'd actually love to
collaborate a bit so that I can get some decent documentation on QPB/RSP
messages.

James


On Mon, Nov 2, 2009 at 9:55 AM, Chris Selwyn <[email protected]>wrote:

> Dear all,
>
> Is there a recommended way to construct QBP_Q11 & RSP_K11 messages?
>
> The message definitions specify that an arbitrary set of segments should
> occur at certain points in the messages.
> However, I can only see support for a single Zxx segment.
>
> Does it involve creating a new customised message structure?
> If so, is there a potted example on how to do so?
>
> Chris Selwyn
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to