From: Sharma, N. K (GE Healthcare) <nir...@me...> - 2009-08-04 17:49:00
|
Thanks Johnny..For note here... I was doing the same but I did not realized that I was not passing the values with parameterized strings. It works. Here is the snapshot. ORU_R01 ORU_R01Message = (ORU_R01) theMessage; for (int i = 0; i<ORU_R01Message.getPATIENT_RESULTReps(); i++) { for (int j = 0; j<ORU_R01Message.getPATIENT_RESULT(i).getORDER_OBSERVATIONReps(); j++) { for (int k = 0; k<ORU_R01Message.getPATIENT_RESULT(i).getORDER_OBSERVATION(j).getOBSERVA TIONReps(); k++) { String terserPath = "/PATIENT_RESULT(" + i + ")/ORDER_OBSERVATION(" + j + ")/OBSERVATION(" + k + ")/OBX-3"; String value= t.get(terserPath); logger.debug(value); logger.debug("k=" + k); } } } -----Original Message----- From: Johnny2R [mailto:gr...@jm...] Sent: Tuesday, August 04, 2009 8:33 AM To: hl7...@li... 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. Try: int obxCount = msg.getPATIENT_RESULT().getORDER_OBSERVATION().getOBSERVATIONReps(); for (int i = 0; i < obxCount; i++) { OBX obx = msg.getPATIENT_RESULT().getORDER_OBSERVATION().getOBSERVATION(i).getOBX( ); //use your terser here String id = terser.get(obx, 1, 0, 1, 1); String value = terser.get(obx, 5, 0, 1, 1); } Of course, you may have to take account of any repetitions (I'm assuming one ORDER_OBSERVATION). -- View this message in context: http://www.nabble.com/How-to-find-Repeating-Segments-tp24700999p24809784 .html Sent from the hl7api-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------ ------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel |