Logo GenPRES

StandardOrder Module

Evaluates each rule of a rule set to its scenarios and returns a standard order for each scenario, with the texts and the advice.

Functions and values

Function or value Description

advice sc

Full Usage: advice sc

Parameters:
Returns: string

Returns the advice of the scenario: the dose limits of the order as the prescription text prints them, per kg for an order per kg, followed for a once timed order by the time and the rate. The limits are those of the substance of the scenario, or of the orderable for a scenario dosed by volume.

sc : OrderScenario
Returns: string

bolusTexts sc

Full Usage: bolusTexts sc

Parameters:
Returns: StandardOrderTexts

Returns the bolus texts of a scenario. A scenario with a substance shows the substance; a scenario dosed by volume shows the orderable.

sc : OrderScenario
Returns: StandardOrderTexts

branches ctx

Full Usage: branches ctx

Parameters:
Returns: OrderContext array

Returns the options of the first open choice of the filter, in the order generic, route, dose type, form, each as the context with that option chosen. A choice is open when nothing is chosen and the list has more than one option. Empty when no choice is open.

ctx : OrderContext
Returns: OrderContext array

categoryOf prefix indication

Full Usage: categoryOf prefix indication

Parameters:
    prefix : string
    indication : string

Returns: string

Returns the indication without the prefix, such as "Noodlijst ", or the indication when it does not start with the prefix.

prefix : string
indication : string
Returns: string

contextOf patientData rule

Full Usage: contextOf patientData rule

Parameters:
Returns: OrderContext

Returns the order context of a rule for the patient: the indication and the generic of the rule.

patientData : PatientData
rule : RuleSetData
Returns: OrderContext

emergencyList start logger provider patientData sets

Full Usage: emergencyList start logger provider patientData sets

Parameters:
Returns: StandardOrder array * StandardOrderWarning array

Returns the standard orders of the emergency list for the patient, with the bolus texts.

start : DateTime
logger : Logger
provider : IResourceProvider
patientData : PatientData
sets : RuleSet[]
Returns: StandardOrder array * StandardOrderWarning array

evaluate start logger provider pc

Full Usage: evaluate start logger provider pc

Parameters:
Returns: Result<Outcome<PlanContext>, string>

Evaluates the plan context as a medication order: with the dose rules of the context, without a rule set and with the standard norms, as a standard order belongs to no order plan. Returns the messages of a failed evaluation, or the message of an exception, as one text. An exception is also logged as an error, with its stack trace.

start : DateTime
logger : Logger
provider : IResourceProvider
pc : PlanContext
Returns: Result<Outcome<PlanContext>, string>

infusionTexts sc

Full Usage: infusionTexts sc

Parameters:
Returns: StandardOrderTexts

Returns the infusion texts of a scenario. A scenario with a substance shows the substance; a scenario dosed by volume shows the orderable, and the rate limits of its component, else of the orderable.

sc : OrderScenario
Returns: StandardOrderTexts

itemOf sc

Full Usage: itemOf sc

Parameters:
Returns: Item option

Returns the item of the scenario: the substance that is dosed, not an additional substance of the product. Returns None for a scenario dosed by volume.

sc : OrderScenario
Returns: Item option

narrowed ctx sc

Full Usage: narrowed ctx sc

Parameters:
Returns: OrderContext

Returns the context narrowed to the scenario: the form of the scenario is chosen and the scenario is the only scenario.

ctx : OrderContext
sc : OrderScenario
Returns: OrderContext

ofScenario prefix toTexts (ctx, sc)

Full Usage: ofScenario prefix toTexts (ctx, sc)

Parameters:
Returns: StandardOrder

Returns the standard order of a scenario of the context: the category is the indication without the prefix, and toTexts makes the texts.

prefix : string
toTexts : OrderScenario -> StandardOrderTexts
ctx : OrderContext
sc : OrderScenario
Returns: StandardOrder

scenarios evaluate depth ctx

Full Usage: scenarios evaluate depth ctx

Parameters:
Returns: (OrderContext * OrderScenario) array * StandardOrderWarning[]

Evaluates the context and returns the evaluated context with each of its scenarios, with a warning for each evaluation that gives no scenarios. A context without scenarios is evaluated again for each option of the first open choice, at most four choices deep.

evaluate : PlanContext -> Result<Outcome<PlanContext>, string>
depth : int
ctx : OrderContext
Returns: (OrderContext * OrderScenario) array * StandardOrderWarning[]

standardInfusions start logger provider patientData sets

Full Usage: standardInfusions start logger provider patientData sets

Parameters:
Returns: StandardOrder array * StandardOrderWarning array

Returns the standard orders of the continuous medication list for the patient, with the infusion texts.

start : DateTime
logger : Logger
provider : IResourceProvider
patientData : PatientData
sets : RuleSet[]
Returns: StandardOrder array * StandardOrderWarning array

standardOrders kind prefix toTexts start logger provider patientData sets

Full Usage: standardOrders kind prefix toTexts start logger provider patientData sets

Parameters:
Returns: StandardOrder array * StandardOrderWarning array

Returns the standard orders of the rule sets of the kind for the patient, a standard order for each scenario, with a warning for each evaluation that gives no scenarios. The rules are evaluated in chunks of Parallel.totalWorkers: the chunks run in parallel, the rules in a chunk one after the other.

kind : RuleSetKind
prefix : string
toTexts : OrderScenario -> StandardOrderTexts
start : DateTime
logger : Logger
provider : IResourceProvider
patientData : PatientData
sets : RuleSet[]
Returns: StandardOrder array * StandardOrderWarning array

withAdjust useAdjust qty adj

Full Usage: withAdjust useAdjust qty adj

Parameters:
    useAdjust : bool
    qty : string
    adj : string

Returns: string

Returns the quantity, followed by the quantity per kg in brackets when the order is per kg and the quantity per kg has a text.

useAdjust : bool
qty : string
adj : string
Returns: string

withTimeAndRate limits ord

Full Usage: withTimeAndRate limits ord

Parameters:
    limits : string
    ord : Order

Returns: string

Returns the limits followed, for a once timed order, by the time and the rate of the order, with the precision of the prescription texts.

limits : string
ord : Order
Returns: string

Type something to start searching.