Adding to the DV_QUANTITY units options

@borut.fabjan et al,

Is there a recommended way that we can add to the DV_QUANTITY units list so that it can be included in updates. Personally, I’ve hacked the ADL on multiple occasions but this is clearly not ideal and it isn’t there next time I or others need it…
Triggered by @JonJones question… Medication amounts and units - #4 by JonJones

The Gray is an SI unit, defined as the absorption of one joule of radiation energy per kilogram of matter. In the Archetype Designer settings (top R corner of the logged in AD screen) can be set to UCUM or to an openEHR list that includes SI units. In the UCUM list ‘J/kg’ is present, and if you switch to the openEHR list, then ‘Gy’ is present.
Similarly, Volt (V) is another SI unit, defined as Joules per Coulomb. While Volt appears in the openEHR list, ‘J/C’ appears not to be available.

While Gy and V are presented as SI units in this UCUM document with definition units - The Unified Code for Units of Measure - centiGray and kiloVolt are not. I’ve found references to 100 cGy = 1 Gy and descriptions of a centiGray as a ‘derived metric (SI) measurement unit’. Similarly 1 kV = 1000V.

The Ocean tool used to have a local file that could be edited. Is there an equivalent one for the AD tool?

There is a local file for Archetype Designer in the same way as in Archetype Editor. In fact it’s the same file. I’ve added cGy, mGy and kV to this file, as well as made some other minor adjustments and corrections. Could you update AD with this when convenient, @borut.fabjan ?

PropertyUnitData.xml (56.4 KB)

Although for the future, it’s likely we’ll want to be able to construct UCUM units conbining the atom units with appropriate prefixes on the fly. In this case, the unit files would only contain a list of properties (length, mass, energy dose, etc), a list of atom units (m, kg, Gy, etc), and a list of prefixes (m, M, c, etc). This would be much more flexible, and wouldn’t require us to add new stuff to the units file anywhere near as often.


I like this future option, and thanks for the information on the property units. To work around this for now I’ve just removed the units constraint so any unit value is now allowed- lets the user specify cgy or gy but weakens the model slightly. It has limited exposure at the moment but pressing timescales. Would be interested to know where that file lives in AD directories- not seen that before!

1 Like

To follow up on your requirement @JonJones, kV and cGy can now be used as units in Archetype Designer.


Super- thanks for seeing this through!

1 Like

g/dL - (gram per deciliter) option is still missing from archetype designer. Can this also be added?

Did you try selecting “Concentration”, then “MASS/VOLUME”?

@siljelb Yes that works. I never knew this approach. Thanks for pointing it out


1 Like