From: Tripp, B. <Bry...@uh...> - 2002-06-17 01:08:08
|
Hi Alex, I'm sorry to reply so late -- I've been without access to email for the last few days. To see how many repetitions of a segment exist, you can do group.getAll(String name) (which returns an array) and check its length property. The equivalent for fields is segment.getField(int fieldNumber). Does that do it? Bryan -----Original Message----- From: Alex Harvey [mailto:al...@9p...] Sent: June 13, 2002 1:45 AM To: hl7...@li... Subject: [HAPI-devel] working with AbstractGroup I've not been able to discover from the documentation how to determine how many repetitions of a given field exist in a message. For instance, in many of the A messages the IN1 and IN2 fields may repeat any number of times. I'm unable to tell how many groups of these exist in a given message without catching an exception. I'm sure I am missing something obvious. Thanks, -Alex |