Thanks James,

 

I'll give the addCustomSegment() a try. 

 

At one point I moved from .3 to .42 and it was a pain.  From your note,
I'm guessing moving from .4 up shouldn't be so much work.  I should give
it a try.  I've since done a conversion of the 0.51 Java to C# and I'm
working on converting all our code over.

 

Thanks for the help,

 

Tony

 

From: [email protected] [mailto:[email protected]] On Behalf Of
James Agnew
Sent: Tuesday, October 20, 2009 9:29 PM
To: Tony Kennedy
Cc: [email protected]
Subject: Re: [HAPI-devel] custom segments

 

Hi Tony,

You can actually add a custom segment to messages at runtime fairly
easily, there is a method called "addCustomSegment(String name)" on the
Group class, which is the superclass of Message. Using that, you could
add a custom segment fairly easily, and I'm fairly sure (though not
positive) that this method existed in the 0.4 release.

The one caviat is that this method adds the segment to the end of the
group or message, so you don't have much control over where the segment
ends up. The upcoming 1.0 release actually improves this functionality
quite a bit, allowing you to choose where in the message a custom
segment added at runtime ends up. In addition, very shortly it will be
possible to generate custom message structures or segments using the
Message Workbench Tool and have HAPI generate custom message classes
(this is in CVS already, but documentation isn't yet written. If anyone
wants to know more, I'm happy to explain further).

If I may ask, why is upgrading the library a lot of coding? Definitely
one of our design goals is that new versions should be backwards
compatible, so I'm wondering if there's something that needs fixing. The
one thing that I can think of that broks backwards compatibiity between
0.4 and 0.5 was that 0.4 had incorrect segment group names for HL7 2.4
and 2.5 message types. Is that the source of your issue? I'm thinking it
might be possible to produce structures jars for the newest version of
HAPI that used the old structures names if that was it..

Cheers,
James

On Tue, Oct 20, 2009 at 5:01 PM, Tony Kennedy <[email protected]> wrote:

I'd prefer not to have to modify any source.  I'd like to be able to add
a custom segment just like you can add a custom message package.  But,
I'm not quite sure how to go about that.  Any examples?  I'm using the
0.42 build (no, I don't want to update, it's a LOT of re-coding.)  If I
need to modify source, I can, but as a last resort.

 

Thanks,

Tony

 

 

From: Charles D. Fisher [mailto:[email protected]] 
Sent: Tuesday, October 20, 2009 4:30 PM
To: Tony Kennedy
Cc: [email protected]
Subject: Re: [HAPI-devel] custom segments

 

When you modify source, you don't necessarily have to recompile the
whole thing. You just have to recompile the ones you changed, and then
contrive to have them in the classpath ahead of the standard jar files,
so your modified ones get picked up first. This works for us.

Charles Fisher
Division of Epidemiology
New York State Dept. of Health
518-474-2735

 "Tony Kennedy" <[email protected]>

"Tony Kennedy" <[email protected]> 

2009_10_20 01:55 PM

 

To

 
<[email protected]>



cc





Subject


[HAPI-devel] custom segments

 






Hi all,

Is there a way to add custom segment parsing without having to add code
to HAPI and recompile the whole thing?

Thanks
Tony--------------------------------------------------------------------
----------
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

IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure. It is
intended only for the addressee. If you received this in error or from
someone who was not authorized to send it to you, please do not
distribute, copy or use it or any attachments. Please notify the sender
immediately by reply e-mail and delete this from your system. Thank you
for your cooperation. 


------------------------------------------------------------------------
------
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

 

<<image001.gif>>

<<image002.png>>

<<image003.png>>

------------------------------------------------------------------------------
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