Logo GenPRES

OrderScenario Module

Creates the scenario of an order made from a prescription rule, with its text blocks and the notice on why an order has no preparation.

Nested modules

Modules Description

Dto

Holds the serializable shape of an order scenario and converts a scenario to and from the Dto. An order that cannot be created gives OrderNotCreated.

Functions and values

Function or value Description

accessOfRule pr

Full Usage: accessOfRule pr

Parameters:
Returns: AccessDevice[]

One access device per medication that Medication.fromRule makes from the rule, in the same order: the device of each solution rule, or a single AnyAccess when the rule has none.

pr : PrescriptionRule
Returns: AccessDevice[]

create no nm ind frm rte dst dil cmp itm dils cmps itms ord adj ren rrl fits ids

Full Usage: create no nm ind frm rte dst dil cmp itm dils cmps itms ord adj ren rrl fits ids

Parameters:
    no : int
    nm : string
    ind : string
    frm : string
    rte : string
    dst : DoseType
    dil : string option
    cmp : string option
    itm : string option
    dils : string[]
    cmps : string[]
    itms : string[]
    ord : Order
    adj : bool
    ren : bool
    rrl : string option
    fits : bool
    ids : string[]

Returns: OrderScenario
no : int
nm : string
ind : string
frm : string
rte : string
dst : DoseType
dil : string option
cmp : string option
itm : string option
dils : string[]
cmps : string[]
itms : string[]
ord : Order
adj : bool
ren : bool
rrl : string option
fits : bool
ids : string[]
Returns: OrderScenario

fromRule isAdditive fitsOnlyWithoutDivisible no pr ord

Full Usage: fromRule isAdditive fitsOnlyWithoutDivisible no pr ord

Parameters:
Returns: OrderScenario

The scenario of an order made from a prescription rule. Its Components are the optional components of the rule, see PrescriptionRule.optionalComponents.

isAdditive : GPK -> bool
fitsOnlyWithoutDivisible : bool
no : int
pr : PrescriptionRule
ord : Order
Returns: OrderScenario

hasStep ord

Full Usage: hasStep ord

Parameters:
Returns: bool

Whether the orderable quantity of the main component has a defined increment, which the Divisible gives.

ord : Order
Returns: bool

isBounded ord

Full Usage: isBounded ord

Parameters:
Returns: bool

Whether the orderable quantity of the main component has a maximum or a single value.

ord : Order
Returns: bool

isPreparable ord

Full Usage: isPreparable ord

Parameters:
Returns: bool

Whether the order has a quantity that can be made: a step, and a limit to count up to. Only the main component counts, because a diluent has no maximum when it fills up to a volume.

ord : Order
Returns: bool

noPreparationNote

Full Usage: noPreparationNote

Returns: string

The note on an order of a product without a Divisible.

Returns: string

notPreparableWarning

Full Usage: notPreparableWarning

Returns: string

The warning on an order with a Divisible but no limit, and on an order that fits its rule only without the Divisible.

Returns: string

notRecalculatedNotice

Full Usage: notRecalculatedNotice

Returns: string

The notice on an order that could not be calculated on the current patient data.

Returns: string

preparationNotice fitsOnlyWithoutDivisible ord

Full Usage: preparationNotice fitsOnlyWithoutDivisible ord

Parameters:
    fitsOnlyWithoutDivisible : bool
    ord : Order

Returns: TextBlock option

Returns the notice on why an order has no preparation. An order with a Divisible but no maximum, or an order that fits its rule only without the Divisible, gets a warning. An order without a Divisible gets a caution. A preparable order that fits its rule gets no notice.

fitsOnlyWithoutDivisible : bool
ord : Order
Returns: TextBlock option

replace tb

Full Usage: replace tb

Parameters:
Returns: TextBlock
tb : TextBlock
Returns: TextBlock

rulesNotice

Full Usage: rulesNotice

Returns: string

The notice on an order when the rules for the current patient data differ from the rules for the patient data of its context.

Returns: string

setOrderTableFormat sc

Full Usage: setOrderTableFormat sc

Parameters:
Returns: OrderScenario

Type something to start searching.