GenOrder


OrderSet

Namespace: Informedica.GenOrder.Lib

Types and functions that model a set of Orders.

Nested types and modules

TypeDescription
OrderSet

Represents a set of Orders and can map to a calculation model to calculate totals

Functions and values

Function or valueDescription
add ord ors
Signature: ord:Order -> ors:OrderSet -> OrderSet

Add an Order to an OrderSet Note: need to check duplicate id check and calculate the totals

addItemTotals orb ors
Signature: orb:Orderable -> ors:OrderSet -> OrderSet
addOrderableTotals orb ors
Signature: orb:Orderable -> ors:OrderSet -> OrderSet
apply f ors
Signature: f:(OrderSet -> '?7136) -> ors:OrderSet -> '?7136
Type parameters: '?7136

Apply f to an OrderSet ors

containsItemTotal itm ors
Signature: itm:Item -> ors:OrderSet -> bool

Check if OrderSet allready contains a total for the Item itme

containsOrderableTotal orb ors
Signature: orb:Orderable -> ors:OrderSet -> bool

Check if OrderSet allready contains a total for the Orderable orb

create ords ord_tot itm_tot
Signature: ords:Order list -> ord_tot:(Dose * DoseAdjust) list -> itm_tot:(Dose * DoseAdjust) list -> OrderSet

Create an OrderSet

empty
Signature: OrderSet

The empty OrderSet

fromEqs ors eqs
Signature: ors:OrderSet -> eqs:Variable list list -> OrderSet

Map a list of Variable lists eqs to an OrderSet ors

fromItemEqs eqs ors
Signature: eqs:Variable list list -> ors:OrderSet -> OrderSet

Map a list of Variable lists to an OrderSet ors

fromOrderableEqs eqs ors
Signature: eqs:Variable list list -> ors:OrderSet -> OrderSet

Map a list of Variable lists to an OrderSet ors

get
Signature: OrderSet -> OrderSet

Utitility function to enable type inference

getItemTotals ors
Signature: ors:OrderSet -> (Dose * DoseAdjust) list

Get the item totals from an OrderSet

getItemVarUnts nm ors
Signature: nm:Name -> ors:OrderSet -> ((VariableUnit * VariableUnit * VariableUnit) * (VariableUnit * VariableUnit * VariableUnit)) list

Get the Item Dose and DoseAdjust properties for a specific Item with name itm to calculate the totals for that Item in an OrderSet

getOrderableTotals ors
Signature: ors:OrderSet -> (Dose * DoseAdjust) list

Get the orderable totals from an OrderSet

getOrderableVarUnts ung ors
Signature: ung:UnitGroup -> ors:OrderSet -> ((VariableUnit * VariableUnit * VariableUnit) * (VariableUnit * VariableUnit * VariableUnit)) list

Get the Orderable Dose and DoseAdjust properties for a specific UnitGroup ung to calculate the totals for that UnitGroup in and OrderSet

getOrders ors
Signature: ors:OrderSet -> Order list

Get the Orders from an OrderSet

solve n p v u ors
Signature: n:string -> p:Prop -> v:BigRational list -> u:string -> ors:OrderSet -> OrderSet

Solve an OrderSet ors with

  • n: the name of the variable to be set
  • m: the mapping for the field of the order
  • p: the property of the variable to be set
  • v: the values to be set
toEqs ors
Signature: ors:OrderSet -> VariableUnit list list * VariableUnit list list

Map an OrderSet ors to a list of VariableUnit list product and sum eqs

toItemEqs ors
Signature: ors:OrderSet -> VariableUnit list list

Map an OrderSet to totals VarUnit lists to calculate the sum equations

toOrderableEqs ors
Signature: ors:OrderSet -> VariableUnit list list

Map an OrderSet to totals VarUnit lists to calculate the sum equations

Fork me on GitHub