GenOrder


Component

Namespace: Informedica.GenOrder.Lib
Parent Module: Orderable

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

Nested types and modules

TypeDescription
Component

Models in a Component in and Orderable

Functions and values

Function or valueDescription
apply f comp
Signature: f:(Component -> '?7112) -> comp:Component -> '?7112
Type parameters: '?7112

Apply f to a Component comp

create (...)
Signature: id:Id -> nm:Name -> cmp_qty:Quantity -> orb_qty:Quantity -> orb_cnt:Count -> ord_qty:Quantity -> ord_cnt:Count -> orb_cnc:Concentration -> dos:Dose -> dos_adj:DoseAdjust -> ii:Item list -> Component

Create a component with

  • cmp_qty: quantity of component
  • orb_qty: quantity of component in orderable
  • orb_cnt: count of component in orderable
  • ord_qty: quantity of component in order
  • ord_cnt: count of component in order
  • orb_cnc: concentration of component in orderble
  • dos: component dose
  • dos_adj: adjusted dose of component
  • ii: list of Items in a component
createNew id nm sl u adj
Signature: id:Id -> nm:Name -> sl:(Name * String) list -> u:String -> adj:string -> Component

Create a new component with

  • sl: list of item name and unit name tuples
  • u1: unit name of component
  • adj: adjust unit to adjust the dose
fromEqs eqs cmp
Signature: eqs:Variable list list -> cmp:Component -> Component

Create a Component from a list of variable list eqs

get
Signature: Component -> Component

Utility to facilitate type inference

getId cmp
Signature: cmp:Component -> string

Get the id of a Component

getItems cmp
Signature: cmp:Component -> Item list

Get the Items in an Component

getName cmp
Signature: cmp:Component -> Name

Get the name of a Component

toEqs (...)
Signature: adj:VariableUnit -> frq:VariableUnit option -> qty:VariableUnit -> tot:VariableUnit -> tme:VariableUnit option -> rte:VariableUnit option -> orb_orb_qty:VariableUnit -> cmp:Component -> VariableUnit list list

The following variables are used

  • orb_orb_qty: the orderable quantity
  • cmp_cmp_qty: the component quantity
  • cmp_orb_qty: the quantity of component in an orderable
  • cmp_orb_cnt: the count of component in an orderable
  • cmp_ord_qty: the quantity of component in an order
  • cmp_ord_cnt: the count of component in an order
  • cmp_orb_cnc: the concentration of an component in an orderable
  • cmp_dos_qty: the component dose quantity
  • cmp_dos_tot: the component dose total
  • cmp_dos_rte: the component dose rate
  • cmp_dos_qty_adj: the adjusted component dose quantity
  • cmp_dos_tot_adj: the adjusted component dose total
  • cmp_dos_rte_adj: the adjusted component dose rate
  • frq: the prescription frequency
  • tme: the prescription time
  • qty: the orderable dose quantity
  • tot: the orderable dose total
  • rte: the orderable dose rate

The following equations are generated:

Process

  • cmp_orb_qty = cmp_orb_cnc * orb_orb_qty
  • orb_orb_qty = cmp_cmp_qty * cmp_orb_cnt
  • orb_ord_qty = cmp_cmp_qty * cmp_ord_cnt

Discontinuous Timed

  • cmp_dos_tot = cmp_dos_qty * frq
  • cmp_dos_qty = cmp_dos_rte * tme
  • cmp_dos_qty = cmp_orb_cnc * qty
  • cmp_dos_tot = cmp_orb_cnc * tot
  • cmp_dos_rte = cmp_orb_cnc * rte
  • cmp_dos_qty = cmp_dos_qty_adj * adj
  • cmp_dos_tot = cmp_dos_tot_adj * adj
  • cmp_dos_rte = cmp_dos_rte_adj * adj

Discontinuous

  • cmp_dos_tot = cmp_dos_qty * frq
  • cmp_dos_qty = cmp_orb_cnc * qty
  • cmp_dos_tot = cmp_orb_cnc * tot
  • cmp_dos_qty = cmp_dos_qty_adj * adj
  • cmp_dos_tot = cmp_dos_tot_adj * adj

Continuous

  • cmp_dos_rte = cmp_orb_cnc * rte
  • cmp_dos_rte = cmp_dos_rte_adj * adj
toString cmp
Signature: cmp:Component -> string list

Create a string list from a component where each string is a variable name with the valuerange and the unitgroup

toVar cmp
Signature: cmp:Component -> VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit * VariableUnit

Map a Component cmp to VariableUnits

Fork me on GitHub