GenOrder


Orderable

Namespace: Informedica.GenOrder.Lib

Types and functions to deal with an Orderable, i.e. something that can be ordered.

Nested types and modules

TypeDescription
Orderable

Models an Orderable

ModuleDescription
Component

Types and functions to model a Component in an Orderable. A Component contains a list of Items

Item

Type and functions that models an Order Item that is contained in a Component

Literals

Contains string constants to create Variable names

Functions and values

Function or valueDescription
apply f orb
Signature: f:(Orderable -> '?7055) -> orb:Orderable -> '?7055
Type parameters: '?7055

Apply f to Orderable ord

create (...)
Signature: id:Id -> nm:Name -> orb_qty:Quantity -> ord_qty:Quantity -> orb_cnt:Count -> dos:Dose -> dos_ajd:DoseAdjust -> cc:Component list -> Orderable

Create an Orderable with

  • id: the order id
  • nm: the name of the orderable
  • orb_qty: quantity of the orderable
  • ord_qty: quantity of orderable in the order
  • orb_cnt: the count of orderable in the order
  • dos: the orderable dose
  • dos_adj: the adjusted orderable dose
createNew id nm cl u adj
Signature: id:Id -> nm:Name -> cl:(Name * (Name * String) list) list -> u:String -> adj:string -> Orderable

Create a new Orderable with a Component list cl, an Orderableunit u and adjust unit groep adj

fromEqs eqs ord
Signature: eqs:Variable list list -> ord:Orderable -> Orderable
get
Signature: Orderable -> Orderable

Utility function to facilitate type inference

getComponents orb
Signature: orb:Orderable -> Component list

Get the Components in an Orderable

getDose orb
Signature: orb:Orderable -> Dose

Get the Orderable dose

getDoseAdjust orb
Signature: orb:Orderable -> DoseAdjust
getName orb
Signature: orb:Orderable -> Name

Get the name of the Orderable which is the sum of the concatenated lists of Items

getUnitGroup orb
Signature: orb:Orderable -> UnitGroup
toEqs hasRte adj frq tme orb
Signature: hasRte:bool -> adj:VariableUnit -> frq:VariableUnit option -> tme:VariableUnit option -> orb:Orderable -> VariableUnit list list * VariableUnit list

The following variables are used:

  • ord_qty: the quantity of orderable in an order
  • orb_qty: the quantity of orderable
  • ord_cnt: the count of orderable in an order
  • dos_qty: the dose quantity of orderable
  • dos_tot: the dose total of orderable
  • dos_rte: the dose rate of orderable
  • dos_qty_adj: the adjustedn dose quantity
  • dos_tot_adj: the adjusted dose total
  • dos_rte_adj: the adjusted dose rate
  • frq: frequency
  • tme: time

The following equations are generated:

Process or Continuous

  • ord_qty = ord_cnt * orb_qty

Discontinuous Timed

  • dot_tot = dos_qty * frq
  • dos_qty = dos_rte * tme
  • dot_tot_adj = dos_qty_adj * frq
  • dos_qty_adj = dos_rte_adj * tme

Discontinuous

  • dot_tot = dos_qty * frq
  • dot_tot_adj = dos_qty_adj * frq
toString orb
Signature: orb:Orderable -> string list

Turn an Orderable ord into a list of strings.

toVarUnt orb
Signature: orb:Orderable -> VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit

Map an Orderable orb to VariableUnits

Fork me on GitHub