HAPI throttles on HL7 Z-segments

I am trying to use HAPI to parse HL7 (v2.3) messages generated by an external system. These messages include user Z segments, including a second message segment (between MSH and EVN).

MSH
Z
EVN
...

The problem is that for any segments analyzed after colliding with this first Z-segment, HAPI will generate a message structure, but all the data in this structure is zero. So, I will still have an EVN segment object, but it will not have any data.

I tried:

  • Nothing, just parse the message with the ready HAPI and ignore this segment.
  • HAPI extension by creating my own ADT message classes (default extension of classes) connecting in the Z segment with:
    • addNonstandardSegment ()
    • add () with a custom implementation of AbstractSegment

My current solution is to pre-parse the message before the HAPI receives it and cuts out this segment, but this is certainly the wrong approach. Does anyone have any ideas on what I should do?

+3
source share
1 answer

Got it. It turns out that because of the Z-segment out of place (more on this below), the EVN object was cataloged internally as "EVN2" and a second empty EVN was added. I'm not quite sure why the code behaved like this, but I will talk about this in the problem report in the HAPI project.

ADT. , Z- this.add() , ADT_A * init(), Z .

, , , parser, - , " " .

+2

Source: https://habr.com/ru/post/1729257/


All Articles