From: Rochana A. <ro...@lk...> - 2005-07-08 04:25:20
|
Hi Bryan, Thanks for your reply. I tried to use an external attribute mapping scheme for each external system to overcome this problem without having to change the code. My idea was to map the attributes in my system to the external system attributes since some ext systems don't comply to the HL7 specification completely. The mapping looked something like this: <external-value>PID 3,0</external-value> <interpretation></interpretation> <interpretation-type>equiv</interpretation-type> <my-attribute>PID_fName</my-attribute> e.g. the external value was expressed in the format: [Segment] [Field],[Component],[Subcomponent]. Then I extracted the data from the level of Primitives, Varies, etc. And then things got complicated when I had to check the place where the data was placed in a Message and trying to figure out how to get them out without being version specific. It seemed to vary from case to case. Basically, I couldn't find a way to handle this on a generic level. And it got even more complicated when I tried to handle grouped segments like IN1,ZPA, etc. Is there any documentation that specifies how HAPI handles different types of segments in a generic way? Is it possible to overcome my version problem with a mapping scheme? Rochana. -----Original Message----- From: Bryan Tripp [mailto:bp...@gm...]=20 Sent: Thursday, July 07, 2005 8:04 PM To: Rochana Attale Cc: hl7...@li... Subject: Re: [HAPI-devel] Working with different HL7 versions Hi Rochana,=20 The class ca.uhn.hl7v2.util.Terser provides a version-independent way to get and set field values. It handles some changes between versions automatically, for example if a primitive turns into a composite, then requests for the primitive are interpreted as requests for the first component (which according to HL7 rules is supposed to have the same meaning). If the segment grouping changes between versions though, you have to handle the different cases in your own code. Bryan=20 On 7/7/05, Rochana Attale <ro...@lk...> wrote: >=20 >=20 > Hi, >=20 > =20 >=20 > I have to process HL7 files that come in different versions. How do I handle > this as HAPI defines data types per version (e.g. > ca.uhn.hl7v2.model.v23.datatype, > ca.uhn.hl7v2.model.v231.datatype, > ca.uhn.hl7v2.model.v24.datatype) ? >=20 > =20 >=20 > Rochana. |