Logo GenPRES

Orderable.Item Module

Creates, changes and checks an item, a substance in a component, with its quantities, concentrations and dose.

Nested modules

Modules Description

Dto

Holds the serializable shape of an item and converts an item to and from the Dto.

Print

Prints the concentrations, the quantities and the dose values of an item as plain text or Markdown.

Functions and values

Function or value Description

Item.apply f itm

Full Usage: Item.apply f itm

Parameters:
Returns: 'a
Type parameters: 'a

Apply f to an item

f : Item -> 'a
itm : Item
Returns: 'a

Item.applyConstraints itm

Full Usage: Item.applyConstraints itm

Parameters:
    itm : Item - The Item

Returns: Item

Apply constraints to an Item

itm : Item

The Item

Returns: Item

Item.create n cmp_qty orb_qty orb_qty_adj cmp_cnc orb_cnc dos

Full Usage: Item.create n cmp_qty orb_qty orb_qty_adj cmp_cnc orb_cnc dos

Parameters:
    n : Name - The name of the Item
    cmp_qty : Quantity - The quantity of the item in the Component
    orb_qty : Quantity - The quantity of the item in the Orderable
    orb_qty_adj : QuantityAdjust - The quantity of the item in the Orderable per adjust unit
    cmp_cnc : Concentration - The concentration of the item in the Component
    orb_cnc : Concentration - The concentration of the item in the Orderable
    dos : Dose - The dose of the item

Returns: Item

Creates an item from its name, its order variables and its dose.

n : Name

The name of the Item

cmp_qty : Quantity

The quantity of the item in the Component

orb_qty : Quantity

The quantity of the item in the Orderable

orb_qty_adj : QuantityAdjust

The quantity of the item in the Orderable per adjust unit

cmp_cnc : Concentration

The concentration of the item in the Component

orb_cnc : Concentration

The concentration of the item in the Orderable

dos : Dose

The dose of the item

Returns: Item

Item.createNew id orbN cmpN itmN

Full Usage: Item.createNew id orbN cmpN itmN

Parameters:
    id : string - The Id of the Item
    orbN : string - The name of the Orderable
    cmpN : string - The name of the Component
    itmN : string - The name of the Item

Returns: Item

Creates an item with every order variable without a unit.

id : string

The Id of the Item

orbN : string

The name of the Orderable

cmpN : string

The name of the Component

itmN : string

The name of the Item

Returns: Item

Item.fromOrdVars ovars itm

Full Usage: Item.fromOrdVars ovars itm

Parameters:
Returns: Item

Create a new Item from a list of OrderVariables using an old Item.

ovars : OrderVariable list

The list of OrderVariables

itm : Item

The old Item

Returns: Item

Item.getDose itm

Full Usage: Item.getDose itm

Parameters:
Returns: Dose

Get the Item dose

itm : Item
Returns: Dose

Item.getName itm

Full Usage: Item.getName itm

Parameters:
Returns: Name

Get the Name of an Item

itm : Item
Returns: Name

Item.inf

Full Usage: Item.inf

Returns: Item -> Item

Utility method to facilitate type inference

Returns: Item -> Item

Item.isDoseSolved

Full Usage: Item.isDoseSolved

Returns: Item -> bool
Returns: Item -> bool

Item.isSolved

Full Usage: Item.isSolved

Returns: Item -> bool
Returns: Item -> bool

Item.setDoseUnit sn du itm

Full Usage: Item.setDoseUnit sn du itm

Parameters:
Returns: Item
sn : string
du : Unit
itm : Item
Returns: Item

Item.toOrdVars itm

Full Usage: Item.toOrdVars itm

Parameters:
    itm : Item - The Item

Returns: OrderVariable list

Return an Item as a list of OrderVariables

itm : Item

The Item

Returns: OrderVariable list

Item.toString

Full Usage: Item.toString

Returns: Item -> string list

Create a string list from an Item where each string is a variable name with the value range and the Unit

Returns: Item -> string list

Type something to start searching.