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), 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
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.”
See here. 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.
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.
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.
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.
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.
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