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 <brian.dav...@mckesson.com>:

> 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
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to