Rong Chen wrote: > Thomas Beale wrote: > >> >> >> Hi Kerry, >> >> there are two ways to see this. The orthodox oo modelling approach is >> to say: if your model defines X (concrete) as a subtype of Y (also >> concrete) then at runtime, an X is always acceptable in a variable of >> type Y. By this argument, archetypes should not try to circumvent this. > > > What I am wondering now is during automated object creation process, > it has to be clear which concrete class to be instantiated - either X > or Y ? Apparently the end user will not supply the class name to the > system ;) > > My guess is that the choice has to be made before 'operational' > archetypes are created based on some extra input from local settings, > for instance a localized template.
it might be, it might also be decided dynamicaly by the application. A typical example is DV_DATE and DV_PARTIAL_DATE. It will only be known at runtime whether a DV_PARTIAL_DATE is needed - i.e. the user doesn't know the day for some particular date field in a screen form. I think we will have to see implementation and application experiences to find out what is most common. Certainly it does need to be settable in templates. - thomas - If you have any questions about using this list, please send a message to d.lloyd at openehr.org

