# DV\_DURATION as ranges

**URL:** <https://discourse.openehr.org/t/dv-duration-as-ranges/15132>\
**Category:** Technical (archive)\
**Created:** [13 January 2012 11:28 UTC](https://discourse.openehr.org/t/dv-duration-as-ranges/15132 "2012-01-13T11:28:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yampeku](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yampeku/32/25_2.png) [@yampeku](https://discourse.openehr.org/u/yampeku)\
**Post date:** [13 January 2012 11:28 UTC](https://discourse.openehr.org/t/dv-duration-as-ranges/15132/1 "2012-01-13T11:28:42Z")

</div>

As Ian suggested I copy this issue from CKM to the technical list.  
I have seen that in some archetypes (e.g. Apgar or BloodPressure) that  
use DV\_Duration restrictions (such as the width of the interval event  
in the blood pressure archetype or the famous offset in the apgar  
archetype) define them like this:

offset existence matches {1..1} matches {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DV\_DURATION[at0040] occurrences matches  
{0..1} matches { --  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value existence matches {1..1} matches {|PT10M|}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

As you can see, even if it is a single default value (10 minutes),  
they are defined as ranges. As durations allow the definition of  
default values (and they parse correctly) I think they should be  
changed to this:

offset existence matches {1..1} matches {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DV\_DURATION[at0040] occurrences matches  
{0..1} matches { --  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value existence matches {1..1} matches {PT10M}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

As checking a concrete value is always easier than a range I would  
suggest to change them to that.

---

<div class="post-metadata">

**Author:** ![yampeku](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yampeku/32/25_2.png) [@yampeku](https://discourse.openehr.org/u/yampeku)\
**Post date:** [25 January 2012 22:56 UTC](https://discourse.openehr.org/t/dv-duration-as-ranges/15132/2 "2012-01-25T22:56:35Z")

</div>

No comments about this one?

---

<div class="post-metadata">

**Author:** ![thomas.beale](https://discourse.openehr.org/user_avatar/discourse.openehr.org/thomas.beale/32/35_2.png) [@thomas.beale](https://discourse.openehr.org/u/thomas.beale)\
**Post date:** [30 January 2012 15:50 UTC](https://discourse.openehr.org/t/dv-duration-as-ranges/15132/3 "2012-01-30T15:50:42Z")

</div>

I thought I had replied to this, but must not have. Anyway, I don't  
understand why single point values are not used either, rather than  
point ranges (which seem somewhat pointless 😉

- thomas

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [30 January 2012 21:10 UTC](https://discourse.openehr.org/t/dv-duration-as-ranges/15132/4 "2012-01-30T21:10:22Z")

</div>

Hi Tom and Diego,  
The reference workbench only has an interval constraint on duration as it is  
the logical constraint. If this is a point duration then it still expresses  
a range. Not sure if this has changed over time.  
Cheers, Sam
