Logo GenPRES

WeightValue Module

Creates a weight in kg or in gram, converts a weight to kg, formats a weight and returns the normal weight of an age type.

Nested modules

Modules Description

Dto

Holds the Dto of a weight value and converts a weight value to and from the Dto. Returns a validation error for a weight outside the bounds.

Validation

Holds the validators of a weight in kg and in gram, which accept a weight from 0.2 kg to 250 kg.

Functions and values

Function or value Description

avgAdolescent

Full Usage: avgAdolescent

Returns: WeightValue
Returns: WeightValue

avgAdult

Full Usage: avgAdult

Returns: WeightValue
Returns: WeightValue

avgChild

Full Usage: avgChild

Returns: WeightValue
Returns: WeightValue

avgInfant

Full Usage: avgInfant

Returns: WeightValue
Returns: WeightValue

avgNewBorn

Full Usage: avgNewBorn

Returns: WeightValue
Returns: WeightValue

avgToddler

Full Usage: avgToddler

Returns: WeightValue
Returns: WeightValue

fromAgeType gend

Full Usage: fromAgeType gend

Parameters:
Returns: AgeType -> WeightValue option
gend : Gender
Returns: AgeType -> WeightValue option

getValue _arg1

Full Usage: getValue _arg1

Parameters:
Returns: bool * decimal
_arg1 : WeightValue
Returns: bool * decimal

getWeightInKg

Full Usage: getWeightInKg

Returns: WeightValue -> decimal<MeasureProduct<kg, MeasureOne>>

map fKg fGram _arg1

Full Usage: map fKg fGram _arg1

Parameters:
Returns: 'a
Type parameters: 'a
fKg : decimal<MeasureProduct<kg, MeasureOne>> -> 'a
fGram : int<MeasureProduct<gram, MeasureOne>> -> 'a
_arg1 : WeightValue
Returns: 'a

toString fixPrec _arg1

Full Usage: toString fixPrec _arg1

Parameters:
Returns: string
fixPrec : int
_arg1 : WeightValue
Returns: string

weightInGram x

Full Usage: weightInGram x

Parameters:
    x : decimal

Returns: WeightValue
x : decimal
Returns: WeightValue

weightInKg x

Full Usage: weightInKg x

Parameters:
    x : decimal

Returns: WeightValue
x : decimal
Returns: WeightValue

Type something to start searching.