In general, you don't have to cast to a specific message structure class: the parser returns a Message object, and you can obtain segments using message.get("segment-name") , and from a Segment you can obtain a field using segment.getField(field-number). If that's not generic enough, take a look at ca.uhn.hl7v2.preparser.PreParser.
cheers Christian 2013/1/9 steven touw <tou...@gmail.com>: > Hello, > I am new to HL7 as well as it's contents. I hope this question isn't too > stupid. > I'm trying to read from messages generically - is there any way to grab > particular segments without having to cast the Message object into ADT_A05 > for example? I could have various ADT_* and trying to find the best way to > do this... > > Thanks, > Steve > > ------------------------------------------------------------------------------ > Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery > and much more. Keep your Java skills current with LearnJavaNow - > 200+ hours of step-by-step video tutorials by Java experts. > SALE $49.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122612 > _______________________________________________ > Hl7api-devel mailing list > Hl7api-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ Hl7api-devel mailing list Hl7api-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hl7api-devel