Re: [HAPI-devel] How to find Repeating Segments

2012-06-21 Thread tcervantez
Here is some additional info that might help. I found that with the solutions provided here that I had to have the appropriate message version import (i.e. ca.uhn.hl7v2.model.v22.segment.OBX) which was a problem since I use many versions of HL7 messages. So it works best for me to use the terser t

Re: [HAPI-devel] How to find Repeating Segments

2009-08-04 Thread Sharma, Niranjan K (GE Healthcare)
To find the repeating OBX segment..Here is the code snippet: To get at the OBX: ORU_R01 ORU_R01Message = (ORU_R01) theMessage; for (int PATIENT_RESULTRep = 0; PATIENT_RESULTRephttp://p.sf.net/sfu/bobj-july ___ Hl7api-devel maili

Re: [HAPI-devel] How to find Repeating Segments

2009-08-04 Thread Sharma, Niranjan K (GE Healthcare)
, August 04, 2009 8:33 AM To: [email protected] Subject: Re: [HAPI-devel] How to find Repeating Segments Sorry, you're right, I was assuming an ORM O01 message (which I've been burying my head in recently). The same principle applies with an ORU_R01 message, though.

Re: [HAPI-devel] How to find Repeating Segments

2009-08-04 Thread Johnny2R
Sorry, you're right, I was assuming an ORM O01 message (which I've been burying my head in recently). The same principle applies with an ORU_R01 message, though. Try: int obxCount = msg.getPATIENT_RESULT().getORDER_OBSERVATION().getOBSERVATIONReps(); for (int i = 0; i < obxCount; i++) {

Re: [HAPI-devel] How to find Repeating Segments

2009-08-04 Thread Sharma, Niranjan K (GE Healthcare)
@lists.sourceforge.net Subject: Re: [HAPI-devel] How to find Repeating Segments Something like this should work: int obxCount = msg.getORDER().getORDER_DETAIL().getOBSERVATIONReps(); for (int i = 0; i < obxCount; i++) { OBX obx = msg.getORDER().getORDER_DETAIL().getOBSERVATION(i).get

Re: [HAPI-devel] How to find Repeating Segments

2009-08-04 Thread Johnny2R
Something like this should work: int obxCount = msg.getORDER().getORDER_DETAIL().getOBSERVATIONReps(); for (int i = 0; i < obxCount; i++) { OBX obx = msg.getORDER().getORDER_DETAIL().getOBSERVATION(i).getOBX(); //use your terser here String id = terser.get(obx, 1, 0, 1, 1);

[HAPI-devel] How to find Repeating Segments

2009-07-28 Thread nksharma0624
Hello Everybody I am trying to find an API or code hach to get the repeating segments. For example in the ORU_R01 message OBX segments are repeated..How can I iterate on each available OBX and use terser to get the fields So I would like to have something like this: Foreach repSegment find