Florian Backes wrote:
Hi Adriaan,
My MPDoctor's DoctorCode have the same values as the GPNETDoctor DoctorCode, and I can already see this is a problem, because if i do something like this: s x=##class(SCRIPTS.GPNETDoctor).%OpenId(1) then I get a: ERROR #5825: Not an instance of SCRIPTS.GPNETDoctor1 error.
Is this the correct way of doing inheritance or should I rather create seperate classes?
you did it the correct way.
But you can't use the same ids in the inherited class, because your instance of MPDoctor is also an instance of Doctor!
In general: An instance of an inherited class is always an instance of its superclass.
I see, any ideas how to do this the best way then? maybe create a DoctorId but not make it the IdKey?
Regards,
Adriaan Putter Gondwana Soft South Africa
