Package ca.uhn.fhir.jpa.model.util
Class UcumServiceUtil
java.lang.Object
ca.uhn.fhir.jpa.model.util.UcumServiceUtil
It's a wrapper of UcumEssenceService
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
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.static ca.uhn.fhir.rest.param.QuantityParam
toCanonicalQuantityOrNull
(ca.uhn.fhir.rest.param.QuantityParam theQuantityParam)
-
Field Details
-
CELSIUS_CODE
- See Also:
-
FAHRENHEIT_CODE
- See Also:
-
CELSIUS_KELVIN_DIFF
- See Also:
-
UCUM_CODESYSTEM_URL
- See Also:
-
-
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.orgtheValue
- the value in the original form e.g. 0.12theCode
- 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) -
convert
-