Improve UCUM code validation
Is your feature request related to a problem? Please describe. While checking #694 I noticed that our syntax-based validation considers almost any ascii string to be valid. This is not what I had in mind when I opened this issue and I think it would be much more useful if we could use https://github.com/FHIR/Ucum-java to verify that the code is truly valid and not just syntactically-valid.
Describe the solution you'd like Leverage https://github.com/FHIR/Ucum-java or at least the ucum-essence file it wraps in order to perform more stringent validation of the UCUM codes.
Describe alternatives you've considered N/A
Additional context There are potential legal issues with adopting ucum-essence and so this issue is blocked by #1418 until we can get a more clear understanding of what we need to do to include this.
Moved to Sprint 20 as it depends on UCUM license finalization.
As described in issue #1418, here are the licensing requirements:
Use of the ucum-essence.xml file was approved by Noah Sharkan in IP law on 10/07/2020, given the following conditions are met:
I reviewed the terms (https://ucum.org/trac/wiki/TermsOfUse) in view of your described use. While you are incorporating UCUM content into a software program, the software will include the UCUM code, definition value and unit fields in their entirety, right? (This is a requirement of section 7). Assuming this is the case, then I don't see an issue with using the xml file as proposed and including it in the OSS project, so long as you comply with the requirements discussed below and you don't think you have an issue complying with any other terms of the UCUM license.
Per Section 6 of the UCUM license, you'll need to include a copy of the Copyright Notice and License (you can download a plaintext copy at the link above, bottom of the page) within the same folder of the OSS project that includes the xml file. Including the copy in the same folder as the xml file is done so that the copy is accessible "on the same Internet page from which the [UCUM xml file] is available for download".
Per Section 7, you'll need to include the exact notice specified in section 7 on the OSS project page such that the notice is "accessible on the same Internet page from which the product is available for download".