James,
Thank-you very much for the prompt response.
My purpose is currently to build an integration scenario for a
demonstration of performing a HL7 query/response.
I have a decent amount of experience with HL7... just not with
query/response interfaces.
When I looked in the HL7 2.4 spec, I saw the QBP/RSP message pair as the
current way to do request/response and that the QRY/DSR pair is
described as superseded.
So I started building a scenario based on QBP/RSP and that is when I ran
into the issue of how to build and insert the arbitrary segments that I
asked about in my email.
Unfortunately, as far as I can tell the addNonstandardSegment(String)
method cannot add the segment at the correct point in the message.
A subsequent conversation with a colleague has revealed that he has
recently been working on an interface using QRY/DSR for another project.
So I think that, just for the current demo, I may well just revert back
to QRY/DSR until I find that I really need to use QBP/RSP for a real
production project.
I may well come back to you if/when I need to use the newer message pair.
Chris Selwyn
James Agnew wrote:
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] <mailto:[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]
<mailto:[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