Hi Francois, Any chance you could post a complete block of code that illustrates the issue? (I.e. including putting your input message into a string, parsing it, and then performing your read loop on the resulting message?)
The most common cause for this kind of behaviour (i.e. segments not showing up when they should) is messages containing unexpected segments or segments out or order, which results in the parser putting further segments in weird places, but there are a few other things that can lead to this kind of thing. Cheers, James On Wed, Mar 17, 2010 at 12:42 PM, <[email protected]> wrote: > Hi, > I am trying to get the values of certain fields contained in this OBX > segment : > OBX||ST|1010.1^BODY WEIGHT||62|kg|||||F|||20100317|<cr> > This is a segment of an ADT^A01 message > > String obsSubID=""; > java.util.ArrayList<String> listObservationValue = new > java.util.ArrayList(); > for (int i = 0; i < message.getOBXReps(); i++) { > obsSubID=message.getOBX(i).getObservationSubID().getValue(); > for (int j = 0; j < > message.getOBX(i).getObservationValueReps(); j++) { > > listObservationValue.add(message.getOBX(i).getObservationValue(j).getData().encode()); > //TODO Check > > } > //here are stored obsSubID and the listObservationValue > } > Problem : Although I have a segment OBX not empty, getOBXReps() is equals to > 0. Then when the operation getOBX(i) is called, it creates a new empty > segment OBX and doesn't give me the existant OBX segment. (triggering an > unbounded loop) > > What can I do to get the values of this segment and not to create a new one > each time getOBX is called? > Thanks > François Chapuis > > ********************************* > This message and any attachments (the "message") are confidential and > intended solely for the addressees. > Any unauthorised use or dissemination is prohibited. > Messages are susceptible to alteration. > France Telecom Group shall not be liable for the message if altered, changed > or falsified. > If you are not the intended addressee of this message, please cancel it > immediately and inform the sender. > ******************************** > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Hl7api-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Hl7api-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hl7api-devel

