From: Christian O. <chr...@gm...> - 2015-11-16 14:25:51
|
I think my previous answer also applies to this question. Of course you can also define groups for custom structure classes. Christian 2015-10-27 15:27 GMT+01:00 Davies, Brian <Bri...@mc...>: > I am extending the MFN_M01 message as this is provided by a 3rd party to > an app that I am working on. I extended the MFN_M01 class for example: > > DCS,RXD and MTN extend AbstractGroup and in a package com.mypackage. > sbs.v25.group. However, none of DCS,RXD or MTN are loaded in the custom > model, even though the custom segments are loaded when encountered by the > parser. I adopted HAPI because I wanted to replace the home grown > implementation being used but unfortunately encountering numerous issues. > Casting the class to TFM also results in a class cast exception because > the message type/trigger, field 9 is MFN_M01. > > > > public class TFM extends MFN_M01 { > > public TFM(ModelClassFactory theFactory) { > > super(theFactory); > > init(theFactory); > > } > > private void init(ModelClassFactory factory) { > > try { > > this.add(DCS.class, > true, false); > > this.add(RXD.class, > true, true,false); > > this.add(MTN.class, > true, true,false); > > } catch(HL7Exception e) { > > log.error("Unexpected > error creating TFM", e); > > } > > } > > > > Best Regards. > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |