Logo GenPRES

Print Module

Formats solution rules, reconstitutions and predilutions as a Dutch preparation instruction in Markdown per generic.

Functions and values

Function or value Description

accessToString access

Full Usage: accessToString access

Parameters:
Returns: string

Returns the access of a patient category as a Dutch word; empty for any access.

access : AccessDevice
Returns: string

amount range values perAdjust

Full Usage: amount range values perAdjust

Parameters:
Returns: string

Returns an amount as text: the range, else the possible values, else an empty text; with the amount per adjust unit beside it when there is one.

range : MinMax
values : ValueUnit option
perAdjust : MinMax
Returns: string

appliesText route location indication deps (minAge, maxAge) (minWeight, maxWeight)

Full Usage: appliesText route location indication deps (minAge, maxAge) (minWeight, maxWeight)

Parameters:
    route : string
    location : string option
    indication : string option
    deps : string
    minAge : RationalX option
    maxAge : RationalX option
    minWeight : RationalX option
    maxWeight : RationalX option

Returns: string

Returns the route, the location, the indication, the departments, the age range in days and the weight range in grams that a rule applies to, joined by " ยท ". An empty value is left out.

route : string
location : string option
indication : string option
deps : string
minAge : RationalX option
maxAge : RationalX option
minWeight : RationalX option
maxWeight : RationalX option
Returns: string

condition showRoute r

Full Usage: condition showRoute r

Parameters:
Returns: string

Returns the condition a solution rule applies to as one line: the department, the route when the rules have more than one route, the indication, the dose type, the patient, the dose range and the access, separated by a middle dot. An empty line means the rule applies to every patient.

showRoute : bool
r : SolutionRule
Returns: string

departmentToString dep

Full Usage: departmentToString dep

Parameters:
    dep : string option

Returns: string

Returns the name of a department as the hospital uses it: ICC for AICU.

dep : string option
Returns: string

departmentsText deps

Full Usage: departmentsText deps

Parameters:
    deps : string option[]

Returns: string

Returns the departments of rules as one text. The text is empty when one of the rules names no department, because that rule applies to every department.

deps : string option[]
Returns: string

diluents r

Full Usage: diluents r

Parameters:
Returns: string

Returns the diluents of a solution rule as a Dutch enumeration.

r : SolutionRule
Returns: string

dilutionStep stepQuantity r

Full Usage: dilutionStep stepQuantity r

Parameters:
Returns: string

Returns the dilution step of a rule: what is diluted to what volume with which diluents. The quantity is put in the step when it is not empty.

stepQuantity : string
r : SolutionRule
Returns: string

doseFraction r

Full Usage: doseFraction r

Parameters:
Returns: string

Returns the dose fraction of a rule as text, such as 100% or 50 - 100%; empty without a dose fraction.

r : SolutionRule
Returns: string

genericToMarkdown text preds generic rules

Full Usage: genericToMarkdown text preds generic rules

Parameters:
Returns: string

Returns the Markdown text of the solution rules of one generic, as a preparation instruction, with the predilution rules of its products. The text is the title; an empty text gives the generic.

text : string
preds : ProductPredilution[]
generic : string
rules : SolutionRule[]
Returns: string

instruction showTarget extra r

Full Usage: instruction showTarget extra r

Parameters:
    showTarget : bool
    extra : (string * string) list
    r : SolutionRule

Returns: string list

Returns the lines of the instruction of a rule, each a labelled list item: the preparation text, the dilution, the concentration, the administration and then the extra labelled values. A line without data is left out. With showTarget, or with more than one dilution limit, the quantity and the concentration are given per dilution target, by name.

showTarget : bool
extra : (string * string) list
r : SolutionRule
Returns: string list

minMaxToString

Full Usage: minMaxToString

Returns: MinMax -> string

Formats a MinMax as Dutch text, such as 1 - 20 mg/mL, min. 50 mL or max. 100 mg.

Returns: MinMax -> string

orList names

Full Usage: orList names

Parameters:
    names : string list

Returns: string

Joins names as a Dutch enumeration: a, b of c.

names : string list
Returns: string

phRange r

Full Usage: phRange r

Parameters:
Returns: string

Returns the pH range of a rule as text, such as 4,5 - 7; empty without a pH.

r : SolutionRule
Returns: string

phToString ph

Full Usage: phToString ph

Parameters:
Returns: string

Formats a pH as Dutch text with a decimal comma.

ph : decimal<MeasureProduct<pH, MeasureOne>>
Returns: string

predilutionLines preds p

Full Usage: predilutionLines preds p

Parameters:
Returns: string list

Returns the predilution lines of a product: per predilution rule of the product the product volume, the diluent volume and the diluent, and the route, location, indication, departments and patients it applies to. Predilution rules that differ only in the department give one line. A product without a predilution rule gives no line.

preds : ProductPredilution[]
p : ProductComponent
Returns: string list

products rules

Full Usage: products rules

Parameters:
Returns: ProductComponent array

Returns the products of the rules, each once, with the products of the lowest concentration first.

rules : SolutionRule[]
Returns: ProductComponent array

reconstitutionLines p

Full Usage: reconstitutionLines p

Parameters:
Returns: string list

Returns the reconstitution lines of a product: per solvent and volume the routes, locations, departments and patients it applies to, the expansion volume and the notes. Reconstitution rules that differ only in the department give one line. A product that requires reconstitution without a reconstitution rule says so; a product that needs none gives no line.

p : ProductComponent
Returns: string list

section heading lines

Full Usage: section heading lines

Parameters:
    heading : string
    lines : string list

Returns: string

Returns a section with a heading and lines; empty when there are no lines.

heading : string
lines : string list
Returns: string

shelfLifeToString vu

Full Usage: shelfLifeToString vu

Parameters:
Returns: string

Formats a shelf life in minutes as Dutch text: whole hours as hours, otherwise minutes.

vu : ValueUnit
Returns: string

toMarkdown text preds rules

Full Usage: toMarkdown text preds rules

Parameters:
Returns: string

Returns the Markdown text of the solution rules as a preparation instruction per generic, with the predilution rules of their products. The text is the title; an empty text gives the generic.

text : string
preds : ProductPredilution[]
rules : SolutionRule[]
Returns: string

Type something to start searching.