Design-Question: Inheritance of HL7Paser and LDTParser

R

ralf

Hi,

I have a design question about 2 Parser I (nearly) wrote. They read
medical result messages in the international HL7-format and the german
LDT-format.
The two share part of their constructors, the main public method
(called "eat"). Most of the private methods do nearly the same. But LDT
and HL7 have very different complexity, so these methods cannot be
merged into a single one.

What I want to achieve is a main Parser -class I can feed the HL7 and
LDT Strings with. The user/using program does not have to know anything
about the existance of the HL7Parser class or the LDTParser class. The
Parser should find out the format of the string and delegate any
further mehod call to the appropriate (Sub)Parser. HL7Parser and
LDTParser should be some kind of hidden to the user of the Parser
class.

I know there are the "Delegator"- and the "Forwardable"-lib, but I am
not sure, if this is the right case for using them. I did not use them
so far.

expecting :)
Ralf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,205
Messages
2,571,067
Members
47,673
Latest member
MahaliaPal

Latest Threads

Top