Class UcumServiceUtil

java.lang.Object
ca.uhn.fhir.jpa.model.util.UcumServiceUtil

public class UcumServiceUtil extends Object
It's a wrapper of UcumEssenceService
  • Field Details

  • Method Details

    • 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)