From: Nico V. <ni...@sk...> - 2006-01-16 20:14:33
|
Hi Gerald, This should do the trick: import ca.uhn.hl7v2.util.Terser; ... public ca.uhn.hl7v2.model.Message processMessage(ca.uhn.hl7v2.model.Message message) throws ca.uhn.hl7v2.app.ApplicationException, ca.uhn.hl7v2.HL7Exception { Terser t = new Terser(message); String sendingapp = t.get("/MSH-3-1"); Log.info(sendingapp); .... Regards Nico At 16/01/2006, Gerald Bortis wrote: >Hi all, > >I'm having some trouble getting the sending system field from the MSH >header without casting the message to a specific type. So far I am doing >this: > >PipeParser parser = new PipeParser(); >Message message = parser.parse(messageString); >Segment segment = (Segment) message.get("MSH"); >Type type = segment.getField(3, 0); > >On what object can I call the getValue() method without casting the type >to a specific v2.x datatype? Thanks. > >Gerald > > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > >http://ads.osdn.com/?ad_idv37&alloc_id865&opick >_______________________________________________ >Hl7api-devel mailing list >Hl7...@li... >https://lists.sourceforge.net/lists/listinfo/hl7api-devel |