Well, I worked on some fine details regarding the Message object that is
being passed into the Terser object, and now I am not getting 'null' for
everything I try to extract from the PID segment, so 2/ I've answered
myself.

But number one still looks like it may pose a problem for my purposes...

+++++++++++++++++++++++++++++++++++++++++

NovaMan wrote:
> 
> I've got a few questions about HAPI for you...
> 
> 1/ I've got HL7 v2.3.1 ORU_R01 messages that are constructed thusly:
> 
> MSH | …
> PID | 1 | …
> NTE | 1 | …
> NTE | 2 | …
> PV1 | 1 | …
> OBR | 1 | …
> OBX | 1 | …
> OBX | 2 | …
> OBX | 3 | …
> .
> .
> .
> OBX | 32 | ...
> OBR | 2 | …
> OBX | 33 | …
> .
> .
> .
> OBX | n | …
> OBX | 1 | …
> OBX | 2 | …
> .
> .
> .
> OBX | n |
> ZU1 |
> ZU2 |
> 
> So there are multiple groups of multiple, contiguous OBX segments with OBR
> segments interspersed between these groups, with 'Z' segments at the end.
> 
> Is there any way to (easily?) process these OBX segments/groups?
> 
> 2/ I've been trying out HAPI on a sample HL7 file and I'm having trouble
> getting the patient ID (or anything else) from the PID segment. It works
> fine for the MSH segment, but as soon as I try the same type of extraction
> technique on the PID segment, I'm getting 'null' values. The code looks
> like:
> 
>       // Retrieve some data from the MSH segment.
>       Terser t = new Terser(hapiMsg);
>       String msgType, msgTrigger, sendingApp, sendingFacility, patientId;
>       try {
>         msgType = t.get("/MSH-9-1");
>         msgTrigger = t.get("/MSH-9-2");
>         sendingApp = t.get("/MSH-3-1");
>         sendingFacility = t.get("/MSH-4-1");
>         patientId = t.get("/.PID-3-1");
>       } catch(HL7Exception HL7e) {
>         logger.error("ProcessHL7Files::process_msg() : HL7Exception thrown in
> process_msg()!");
>         HL7e.printStackTrace();
>         return -1;
>       }
> 
>       logger.info("ProcessHL7Files::process_msg() : 'msgType' = " + msgType);
>       logger.info("ProcessHL7Files::process_msg() : 'msgTrigger' = " +
> msgTrigger);
>       logger.info("ProcessHL7Files::process_msg() : 'sendingApp' = " +
> sendingApp);
>       logger.info("ProcessHL7Files::process_msg() : 'sendingFacility' = " +
> sendingFacility);
>       logger.info("ProcessHL7Files::process_msg() : 'patientId' = " +
> patientId);
> 
> I believe that the '.' character is supposed to be where I have it in the
> line patientId = t.get("/.PID-3-1");
> 
> Any help would be very highly appreciated.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ORU_R01-HL7-message-questions-concerning-HAPI...-tf3960159.html#a11239651
Sent from the hl7api-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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