Logo GenPRES

QuantityAdjust Module

Wraps an order variable as an adjusted quantity such as mg/kg, with the name part qty_adj, and applies the order variable functions to it.

Functions and values

Function or value Description

apply f

Full Usage: apply f

Parameters:
Returns: QuantityAdjust -> QuantityAdjust

Apply a function to the OrderVariable in a QuantityAdjust

f : OrderVariable -> OrderVariable
Returns: QuantityAdjust -> QuantityAdjust

applyConstraints

Full Usage: applyConstraints

Returns: QuantityAdjust -> QuantityAdjust

Apply the constraints of a QuantityAdjust to the OrderVariable Variable

Returns: QuantityAdjust -> QuantityAdjust

applyDefinedConstraints

Full Usage: applyDefinedConstraints

Returns: QuantityAdjust -> QuantityAdjust

Set the Variable of a QuantityAdjust to its defined constraints

Returns: QuantityAdjust -> QuantityAdjust

applyOnlyMaxConstraints

Full Usage: applyOnlyMaxConstraints

Returns: QuantityAdjust -> QuantityAdjust

convertFirstUnit u

Full Usage: convertFirstUnit u

Parameters:
Returns: QuantityAdjust -> QuantityAdjust

Convert the first unit of a QuantityAdjust (e.g., mg/kg -> g/kg)

u : Unit
Returns: QuantityAdjust -> QuantityAdjust

create n un adj

Full Usage: create n un adj

Parameters:
    n : Name - The Name of the QuantityAdjust
    un : Unit - The Unit of the QuantityAdjust
    adj : Unit - The Adjust Unit of the QuantityAdjust

Returns: QuantityAdjust

Create a QuantityAdjust with name n

n : Name

The Name of the QuantityAdjust

un : Unit

The Unit of the QuantityAdjust

adj : Unit

The Adjust Unit of the QuantityAdjust

Returns: QuantityAdjust

fromDto dto

Full Usage: fromDto dto

Parameters:
Returns: QuantityAdjust

Create a QuantityAdjust from a Dto

dto : Dto
Returns: QuantityAdjust

fromOrdVar

Full Usage: fromOrdVar

Returns: OrderVariable list -> QuantityAdjust -> QuantityAdjust

Replaces a QuantityAdjust with the OrderVariable of the same name from a list, when the list has one.

Returns: OrderVariable list -> QuantityAdjust -> QuantityAdjust

hasConstraints

Full Usage: hasConstraints

Returns: QuantityAdjust -> bool
Returns: QuantityAdjust -> bool

hasMaxConstraint

Full Usage: hasMaxConstraint

Returns: QuantityAdjust -> bool

Check whether a QuantityAdjust has a maximum or a ValueSet constraint

Returns: QuantityAdjust -> bool

hasNormValue

Full Usage: hasNormValue

Returns: QuantityAdjust -> bool
Returns: QuantityAdjust -> bool

isNonZeroPositive

Full Usage: isNonZeroPositive

Returns: QuantityAdjust -> bool

Check whether a QuantityAdjust is non-zero positive

Returns: QuantityAdjust -> bool

isSolved

Full Usage: isSolved

Returns: QuantityAdjust -> bool

Check whether a QuantityAdjust is solved

Returns: QuantityAdjust -> bool

isWithinConstraints useCalc

Full Usage: isWithinConstraints useCalc

Parameters:
    useCalc : bool

Returns: QuantityAdjust -> bool

Check whether a QuantityAdjust is within its constraints

useCalc : bool
Returns: QuantityAdjust -> bool

name

Full Usage: name

Returns: string
Returns: string

setNthValue nth

Full Usage: setNthValue nth

Parameters:
    nth : int

Returns: QuantityAdjust -> QuantityAdjust

Set the variable to its nth value, counted from 0.

nth : int
Returns: QuantityAdjust -> QuantityAdjust

setToNonZeroPositive

Full Usage: setToNonZeroPositive

Returns: QuantityAdjust -> QuantityAdjust

Set a QuantityAdjust to non-zero positive values

Returns: QuantityAdjust -> QuantityAdjust

toDto

Full Usage: toDto

Returns: QuantityAdjust -> Dto

Create a Dto for a QuantityAdjust

Returns: QuantityAdjust -> Dto

toOrdVar arg1

Full Usage: toOrdVar arg1

Parameters:
Returns: OrderVariable

Get the OrderVariable in a QuantityAdjust

arg0 : QuantityAdjust
Returns: OrderVariable

toString

Full Usage: toString

Returns: QuantityAdjust -> string

Turn a QuantityAdjust to a string

Returns: QuantityAdjust -> string

toStringWithConstraints

Full Usage: toStringWithConstraints

Returns: QuantityAdjust -> string

Get a string representation of a QuantityAdjust (including constraints)

Returns: QuantityAdjust -> string

toValueUnitMarkdown

Full Usage: toValueUnitMarkdown

Returns: int -> QuantityAdjust -> string

Get a ValueUnit Markdown representation of a QuantityAdjust

Returns: int -> QuantityAdjust -> string

toValueUnitString

Full Usage: toValueUnitString

Returns: int -> QuantityAdjust -> string

Get a ValueUnit string representation of a QuantityAdjust

Returns: int -> QuantityAdjust -> string

toValueUnitStringList

Full Usage: toValueUnitStringList

Returns: QuantityAdjust -> string option

Gets the value set of a QuantityAdjust as a Dutch string; None without a value set.

Returns: QuantityAdjust -> string option

Type something to start searching.