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
|
|
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.
|
|
Returns the bolus texts of a scenario. A scenario with a substance shows the substance; a scenario dosed by volume shows the orderable.
|
|
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.
|
Full Usage:
categoryOf prefix indication
Parameters:
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.
|
Full Usage:
contextOf patientData rule
Parameters:
PatientData
rule : RuleSetData
Returns: OrderContext
|
Returns the order context of a rule for the patient: the indication and the generic of the rule.
|
Full Usage:
emergencyList start logger provider patientData sets
Parameters:
DateTime
logger : Logger
provider : IResourceProvider
patientData : PatientData
sets : RuleSet[]
Returns: StandardOrder array * StandardOrderWarning array
|
Returns the standard orders of the emergency list for the patient, with the bolus texts.
|
Full Usage:
evaluate start logger provider pc
Parameters:
DateTime
logger : Logger
provider : IResourceProvider
pc : PlanContext
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.
|
|
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.
|
|
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.
|
|
Returns the context narrowed to the scenario: the form of the scenario is chosen and the scenario is the only scenario.
|
Full Usage:
ofScenario prefix toTexts (ctx, sc)
Parameters:
string
toTexts : OrderScenario -> StandardOrderTexts
ctx : OrderContext
sc : OrderScenario
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.
|
Full Usage:
scenarios evaluate depth ctx
Parameters:
PlanContext -> Result<Outcome<PlanContext>, string>
depth : int
ctx : OrderContext
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.
|
Full Usage:
standardInfusions start logger provider patientData sets
Parameters:
DateTime
logger : Logger
provider : IResourceProvider
patientData : PatientData
sets : RuleSet[]
Returns: StandardOrder array * StandardOrderWarning array
|
Returns the standard orders of the continuous medication list for the patient, with the infusion texts.
|
Full Usage:
standardOrders kind prefix toTexts start logger provider patientData sets
Parameters:
RuleSetKind
prefix : string
toTexts : OrderScenario -> StandardOrderTexts
start : DateTime
logger : Logger
provider : IResourceProvider
patientData : PatientData
sets : RuleSet[]
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.
|
Full Usage:
withAdjust useAdjust qty adj
Parameters:
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.
|
|
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.
|
GenPRES