Logo GenPRES

Quantity Module

Wraps an order variable as a quantity, with the name part qty, and applies the order variable functions to it.

Functions and values

Function or value Description

apply f

Full Usage: apply f

Parameters:
Returns: Quantity -> Quantity

Apply a function to the OrderVariable in a Quantity

f : OrderVariable -> OrderVariable
Returns: Quantity -> Quantity

applyConstraints

Full Usage: applyConstraints

Returns: Quantity -> Quantity

Apply the constraints of a Quantity to the OrderVariable Variable

Returns: Quantity -> Quantity

applyDefinedConstraints

Full Usage: applyDefinedConstraints

Returns: Quantity -> Quantity

Set the Variable of a Quantity to its defined constraints

Returns: Quantity -> Quantity

applyOnlyMaxConstraints

Full Usage: applyOnlyMaxConstraints

Returns: Quantity -> Quantity
Returns: Quantity -> Quantity

applyOnlyMinIncrConstraints

Full Usage: applyOnlyMinIncrConstraints

Returns: Quantity -> Quantity
Returns: Quantity -> Quantity

convertFirstUnit u

Full Usage: convertFirstUnit u

Parameters:
Returns: Quantity -> Quantity
u : Unit
Returns: Quantity -> Quantity

create n un

Full Usage: create n un

Parameters:
    n : Name - The Name of the Quantity
    un : Unit - The Unit of the Quantity

Returns: Quantity

Create a Quantity with name n

n : Name

The Name of the Quantity

un : Unit

The Unit of the Quantity

Returns: Quantity

fromDto dto

Full Usage: fromDto dto

Parameters:
Returns: Quantity

Create a Quantity from a Dto

dto : Dto
Returns: Quantity

fromOrdVar

Full Usage: fromOrdVar

Returns: OrderVariable list -> Quantity -> Quantity

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

Returns: OrderVariable list -> Quantity -> Quantity

hasConstraints

Full Usage: hasConstraints

Returns: Quantity -> bool
Returns: Quantity -> bool

hasIncrement

Full Usage: hasIncrement

Returns: Quantity -> bool

Check whether a Quantity has an increment (Min/Incr/Max)

Returns: Quantity -> bool

hasMaxConstraint

Full Usage: hasMaxConstraint

Returns: Quantity -> bool

Check whether a Quantity has a maximum or a ValueSet constraint

Returns: Quantity -> bool

increaseIncrement maxCount incrs

Full Usage: increaseIncrement maxCount incrs

Parameters:
    maxCount : RationalX - The maximum number of values in the ValueRange
    incrs : Increment list - The list of increments to choose from

Returns: Quantity -> Quantity

Increase the increment of a Quantity until the resulting ValueRange contains at most maxCount values.

maxCount : RationalX

The maximum number of values in the ValueRange

incrs : Increment list

The list of increments to choose from

Returns: Quantity -> Quantity

isNonZeroPositive

Full Usage: isNonZeroPositive

Returns: Quantity -> bool

Check whether a Quantity is non-zero positive

Returns: Quantity -> bool

isSolved

Full Usage: isSolved

Returns: Quantity -> bool

Check whether a Quantity is solved

Returns: Quantity -> bool

isWithinConstraints useCalc

Full Usage: isWithinConstraints useCalc

Parameters:
    useCalc : bool

Returns: Quantity -> bool

Check whether a Quantity is within its constraints

useCalc : bool
Returns: Quantity -> bool

name

Full Usage: name

Returns: string
Returns: string

pickNearestHigherElseLower qty1 qty2

Full Usage: pickNearestHigherElseLower qty1 qty2

Parameters:
Returns: Quantity
qty1 : Quantity
qty2 : Quantity
Returns: Quantity

setMaxToValueOf upTo

Full Usage: setMaxToValueOf upTo

Parameters:
Returns: Quantity -> Quantity

Sets an inclusive maximum on a Quantity at the value of upTo, for example to limit a dose quantity to the quantity of the whole orderable. Leaves the Quantity unchanged when upTo has no value set.

upTo : Quantity
Returns: Quantity -> Quantity

setMaxValue

Full Usage: setMaxValue

Returns: Quantity -> Quantity

Set the maximum value for a Quantity

Returns: Quantity -> Quantity

setMedianValue

Full Usage: setMedianValue

Returns: Quantity -> Quantity

Set the median value for a Quantity

Returns: Quantity -> Quantity

setMinValue

Full Usage: setMinValue

Returns: Quantity -> Quantity

Set the minimum value for a Quantity

Returns: Quantity -> Quantity

setNthValue nth

Full Usage: setNthValue nth

Parameters:
    nth : int

Returns: Quantity -> Quantity

Sets the values to the nth value, counted from 0, but not above the maximum.

nth : int
Returns: Quantity -> Quantity

setPercValue perc

Full Usage: setPercValue perc

Parameters:
    perc : int

Returns: Quantity -> Quantity

Sets the values to the value at perc percent of the way through all values.

perc : int
Returns: Quantity -> Quantity

setToNonZeroPositive

Full Usage: setToNonZeroPositive

Returns: Quantity -> Quantity

Set a Quantity to non-zero positive values

Returns: Quantity -> Quantity

toDto

Full Usage: toDto

Returns: Quantity -> Dto

Create a Dto for a Quantity

Returns: Quantity -> Dto

toOrdVar arg1

Full Usage: toOrdVar arg1

Parameters:
Returns: OrderVariable

Get the OrderVariable in a Quantity

arg0 : Quantity
Returns: OrderVariable

toString

Full Usage: toString

Returns: Quantity -> string

Turn a Quantity to a string

Returns: Quantity -> string

toStringWithConstraints

Full Usage: toStringWithConstraints

Returns: Quantity -> string

Get a string representation of a Quantity (including constraints)

Returns: Quantity -> string

toValueUnitMarkdown

Full Usage: toValueUnitMarkdown

Returns: int -> Quantity -> string

Get a ValueUnit Markdown representation of a Quantity

Returns: int -> Quantity -> string

toValueUnitString

Full Usage: toValueUnitString

Returns: int -> Quantity -> string

Get a ValueUnit string representation of a Quantity

Returns: int -> Quantity -> string

toValueUnitStringList

Full Usage: toValueUnitStringList

Returns: Quantity -> string option

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

Returns: Quantity -> string option

Type something to start searching.