Logo GenPRES

EquationMapping Module

Holds the table of order equations and returns the sum and product equations of an order for a dose type, with variable names filled in.

Types and nested modules

Type/Module Description

Literals

Holds the name parts of the order variables and the numbers of the five dose types, 3 to 7.

EquationRow

An equation with the dose types it applies to and its marks.

Mark

A mark of an equation in the equations table, one per mark column of the Equations sheet.

Functions and values

Function or value Description

allDoseTypes

Full Usage: allDoseTypes

Returns: int list

The five dose types: discontinuous (3), continuous (4), timed (5), once (6) and once timed (7).

Returns: int list

contOnly

Full Usage: contOnly

Returns: int list
Returns: int list

contTimedOnceTimed

Full Usage: contTimedOnceTimed

Returns: int list
Returns: int list

discContTimed

Full Usage: discContTimed

Returns: int list
Returns: int list

discTimed

Full Usage: discTimed

Returns: int list
Returns: int list

equations

Full Usage: equations

Returns: EquationRow list

The order equations, each with the dose types it applies to and its marks. The equations are fixed in code; the Equations sheet documents them.

Returns: EquationRow list

getEqsMapping ord indx

Full Usage: getEqsMapping ord indx

Parameters:
Returns: EquationMapping * EquationMapping

Returns the sum mapping and the product mapping of the order for the dose type indx, with the placeholders in the equations replaced by the order, orderable, component and item names.

ord : Order
indx : int
Returns: EquationMapping * EquationMapping

getEquations indx

Full Usage: getEquations indx

Parameters:
    indx : int

Returns: EquationRow list

Returns the equation rows for the dose type indx: 3 discontinuous, 4 continuous, 5 timed, 6 once or 7 once timed. The result is memoized.

indx : int
Returns: EquationRow list

hasOneStrength itm

Full Usage: hasOneStrength itm

Parameters:
Returns: bool

Returns true when the defined values of the item component concentration hold exactly one value. Returns false for an item without defined values.

itm : Item
Returns: bool

isCondition mark

Full Usage: isCondition mark

Parameters:
Returns: bool

Returns true when a mark holds or not depending on the order. The other marks do not filter the equations.

mark : Mark
Returns: bool

leavesOutItemConcentrationProducts ord

Full Usage: leavesOutItemConcentrationProducts ord

Parameters:
Returns: bool

Returns true when the order has more than two components and every item has one component concentration. The item concentrations in the orderable then follow from the tie equations alone; with more concentrations per item they would not be exact.

ord : Order
Returns: bool

orderMarks ord

Full Usage: orderMarks ord

Parameters:
Returns: Mark list

Returns the condition marks that hold for the order ord.

ord : Order
Returns: Mark list

row eq doseTypes marks

Full Usage: row eq doseTypes marks

Parameters:
    eq : string
    doseTypes : int list
    marks : Mark list

Returns: EquationRow

Creates an equation row from an equation, its dose types and its marks.

eq : string
doseTypes : int list
marks : Mark list
Returns: EquationRow

selectEquations indx marks

Full Usage: selectEquations indx marks

Parameters:
    indx : int
    marks : Mark list

Returns: string list * string list

Returns the sum equations and the product equations for the dose type indx, given the condition marks that hold for an order. A row is selected when each of its condition marks is in marks.

indx : int
marks : Mark list
Returns: string list * string list

timedOnly

Full Usage: timedOnly

Returns: int list
Returns: int list

usesAdjust ord

Full Usage: usesAdjust ord

Parameters:
Returns: bool

Returns true when an adjusted dose quantity, per time, rate or total of the orderable, a component or an item has constraints. Without such constraints the adjusted dose equations do not change the other variables.

ord : Order
Returns: bool

usesOrderableQuantityAdjust ord

Full Usage: usesOrderableQuantityAdjust ord

Parameters:
Returns: bool

Returns true when the quantity in the orderable per adjust unit has constraints for the orderable, a component or an item of the order.

ord : Order
Returns: bool

Type something to start searching.