# DV\_PROPORTION vs DV\_QUANTITY for %

**URL:** https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421
**Category:** Technical (archive)
**Created:** [3 January 2019 06:58 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421 "2019-01-03T06:58:32Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![siljelb](https://discourse.openehr.org/user_avatar/discourse.openehr.org/siljelb/32/12_2.png) [@siljelb](https://discourse.openehr.org/u/siljelb)
#### Post date: [3 January 2019 06:58 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/1 "2019-01-03T06:58:32Z")

</div>

Hi everyone, happy new year!

We’ve just hit a question about modelling choices, how to represent percentages. We have a data type DV\_PROPORTION, which can be used to represent any proportion such as a fraction or a percentage, and we have the DV\_QUANTITY data type which can have % as the unit. In most existing archetypes such as the OBSERVATION.pulse\_oximetry archetype, we’ve used the DV\_PROPORTION data type for the percent elements, while for some reason in the draft EVALUATION.alcohol\_consumption\_summary archetype we’ve chosen DV\_QUANTITY with the unit ‘%’ for the “Strength” element.

We’ve had a look at the data types documentation ([https://specifications.openehr.org/releases/RM/latest/data\_types.html](https://specifications.openehr.org/releases/RM/latest/data_types.html)), and we can’t really find any guidance in the examples there. Is there any guidance about this anywhere else? Does anyone have any opinions about when to use each data type for percentages?

Kind regards,  
**Silje Ljosland Bakke**

Information Architect, RN

Coordinator, National Editorial Board for Archetypes  
Nasjonal IKT HF, Norway

Tel. +47 40203298

Web: [http://arketyper.no](http://arketyper.no/) / Twitter: [@arketyper\_no](https://twitter.com/arketyper_no)

---

<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: [3 January 2019 08:37 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/2 "2019-01-03T08:37:10Z")

</div>

I think DV\_QUANTITY is the option here. Someone could argue that % is not a proper unit, but it is, both in UCUM and SNOMED CT.

DV\_PROPORTION should be only used when you want to maintain the numerator and denominator explicitly separated, as a fraction, which should not be the case with percentages. But it is true that the definition of the type attribute in the specification is a bit misleading: “Indicates semantic type of proportion, including percent, unitary etc.”

---

<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: [4 January 2019 19:38 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/3 "2019-01-04T19:38:22Z")

</div>

David is right on all counts - use DV\_QUANTITY, but we should fix that line in the specification. Can someone raise a PR on that please.

- thomas

---

<div class="post-metadata">

### Author: ![siljelb](https://discourse.openehr.org/user_avatar/discourse.openehr.org/siljelb/32/12_2.png) [@siljelb](https://discourse.openehr.org/u/siljelb)
#### Post date: [4 January 2019 20:40 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/4 "2019-01-04T20:40:20Z")

</div>

In that case, I don't understand the use case for the 'percent' and 'unitary' variants of the DV\_PROPORTION data type. What are they for?

Regards,  
Silje

---

<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: [5 January 2019 12:07 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/5 "2019-01-05T12:07:23Z")

</div>

Hi Silje,

See [here](https://specifications.openehr.org/releases/RM/latest/data_types.html#_ratios_and_proportions). But I think the % case may have been there since early 2000s and either % was not in UCUM, or perhaps it was, but we did not realise it. So ideally we should change the documentation to obsolete it in DV\_PROPORTION.

- 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: [5 January 2019 12:56 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/6 "2019-01-05T12:56:36Z")

</div>

There is a very clear use-case for having it there - O2 levels variably and equivalently described a FiO2 which is a unitary proportion or percent.

I think we need to keep it for that reason if no other.

Ian

---

<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: [5 January 2019 14:36 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/7 "2019-01-05T14:36:14Z")

</div>

So in that case we need to upgrade the documentation for when to choose a DV\_QUANTITY percent, and when a DV\_PROPORTION %.

- thomas

---

<div class="post-metadata">

### Author: ![siljelb](https://discourse.openehr.org/user_avatar/discourse.openehr.org/siljelb/32/12_2.png) [@siljelb](https://discourse.openehr.org/u/siljelb)
#### Post date: [7 January 2019 12:02 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/8 "2019-01-07T12:02:34Z")

</div>

I think maybe actual modelling practice should be taken into account here. Since these guidelines haven't been available, several important percentages in published archetypes have been modelled as DV\_PROPORTION:  
openEHR-EHR-CLUSTER.inspired\_oxygen.v1 [https://ckm.openehr.org/ckm/#showArchetype\_1013.1.393](https://ckm.openehr.org/ckm/#showArchetype_1013.1.393)  
openEHR-EHR-OBSERVATION.pulse\_oximetry.v1 [https://ckm.openehr.org/ckm/#showArchetype\_1013.1.3084](https://ckm.openehr.org/ckm/#showArchetype_1013.1.3084)

The way I understand the arguments here, there isn't a good one for changing these data types and going to v2 for these archetypes?

Regards,  
Silje

---

<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: [7 January 2019 12:11 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/9 "2019-01-07T12:11:45Z")

</div>

Hi Silje,

As you say, I think this a case of emerging clarity (or less fog of confusion!!) as the various use-cases emerge. As the primary author of both these archetypes, in retrospect I would probably keep inspired\_oxygen as DV\_PROPORTION and change pulse\_oximetry to DV\_QUANTITY but!!! I do not see any good argument for changing these now. We have to expect some degree of inconsistency, and live with it, to avoid unnecessary breaking changes.

Ian

---

<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: [7 January 2019 17:56 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/10 "2019-01-07T17:56:00Z")

</div>

one thing to note: DV\_PROPORTION is a more complex data structure. I would be tempted to try to determine what use has been made of this archetype so far - i.e. in creating real data. If no real data has been created, then it could in theory be changed.

- 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: [7 January 2019 18:13 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/11 "2019-01-07T18:13:00Z")

</div>

Simple answer - loads of real data - pulse\_oximetry and Oxygen levels will have been recorded hundreds of thousands if not millions of times in patient data - and Proportion _is_ the correct datatype for O2 levels.

Ian

---

<div class="post-metadata">

### Author: ![siljelb](https://discourse.openehr.org/user_avatar/discourse.openehr.org/siljelb/32/12_2.png) [@siljelb](https://discourse.openehr.org/u/siljelb)
#### Post date: [8 January 2019 13:52 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/12 "2019-01-08T13:52:32Z")

</div>

I still don’t understand if we have a conclusion. And I don’t understand why proportion is the correct data type for O2 levels but not for alcohol levels.

Regards,

**Silje**

---

<div class="post-metadata">

### Author: ![siljelb](https://discourse.openehr.org/user_avatar/discourse.openehr.org/siljelb/32/12_2.png) [@siljelb](https://discourse.openehr.org/u/siljelb)
#### Post date: [14 January 2019 12:08 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/13 "2019-01-14T12:08:53Z")

</div>

Anyone…? 😊

---

<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: [14 January 2019 12:19 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/14 "2019-01-14T12:19:45Z")

</div>

As far as I understand in oxygen levels the denominator is not 100 but a quantity, and that denominator may vary. I don’t know how it is measured in alcohol, but probably % of alcohol in blood assuming always the same quantity to get the percentage?  
I’m not really sure anyway 🙂

---

<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: [14 January 2019 14:03 UTC](https://discourse.openehr.org/t/dv-proportion-vs-dv-quantity-for/14421/15 "2019-01-14T14:03:03Z")

</div>

Sorry - the reason is that O2% is also described as FIO2 which is directly mathematically equivalent.

FiO₂  
Proportion  
Optional

Fraction of oxygen in inspired air.  
Comment: For example: ‘0.28’.

Unitary

Numerator: 0.0..1.0  
Percent O₂  
Proportion  
Optional  
Percentage of oxygen in inspired air.  
Comment: For example: ‘24 %’

Percent

Numerator: 0.0..100.0
