Remove class templates from history package

Description

The history package classes HISTORY, EVENT, INTERVAL_EVENT and POINT_EVENT all have class templates.

ref: http://www.openehr.org/releases/RM/latest/docs/data_structures/data_structures.html#_overview

Class templates are useful for generic operations to depend on an unknown class, but none of those classes have such operations, and it is no clear that the templates add any value to the model.

Also, HISTORY and EVENT are linked to ITEM_STRUCTURE, so removing the template T > ITEM_STRUCTURE won't affect those classes.

IMO, on this case, class templates just make the model more difficult to read and also more difficult to implement and I'm not sure all modern programming languages support UML class templates.

I would like to know what others think. This is not an issue per-se, just a simplification I had in mind for some time.

Environment

None

Activity

Show:
Thomas Beale
April 4, 2016, 9:52 AM

The main purpose of templated classes here is that they enable the correct type specification of the relevant elements. E.g. HISTORY<ITEM_TREE> rather than HISTORY<ITEM_TABLE>. However, these ITEM_STRUCTURE sub-types are not used much, and everything these days is just an ITEM_TREE. How to remove this has been discussed extensively on the wiki - https://openehr.atlassian.net/wiki/display/spec/openEHR+2.x+RM+proposals+-+lower+information+model

Technically speaking this is a breaking change, so it would need to go in RM 2.x.

Pablo Pazos
April 4, 2016, 4:44 PM

I agree this can be addressed by simplifying the lower information model, I even have a proposal there to remove ITEM_STRUCTURE and subclasses and just use CLUSTER/ELEMENT

Reporter

Pablo Pazos

Labels

Components

Affects versions

Priority

Major
Configure