abstract data types

Hi All,
Could it be possible to use an abstract data type (like DV_ORDERED, DV_AMOUNT, …) as a type for any data?

Regards
Masoumeh
|

Hi Masoumeh,

yes you can do so.
when you assign the value, you need to assign it to the sub class.

ex. in java:

DvAmount da;
DvCount dc = new DvCount(10);
da = dc;

In case you have DvAmount (assigned to DvCount object), and you want the DvCount object, you can cast it like this:

dc = (DvCount ) a;

Hope this help,

cheers,

Kruy Vanna


Hi Masoumeh,

This is particularly useful when archetyping lab results where the exact pattern of lab reporting and units is extremely variable. We specify a Result element in a parent lab test archetype with a data type of ANY, which can be redefined within a specialisation or at template level to the correct local data type. This allows us to minimise the number of archetypes and give a consistent path to the Result node, which is important for querying purposes.

Ian

Dr Ian McNicoll
office / fax +44(0)141 560 4657
mobile +44 (0)775 209 7859
skype ianmcnicoll
ian@mcmi.co.uk

Clinical Analyst Ocean Informatics ian.mcnicoll@oceaninformatics.com
BCS Primary Health Care Specialist Group www.phcsg.org

2009/6/8 Vanna <kruyvanna@gmail.com>

Ian McNicoll wrote: