Adding my 2 cents...
I stuck with the Java Object-Oriented way (I like compile-time checks and my
IDE's auto-completion), and wrote conversion methods to our classes for
Segments and Data Types. I end up having a Message method for each unique ADT
message, but they are all VERY short. All the
013 8:20 AM
To: Laurent Hasson
Cc: [email protected]
Subject: Re: [HAPI-devel] reading HL7 generically
Thank you all, very helpful.
On Thu, Jan 10, 2013 at 7:55 AM, Laurent Hasson
wrote:
This is the kind of code we have been using for that purpose:
try
{
_PID = new HL
; Laurent Hasson;
Subject: Re: [HAPI-devel] reading HL7 generically
Hi Steven,
The model actually is- There is an ADT_Axx Java type for each HL7 message
type, which has all of the segments in reusable Java types as well. The
method suggested below by Laurent (and others) is taking advantage of that
gt;
>>> On Thu, Jan 10, 2013 at 9:48 AM, Carlos Oliva wrote:
>>>
>>>> How would you examine repetitive segments with the Preparser? To carry
>>>> out a completely generic parsing, one could retrieve data with the
>>>> preparser like Christian mentioned
examine repetitive segments with the Preparser? To carry
>>> out a completely generic parsing, one could retrieve data with the
>>> preparser like Christian mentioned.
>>>
>>> ** **
>>>
>>> One problem might be with several instances
t;>
>> ** **
>>
>> One problem might be with several instances of the same segment in one
>> message. How would you retrieve the fields from all these segments?
>>
>> ** **
>>
>> *From:* steven touw [mailto:[email protected]]
>> *Sent:* Thursday, January 10, 201
ssage. How would you retrieve the fields from all these segments?
>
> ** **
>
> *From:* steven touw [mailto:[email protected]]
> *Sent:* Thursday, January 10, 2013 8:20 AM
> *To:* Laurent Hasson
>
> *Cc:* [email protected]
> *Subject:* Re: [HAPI-devel] reading HL7 generi
all these segments?
From: steven touw [mailto:[email protected]]
Sent: Thursday, January 10, 2013 8:20 AM
To: Laurent Hasson
Cc: [email protected]
Subject: Re: [HAPI-devel] reading HL7 generically
Thank you all, very helpful.
On Thu, Jan 10, 2013 at 7:55 AM, Laurent Hasson
re prohibited without proper authorization. If you are
> not the intended recipient (or have received this e-mail in error) please
> notify the sender immediately and destroy this e-mail. Any unauthorized
> copying, disclosure or distribution of the material in this e-mail is
> strictly forbidden
rom: Christian Ohr [mailto:[email protected]]
Sent: Thursday, January 10, 2013 2:58 AM
To: steven touw
Cc: [email protected]
Subject: Re: [HAPI-devel] reading HL7 generically
Forgot to mention that you currently still need to include the
hapi-structure jar(s) in yo
Forgot to mention that you currently still need to include the
hapi-structure jar(s) in your classpath, depending on the HL7
version(s) you expect. You can also use the CanonicalModelClassFactory
with your parser, then you only need the latest structure jar.
In HAPI 2.1 (not released yet), you will
In general, you don't have to cast to a specific message structure
class: the parser returns a Message object, and you can obtain
segments using message.get("segment-name") , and from a Segment you
can obtain a field using segment.getField(field-number). If that's not
generic enough, take a look at
Hello,
I am new to HL7 as well as it's contents. I hope this question isn't too
stupid.
I'm trying to read from messages generically - is there any way to grab
particular segments without having to cast the Message object into ADT_A05
for example? I could have various ADT_* and trying to find the
13 matches
Mail list logo