class Dstu3VitalSignFhirToDhisTransformerUtils extends AbstractVitalSignFhirToDhisTransformerUtils {

    @Nullable
    @Override
    public Double getHeight( @Nullable ICompositeType value, @Nullable Object heightUnit, boolean round ) throws TransformerDataException
    {
        if ( value == null )
        {
            return null;
        }

        if ( heightUnit == null )
        {
            throw new TransformerMappingException( "Height unit has not been specified." );
        }
        final HeightUnit resultingHeightUnit;
        try
        {
            resultingHeightUnit = NameUtils.toEnumValue( HeightUnit.class, heightUnit );
        }
        catch ( IllegalArgumentException e )
        {
            throw new TransformerMappingException( "Specified height unit is invalid: " + heightUnit );
        }

        if ( !(value instanceof Quantity) )
        {
            throw new TransformerDataException( "Height must be included as quantity, but element is " + value.getClass().getSimpleName() + "." );
        }
        final Quantity quantity = (Quantity) value;

        if ( !UNIT_SYSTEM.equals( quantity.getSystem() ) )
        {
            throw new TransformerDataException( UNIT_SYSTEM + " is expected as unit system: " + quantity.getSystem() );
        }
        final HeightUnit actualHeightUnit = HeightUnit.getByUcumCode( quantity.getCode() );
        if ( actualHeightUnit == null )
        {
            throw new TransformerDataException( "Unknown UCUM height unit code: " + quantity.getCode() );
        }

        final BigDecimal actualValue = quantity.getValue();
        if ( actualValue == null )
        {
            return null;
        }
        final double convertedValue = actualHeightUnit.convertTo( actualValue.doubleValue(), resultingHeightUnit );
        return round ? Math.round( convertedValue ) : convertedValue;
    }

    public  Dstu3VitalSignFhirToDhisTransformerUtils( @Nonnull ScriptExecutionContext scriptExecutionContext );

}