Hi Constantin-

HAPI doesn't support the batch protocol.  A long time ago someone asked this 
and Bryan responded:  "I'd suggest creating instances of the batch segments 
directly (e.g.
new ca.uhn.hl7v2.model.v24.segment.FHS(null) ), and using the static method
PipeParser.encode(Segment, EncodingCharacters). I.e. encode and write your
FHS to the file, then do the same with BHS, then the same with your
messages, then the trailers."

That works fine for ER7 batch protocol but falls flat for the XML variant.  
I've written up a basic batch structure message that works for the purpose 
of generating batches (for both ER7 and XML) but not for the purposes of 
reading them in since the validator assumes that MSH is going to be the 
first segment in any message (and it won't be if you're using FHS and BHS).

In cases where I'm receiving batches I'll strip out the headers and process 
them separately.  I've heard that support for batches is something that the 
HAPI team want to implement but I don't know what priority that feature has. 
  I'm guessing pretty low since the first question I can find about batches 
in the archives dates from April 2004.

It'd be great if everyone who has an interest in real batch support made 
their interest known.  The HAPI folks won't spend their time implementing 
this unless we all show that there's a need for this feature.

Jim


<quote author="biliboc">

Hi All,

Has anyone worked with/know to work with batches and encapsulate multiple 
MSH between BHS/BTS?
Can I get see an example?

Thanks,
Constantin
</quote>

_________________________________________________________________
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to