Hi James,

First of all i would like to thank for pointing out the backward compatibility feature. I will restructure my application based on that.

Also I will take a look at the Terser class and try to use it in my application.

Thanks
Ram

On 11/23/2011 06:47 PM, James Agnew wrote:
Hi Ram,

You might have a look at the Terser class, which can help you populate messages in a more generic way: http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/ExampleUseTerser.html

One thing to note is that the structures are backwards compatible (this is a feature of the HL7 standard itself, not just of HAPI). Each new version adds fields to the end of segments, adds segments to messages, and deprecates certain parts of existing structures, but does not fundamentally alter the structures. You could actually just use a v25 structure to create a v23 message for example, so long as you:

1. Set the MSH-12 (Version) value to "2.3"
2. Use care not to populate fields/segments in the 2.5 structure that are not used in the 2.3 equivalent.

Cheers,
James

On Wed, Nov 23, 2011 at 1:27 AM, Ram <r...@visolve.com <mailto:r...@visolve.com>> wrote:

     Hi All,

    I am developing an small application to generate the HL7 messages
    using
    HAPI. HAPI is very much helpful for me to develop the application.
    But,
    I do not have much exposure in all the HAPI classes.

    I can able to generate the HL7 messages successfully. But i did
    not use
    generic approach for all the versions of HL7 message.

    Currently I am using different methods for each version. For example,

    createV231MSHSegement(ca.uhn.hl7v2.model.v231.segment.MSH);
    createV251MSHSegement(ca.uhn.hl7v2.model.v251.segment.MSH);

    Is there any class in the HAPI to make this generic single method? Can
    anyone suggest me the better solution to my issue.

    Thanks
    Ram

    
------------------------------------------------------------------------------
    All the data continuously generated in your IT infrastructure
    contains a definitive record of customers, application performance,
    security threats, fraudulent activity, and more. Splunk takes this
    data and makes sense of it. IT sense. And common sense.
    http://p.sf.net/sfu/splunk-novd2d
    _______________________________________________
    Hl7api-devel mailing list
    Hl7api-devel@lists.sourceforge.net
    <mailto:Hl7api-devel@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/hl7api-devel



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to