DV_PROPORTION vs DV_QUANTITY for %

I would have guessed it would be the other way around. If you know at design time that this value will be a percentage, use the DV_PROPORTION data type with the ‘type’ attribute set to 2 (percent, denominator fixed to 100). On the other hand if you don’t know for sure (such as for some lab results or medication strengths which could be for example mg/ml or % interchangeably), you would use DV_QUANTITY.

Regards,

Silje

As a relative OpenEHR outsider but a data modelling enthusiast, I would agree with Silje that if this is known to be a proportion then using DV_PROPORTION seems more intuitive, as this preserves the semantics of the data. It also would allow confident conversion of that data into other types of proportion (eg per-thousand or PPM)

Marcus

Hi Marcus,

I think that is the intended use. It is the case that UCUM has a ‘%’ unit as part of DV_QUANTITY which I think I have only ever used in the context of integrating a lab test where the ‘proportionality’ of the value is not really relevant i.e it is in some ways an arbitrary unit.

Ian

Also, take into account that if you use DV_PROPORTION to represent this percent, you will always have this double quantity stored in your data, which doesn’t really add nothing of value and just will slow down your queries.

Regards