Naturally just as we have released a version of the data types, I realised there was a class which should have been included!
I propose to add an abstract parent of the classes DV_DATE, DV_TIME, DV_DATE_TIME, called DV_REAL_WORLD_TIME. Its only features at the moment are timezone: DV_DURATION, and the invariant for timezone guaranteeing that it is within -1200 - +1200. The reasons I propose to add it are:
- it captures the timezone and any other real world time characteristic we think of in one place
- prevents the 3-fold repetition of timezone semantics in the 3 subtypes, which was the previous situation
- provides a useful class for implementors to hang other real world time implementation features off
- correctly differentiates the 3 absolute types based on real world time from the 4th time type, DV_DURATION, which does not include any real-world time semantics
- it makes no difference to the concrete date/time types - the final result is still the same as in version 1.41 of the specification.
I could not think of a better name than "real world time". Other contenders are perhaps "Calendar time" (however, calendars are really about years/months/dates) and "Universal time", which is defined as time based on the rotiation of the earth (previously called Greenwich mean time).
I propose to add an abstract parent of the classes
DV_DATE, DV_TIME,
DV_DATE_TIME, called DV_REAL_WORLD_TIME. Its only
features at the moment
are time zone: DV_DURATION, and the invariant for time zone
guaranteeing
that it is within -1200 - +1200.
Q1 - any objections to the addition of the class?
Not from here.
Q2 - any ideas for a better name?
The name (DV_REAL_WORLD_TIME) is very appropriate.
There are three data points - the 'Universal time' (at latitude 0 or GMT)
and 'the offset' to calculate 'local time'.
It seems to me that the EHR will probably be based on local time - and
recording the offset once per the transaction would give the absolute time
of an event. This would deal with key events occuring over the period of
change to day light saving (which could be important from a decsions support
point of view) and the timing of events when someone is travelling and has
had treatments in different countries - probably less important.
There are three data points - the 'Universal time' (at latitude 0 or GMT)
and 'the offset' to calculate 'local time'.
What I have proposed as "world time" is really of course "universal time", but I didn't call it that because people tend to think of that phrase as meaning an actual timeline - it sounds a bit strange as a parent class for DATE, DATE_TIME and TIME. Anyway, at David Lloyd's suggestion, I have shortened it to DV_WORLD_TIME.
It seems to me that the EHR will probably be based on local time - and
recording the offset once per the transaction would give the absolute time
of an event.
This is how we did it in GEHR, and according to good data modelling, probably how you would do it. The main reasons to add the timezone to each date/time is that it is easier for computation - any query, API call, EHR extract which grabs the date/time automatically gets the timezone offset; no need to hunt around in the Transaction header.
This would deal with key events occuring over the period of
change to day light saving (which could be important from a decsions support
My current understanding of daylight savings is that the place it applies to e.g. Pacific North America, Central Europe etc, moves into a different timezone for a certain number of months. THis means that timezone records the effect of daylight savings as well.
point of view) and the timing of events when someone is travelling and has
had treatments in different countries - probably less important.
The VHA has this as one of their use cases - people being treated on board planes or other transport, or at either end.