From: abraham t. <tio...@ro...> - 2003-08-12 01:32:48
|
Yup it is pretty crazy. But hey, that's hl7. Multiplicity is a bother for sure, especially when there's no easy way to refer to repitition of GROUPS of segments. in xml, one node name contains a easily and consistently indexed hierarchy of nodes. As to the problem: if i can find a get() method that takes an index, i go for it, and write nested loops. I'm seriously considering a name-indexed method that will do a tree traversal on an entire parsed message from the root. It would be pretty inefficient, but as long as a user of my app isn't watching an hour glass while i tool around in a message's basement, it would save lazy me some coding time. Has someone already done this ? -----Original Message----- From: Phillip Tornroth <pto...@co...> Date: Mon, 11 Aug 2003 13:30:02 To:hl7...@li... Subject: [HAPI-devel] message segment counts I'm pretty new to hapi, and I'm having trouble figuring out this construct.. I have an object of type RDE_O11_ORCRXONTERXRRXCNTERXERXRRXCOBXNTECTI... crazy. Anyways, I can make calls like getRXE() and getORC(), but I don't know how to deal with multiplicity. There are two RXC calls. One that takes an int index, and one that does not. The one that takes an index seems like what I want, but what's my mechanism for iterating them? Is there a count/length/size somewhere, or am I expected to call the method starting at index = 0 until I get a null or exception? thanks, -Phill ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel abraham tio md, manager: systems implementation toronto rehabilitation institute |