This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
It all depends on type of message being parsed (is it a custom HL7 message ? which parser is being used etc).
I recently started using HAPI... We have a custom message which contains multiple OBXs. The approach we taken is we build custom extension to HAPI which based on examples from the source code...
Not knowing the message type, I'll assume ORU_R01 message.
First we have understand the ORU_R01 structure.
Summarizing the message structure:
It consists of a header segment (MSH) and collection of segments which are "grouped". This group is required and repeats...
The group is further divided into two subgroups. First contains patient and visit information. The second group contains order information and results. The results which is composed of OBX and NTE segments is required and repeats..
To parse the message there are number of options. The easiest to learn is using the generic parser.. but you'll need to navigate the message...
Terser is another parser option you can use when using HAPI... I personally don't have much experience with is it... Hope this helps