fix decimal conversion
This commit is contained in:
parent
1cf5093ff7
commit
8d747a9d2c
|
@ -326,6 +326,8 @@ private Map<String, Object> userData;
|
|||
public DecimalType castToDecimal(Base b) throws FHIRException {
|
||||
if (b instanceof DecimalType)
|
||||
return (DecimalType) b;
|
||||
else if (b.hasPrimitiveValue())
|
||||
return new DecimalType(b.primitiveValue());
|
||||
else
|
||||
throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Decimal");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue