Hi NIranjan,

It's possible, but it depends on how you are constructing those ACKs. If you
are using DefaultApplication.makeAck(Segment), you'll be fine as it uses the
version string as opposed to the structure version to figure out what
version to create.

In other words, if you have an instance of
ca.uhn.hl7v2.model.v26.message.ACK
with MSH-12 set to "2.3", then a version 2.3 ack will be created.

Whatever method you are using, you can always go back and change MSH-12 back
manually anyhow.

Cheers,
James

On Thu, Jul 23, 2009 at 8:29 PM, Sharma, Niranjan K (GE Healthcare) <
[email protected]> wrote:

>  James,
>
>
>
> When one create a custom ModelClassFactory Implementation and return
> V2.6(lets say) message, will not cause trouble when we send ACK with 2.6
> version in it for a sender of V2.3.1 message?
>
>
>
> Thanks.
>
>
>
> Regards
>
> -Niranjan.
>
>
>
> *From:* James Agnew [mailto:[email protected]]
> *Sent:* Thursday, July 23, 2009 1:04 PM
> *To:* Kamp, Daniel (GE Healthcare)
> *Cc:* [email protected]
> *Subject:* Re: [HAPI-devel] How to access repeating fields using the
> genericMessage type
>
>
>
> Hi Daniel,
>
>
> Two obvious solutions jump out at me.
>
> One, using the terser (as you mention) should be fairly easy.
>
> An example from code we use here is to pass it "/.PID-3(0)-1", then
> "/.PID-3(1)-1", then "/.PID-3(3)-1" to retrieve the various IDs in PID-3.
>
> One other option you might try is to subclass PipeParser and in your
> subclass, override the parse(String) method to have it replace all of the
> version strings with the most recent one you need (for instance have it
> replace the first instance of "2.1", "2.2", etc with "2.6"). That way your
> message will always be parsed as a 2.6 message. HL7 is designed to be
> backward compatible, so this should also work.
>
> Actually, thinking about this more (sorry for the rambling email!) an even
> better solution along the same vein would be to implement a custom
> ModelClassFactory that always returns 2.6 objects regardless of version and
> pass that to your pipe parser.
>
> Hopefully this gives you some ideas!
>
> Cheers,
> James
>
>  On Thu, Jul 23, 2009 at 2:36 PM, Kamp, Daniel (GE Healthcare) <
> [email protected]> wrote:
>
> Good afternoon,
>
> I am trying to write a transformer which converts an HL7 message to a local
> object graph.  In doing so, I need to account for repeating fields.
>
>
>
> For example, PID-5 can have multiple names and we need to parse it out into
> a List of PatientName objects (each PatientName object contains family name,
> given name, and name type code).
>
>
>
> Since we need to support many versions of HL7 we can not use a specific v
> 2.x model data types.  Instead we are relying on the generic:
>
>     ca.uhn.hl7v2.model.Message
>
>     ca.uhn.hl7v2.util.Terser
>
> to parse the message.
>
>
>
> I have had a difficult time finding simple examples of parsing repeating
> fields using these generic classes.
>
>
>
> I realize if we used
>
>      ca.uhn.hl7v2.model.v25.message
>
> it would be easier to do this, but we need to remain version agnostic.
>
>
>
> Can anyone assist me in a simple way to extract a repeating field as
> mentioned above?
>
>
>
> Thank you in advance,
>
> Dan
>
>
>
> Dan Kamp
>
> GE Healthcare
>
> Information Technologies - Global Engineering
>
> Shared Asset Solutions
>
> T (847) 277- 4327
> D *567-4327
>
> E [email protected]
>
> www.gehealthcare.com
>
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
>
------------------------------------------------------------------------------
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to