# PropertyUnitData.xml and conversion information **Category:** [Terminology](https://discourse.openehr.org/c/terminology/59) **Created:** 2024-02-26 09:56 UTC **Views:** 319 **Replies:** 4 **URL:** https://discourse.openehr.org/t/propertyunitdata-xml-and-conversion-information/4968 --- ## Post #1 by @siljelb Continuing the discussion from [Invalid UCUM units in Archetype Designer](https://discourse.openehr.org/t/invalid-ucum-units-in-archetype-designer/1261/14): The [PropertyUnitData.xml](https://github.com/openEHR/specifications-TERM/blob/master/computable/XML/PropertyUnitData.xml) file is important to Archetype Designer as a way to specify which units are valid and available. However, the file also contains a lot of information about conversion factors between units, much of which is erroneous and/or imprecise. This information was probably important to maintain when this file was first created, but now there's [a maintained JS library](https://github.com/lhncbc/ucum-lhc/tree/master) for doing conversions, as well as validation of UCUM expressions. I suggest we remove the conversion information from the file, and point to the ucum-lhc library for doing conversions. --- ## Post #2 by @sebastian.iancu Interesting library ;) Who is more entitled to give feedback here? @borut.fabjan what do you think on this proposal? I would not dare to take sights on whether we should remove it - I would to listen to what AD or CPB needs. The only "issue" I see is the library you mention is in JS, whereas the rules we have are in XML - so a bit more tech-language-agnostic. --- ## Post #3 by @sebastian.garde Also, a few conversions are more complicated than just a conversion factor + coefficient. The information provided to convert °Fahrenheit to °Celsius is simply not sufficient for example. Graeme (and probably others from the fhir camp) have done lots of good work on this: There is a ucum_essence file https://github.com/FHIR/Ucum-java/blob/master/src/main/resources/ucum-essence.xml and services based on this to e.g. validate and convert. For a few units, conversion requires special handling and is managed in special handlers, e.g. https://github.com/FHIR/Ucum-java/blob/master/src/main/java/org/fhir/ucum/special/CelsiusHandler.java To me openEHR's property units file is mainly relevant to list common units + properties and groupings and as such is probably useful for some tools. Conversion cannot be reliably done based on this file in all cases, even if we fix the errors. So, I agree with Silje that this (mis-)information is best removed as 'beyond scope' and we can point to the *JS lhncbc/ucum-lhc lib* and the *FHIR UCUM Java lib* as well where needed. --- ## Post #4 by @siljelb Thanks @sebastian.iancu and @sebastian.garde! Another potential direction could be to strip the PropertyUnitData.xml file not only of the conversion information, but also of all the base ("primitive") units and properties, and point to [ucum-essence.xml](https://github.com/ucum-org/ucum/blob/main/ucum-essence.xml) for this information. This would constrain our xml file to only the compound units and properties we need to maintain to be able to use modelling tools efficiently, leaving it a fraction of the size and much more maintainable. --- ## Post #5 by @sebastian.iancu Ok clear; we could do this. But we'll need AD to adapt to it, as perhaps it is being still in use somewhere. Would it be ok @borut.fabjan ? --- **Canonical:** https://discourse.openehr.org/t/propertyunitdata-xml-and-conversion-information/4968 **Original content:** https://discourse.openehr.org/t/propertyunitdata-xml-and-conversion-information/4968