Class UcumServiceUtil

    • Method Detail

      • getCanonicalForm

        public static org.fhir.ucum.Pair getCanonicalForm​(String theSystem,
                                                          BigDecimal theValue,
                                                          String theCode)
        Get the canonical form of a code, it's define at http://unitsofmeasure.org e.g. 12cm -> 0.12m where m is the canonical form of the length.
        Parameters:
        theSystem - must be http://unitsofmeasure.org
        theValue - the value in the original form e.g. 0.12
        theCode - the code in the original form e.g. 'cm'
        Returns:
        the CanonicalForm if no error, otherwise return null
      • toCanonicalQuantityOrNull

        @Nullable
        public static ca.uhn.fhir.rest.param.QuantityParam toCanonicalQuantityOrNull​(ca.uhn.fhir.rest.param.QuantityParam theQuantityParam)