Re: [HAPI-devel] ZBE-Segment

2011-03-23 Thread James Agnew
Hi Ismet, You need to tell your parser to use your custom message type instead of the default one that comes with HAPI. Essentially, by default, when HAPI finds ADT^A01 in MSH-9, the parser uses a "ModelClassFactory" to figure out which message structure to instantiate, and by default it chooses t

Re: [HAPI-devel] ZBE-Segment

2011-03-23 Thread Çelebi , Ismet
Thank you so much for your help everybody. I would like to share my work I have done till now. I did not wante to modify the current hapi code, so I made an extended class of ADT_A01. Finally I am getting a ClassCastException, which I can't tell why. java.lang.ClassCastException: ca.uhn.hl

Re: [HAPI-devel] ZBE-Segment

2011-03-23 Thread Charles D. Fisher
We tried using generic classes for our Z-segment (ZLR, "Z segment for Lab Reporting") for version 2.3 ORU^R01, but ultimately found it simpler to just build a new segment class out of the available field classes, using other segment sources (it's open source!) as models. Attached is the source fo

[HAPI-devel] AW: ZBE-Segment

2011-03-23 Thread Stefan.Koehler
Hi Ismet, just recently tested two variants wo. asking for implementing national specific definitions: * Leave it as is - HAPI parses those messages kind without error but the following drawbacks: * The parser returns a GenericMessage instead of an ADT-message. The terser, however, succes