# 'width' in Interval_Event **Category:** [Technical (archive)](https://discourse.openehr.org/c/technical-archive/156) **Created:** 2007-11-06 11:31 UTC **Views:** 2 **Replies:** 7 **URL:** https://discourse.openehr.org/t/width-in-interval-event/14685 --- ## Post #1 by @Tim_Cook2 All, I originally posted this on the Implementers list but did not receive a response so I will post it here as well and see if anyone/everyone thinks as I do that this should be considered a typo and not a change in the model\. --- ## Post #2 by @Andrew_Patterson > I originally posted this on the Implementers list but did not receive a > response so I will post it here as well and see if anyone/everyone > thinks as I do that this should be considered a typo and not a change in > the model\. Hi Tim, I just was going through my spam folder on gmail and found a few openehr emails from you \- I don't know why gmail is flagging them as spam\.\. but anyway in answer to your question\.\. > The width attribute is defined as a DV\_DURATION type and it is required\. > However the text says that it should be Void if the Interval\_Event is > instantaneous\. There is also an invariant preventing width from being > Void\. I always read this to mean "where the event is instantaneous \(i\.e a POINT\_EVENT\) the duration is void"\. So I would contend that an INTERVAL\_EVENT cannot be instantaneous, rather than allowing the INTERVAL\_EVENT duration to be 0\. I agree that the wording could be better to clarify which interpretation is right\.\. Andrew --- ## Post #3 by @Tim_Cook2 > Hi Tim, I just was going through my spam folder on gmail and found > a few openehr emails from you \- I don't know why gmail is flagging > them as spam\.\. Maybe I should take that as a hint? ;\-> > > The width attribute is defined as a DV\_DURATION type and it is required\. > > However the text says that it should be Void if the Interval\_Event is > > instantaneous\. There is also an invariant preventing width from being > > Void\. > > I always read this to mean "where the event is instantaneous > \(i\.e a POINT\_EVENT\) the duration is void"\. So I would contend > that an INTERVAL\_EVENT cannot be instantaneous, > rather than allowing the INTERVAL\_EVENT duration to be 0\. > > I agree that the wording could be better to clarify which interpretation > is right\.\. Well, I certainly agree that an instantaneous event cannot be an interval event\. However, there is some confusion in \(my mind at least\) using the various DV\_DURATIONS in History\. But the biggest issue I have is in dealing with the fact that an Interval Event has one and only one DV\_DURATION\. DV\_DURATION can never be Void\. It MUST return a valid ISO Date\_Time value\. So maybe there is a typo somewhere in this chain but the fact is that we have a serious conflict here\. \*If\* an interval exists, then it's "width" can never be Void because DV\_DURATION does not allow a Void\. Cheers, Tim --- ## Post #4 by @Greg_Caulton Duration of 0 makes much more sense to me as a duration value of an instantaneous event\. --- ## Post #5 by @Andrew_Patterson > Duration of 0 makes much more sense to me as a duration value of an > instantaneous event\. > > > Well, I certainly agree that an instantaneous event cannot be an > > interval event\. However, there is some confusion in \(my mind at least\) > > using the various DV\_DURATIONS in History\. But the biggest issue I have > > is in dealing with the fact that an Interval Event has one and only one > > DV\_DURATION\. DV\_DURATION can never be Void\. It MUST return a valid ISO > > Date\_Time value\. I'm not really understanding the problem \- HISTORY has a set of EVENT's \(base class\) \- where the event can either be a POINT\_EVENT \(instantaneous, no 'width' attribute in the class definition at all\! therefore meeting the requirement that width is void\), or it can be an INTERVAL\_EVENT \(this class does have a width attribute of type DV\_DURATION, yet semantically can't have a width of 0 duration\)\. It is correct that Interval Event has one and only one DV\_DURATION \- to represent an instantaneous event one has to \_not\_ use the interval event class, instead using the point event class\. Andrew --- ## Post #6 by @thomas.beale Sorry to take so long to respond to this\. I have looked at the specs now\. The specification is correct \- width is required in all INTERVAL\_EVENTs, in fact it is the defiining attribute of an INTERVAL\_EVENT\. There is nothing to stop someone creating an INTERVAL\_EVENT that has a width of 0 at this stage \- the specifications don't prevent it; however, instantaneous events are normally represented as POINT\_EVENTs\. The ambiguity seems to have come from the comment \(obviously a hangover from some previous version of the specification\) in section 6\.2\.4 \(class definition of NITERVAL\_EVENT\) where it says: "Void if an instantaneous event\." This comment should be removed, and possibly some other comment added to clarify if width of 0 should be allowed\. I will add this to the list of Release 1\.0\.2 CRs\. \- thomas beale Tim Cook wrote: --- ## Post #7 by @Tim_Cook2 My point is; IF Interval event exists, then it has an attribute of type DV\_DURATION\. DV\_DURATION has no ability to be Void\. Therefore, IntervalEvent\.width cannot be Void\. While I made a reference to, HISTORY, really has no application to this issue\. I only made a reference so that others can fined it easily\. While there are several DV\_DURATION types in the HISTORY class; my question is only about the DV\_DURATION of the "width" attribute of the Interval Event\. DV\_DURATION \*\*EXPLICITLY\*\* says that it cannot return a Void\. However, the width attribute of the IntervalEvent class says \*explictly\* that it is void when an IntervalEvent is instantaneous\. Yet, DV\_DURATION can \*\*\*NEVER\*\*\* be Void, it must always have a value\. So in simplicity I guess; how can I create a class that cannot return an instance with a void but in some instances this data type is \*expected\* to be void? Cheers, Tim --- ## Post #8 by @Tim_Cook2 Thanks Tom\. I wish I had read this email prior to sending my last one\. :\-\( --- **Canonical:** https://discourse.openehr.org/t/width-in-interval-event/14685 **Original content:** https://discourse.openehr.org/t/width-in-interval-event/14685