# data types - QUANTIFIED.accuracy

**URL:** https://discourse.openehr.org/t/data-types-quantified-accuracy/15674
**Category:** Technical (archive)
**Created:** [5 June 2002 03:19 UTC](https://discourse.openehr.org/t/data-types-quantified-accuracy/15674 "2002-06-05T03:19:17Z")
**Posts on this page:** 6
**Page:** 1

<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: [5 June 2002 03:19 UTC](https://discourse.openehr.org/t/data-types-quantified-accuracy/15674/1 "2002-06-05T03:19:17Z")

</div>

Currently we define DV\_QUANTIFIED.accuracy as a DV\_QUANTITY. This means that the accuracy itself can be a quantity just like the quantity referring to it, e.g. 85kg +/- 2kg, or it can be a percentage, e.g. 85kg +/- 2%. Note that the former is absolute (doesn't change with the magnitude of the value) and the latter is proportional (does change). There is an argument that says that only percentages are ever really needed. If so, this would simplify the model, since we can just have a REAL number rather than a whole other DV\_QUANTITY.

Thoughts?

- thomas beale

---

<div class="post-metadata">

### Author: ![Tim\_Cook5](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/t/e9c0ed/32.png) [@Tim\_Cook5](https://discourse.openehr.org/u/Tim_Cook5)
#### Post date: [5 June 2002 03:43 UTC](https://discourse.openehr.org/t/data-types-quantified-accuracy/15674/2 "2002-06-05T03:43:21Z")

</div>

> Currently we define DV\_QUANTIFIED.accuracy as a  
> DV\_QUANTITY. This means  
> that the accuracy itself can be a quantity just like the quantity

...

> There is an argument that says that only percentages are  
> ever really  
> needed. If so, this would simplify the model, since we  
> can just have a  
> REAL number rather than a whole other DV\_QUANTITY.
> 
> Thoughts?

For the model, DV\_QUANTIFIED.accuracy is more appropriate. If, in  
an implementation, the developers want to accommodate users (person,  
instrument or external application) with a quantity. Then it can be  
converted to a percentage for storage and back again for display if  
desired. My point is that I agree with simplifying when something  
can/should be an implementation issue.

Tim Cook  
Open Paradigms, Consulting  
Open Source Applications Support

---

<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: [5 June 2002 03:53 UTC](https://discourse.openehr.org/t/data-types-quantified-accuracy/15674/3 "2002-06-05T03:53:47Z")

</div>

Tim Cook wrote:

> For the model, DV\_QUANTIFIED.accuracy is more appropriate. If, in  
> an implementation, the developers want to accommodate users (person,  
> instrument or external application) with a quantity. Then it can be  
> converted to a percentage for storage and back again for display if  
> desired. My point is that I agree with simplifying when something  
> can/should be an implementation issue.

so in other words: represent and store as a % but allow input and display as DV\_QUANTITY or %? Hm... this might need an extra flag if the DV\_QUANTIFIED object is to remember whether it was originally in % or quantity form. But that's still quite a bit simpler than what we are doing now (especially as we have to have extra constraints in there saying that DV\_QUANTIFIED.accuracy.is\_simple, meaning it cannot have its own accuracy, as this would be meaningless. It would be nice to get rid of this. I think I am convinced that just by storing a percentage, we get the same effect as the current model.

- thomas beale

---

<div class="post-metadata">

### Author: ![Tim\_Cook5](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/t/e9c0ed/32.png) [@Tim\_Cook5](https://discourse.openehr.org/u/Tim_Cook5)
#### Post date: [5 June 2002 04:36 UTC](https://discourse.openehr.org/t/data-types-quantified-accuracy/15674/4 "2002-06-05T04:36:03Z")

</div>

> so in other words: represent and store as a % but allow input and  
> display as DV\_QUANTITY or %? Hm... this might need an  
> extra flag if the DV\_QUANTIFIED object is to remember whether it

was

> originally in % or quantity form.

Extra flag (attribute) good point.

DV\_QUANTIFIED.is\_quantity BOOLEAN

> of this. I think I am convinced that just by storing a  
> percentage, we get the same effect as the current model.

I agree.

---

<div class="post-metadata">

### Author: ![Tony\_Grivell](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@Tony\_Grivell](https://discourse.openehr.org/u/Tony_Grivell)
#### Post date: [5 June 2002 04:45 UTC](https://discourse.openehr.org/t/data-types-quantified-accuracy/15674/5 "2002-06-05T04:45:45Z")

</div>

> Tim Cook wrote:
> 
> > For the model, DV\_QUANTIFIED.accuracy is more appropriate. If, in  
> > an implementation, the developers want to accommodate users (person,  
> > instrument or external application) with a quantity. Then it can be  
> > converted to a percentage for storage and back again for display if  
> > desired. My point is that I agree with simplifying when something  
> > can/should be an implementation issue.
> 
> so in other words: represent and store as a % but allow input and display as DV\_QUANTITY or %? Hm... this might need an extra flag if the DV\_QUANTIFIED object is to remember whether it was originally in % or quantity form. But that's still quite a bit simpler than what we are doing now (especially as we have to have extra constraints in there saying that DV\_QUANTIFIED.accuracy.is\_simple, meaning it cannot have its own accuracy, as this would be meaningless. It would be nice to get rid of this. I think I am convinced that just by storing a percentage, we get the same effect as the current model.
> 
> - thomas beale

Would it not be more elegant to make the (natural) assumption that the 'accuracy' will always have the same absolute unit as the primary quantity, with a separate flag to indicate a need to \_display\_ as "%"?  
This may have an additional advantage with downstream processing, since most useful calculations (eg statistical or difference comparisons) will be looking for absolute values.

tony grivell

---

<div class="post-metadata">

### Author: ![Tim\_Cook5](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/t/e9c0ed/32.png) [@Tim\_Cook5](https://discourse.openehr.org/u/Tim_Cook5)
#### Post date: [5 June 2002 04:55 UTC](https://discourse.openehr.org/t/data-types-quantified-accuracy/15674/6 "2002-06-05T04:55:50Z")

</div>

> Would it not be more elegant to make the (natural)  
> assumption that

Hmmmm, you are quite correct Tony.  
Your solution is much more natural/obvious.
