GenOrder


Order

Namespace: Informedica.GenOrder.Lib

Types and functions that deal with an order. An Order models the Prescription of an Orderable with a StartStop start date and stop date.

Nested types and modules

TypeDescription
Order

Models an order

ModuleDescription
Literals

Contains literals used to generate Variable names

Mapping

Utitlity functions to enable mapping of a Variables to an Order

StartStop

Types and functions that model a start and stop date time of an Order

Functions and values

Function or valueDescription
apply f ord
Signature: f:(Order -> '?7170) -> ord:Order -> '?7170
Type parameters: '?7170

Apply f to Order ord

create id adj_qty orb prs rot sts
Signature: id:Id -> adj_qty:Quantity -> orb:Orderable -> prs:Prescription -> rot:string -> sts:StartStop -> Order

Create an Order with

  • id: the id of the order
  • adj: by which doses are adjusted
  • orb: the Orderable
  • prs: Prescription, how the orderable is prescribed
  • rot: the route of administration of the orderable
createNew (...)
Signature: id:Id -> nm:Name -> cil:(Name * (Name * String) list) list -> shp_ung:String -> adj_ung:string -> str_prs:(string list -> Prescription) -> rot:string -> Order

Create a new orderable using:

  • str_prs: a function that takes in a list of strings that will generate the names and returns a Prescription
  • rot: the route of administration
createUnit succ fail n u vul
Signature: succ:(CombiUnit -> '?7183) -> fail:(VariableUnit list list -> '?7183) -> n:Name -> u:string -> vul:VariableUnit list list -> '?7183
Type parameters: '?7183
fromEqs ord vus
Signature: ord:Order -> vus:Variable list list -> Order

Map a list of VariableUnit lists to an Order ord

get
Signature: Order -> Order

Utilty function to facilitate type inference

getAdjust ord
Signature: ord:Order -> Quantity
getId ord
Signature: ord:Order -> Id

Get the order id

getName ord
Signature: ord:Order -> string
getOrderable ord
Signature: ord:Order -> Orderable
solve n m p v u o
Signature: n:string -> m:Map -> p:Prop -> v:BigRational list -> u:string -> o:Order -> Order

Solve an Order ord 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 ord
Signature: ord:Order -> VariableUnit list list * VariableUnit list

Map an Order ord to a list of VariableUnit lists

toProd xs
Signature: xs:VariableUnit list -> Equation

Create a ProductEquation from a VariableUnit list

toString ord
Signature: ord:Order -> string list

Turn an order into a list of string representing variable name, valuerange and unit group

toSum xs
Signature: xs:VariableUnit list -> Equation

Create a SumEquation from a VariableUnit list

Fork me on GitHub