PrescriptionRule Module
Combines the dose rules for a filter with the matching solution rules and renal rules into prescription rules for a patient.
Functions and values
| Function or value |
Description
|
Full Usage:
adjustDoseLimitToPatient freqs patientData dl
Parameters:
ValueUnit option
patientData : PatientData
dl : DoseLimit
Returns: DoseLimit
|
Resolves a conflict between the adjusted bounds of a dose limit and its absolute bounds. An adjusted bound is a per kg or per m2 bound times the weight or the BSA of the patient. When an adjusted bound cannot be met within an absolute bound, the dose is fixed at that absolute bound and the per kg or per m2 limit is dropped. Returns the dose limit unchanged when the patient lacks the measurement.
|
|
|
Full Usage:
comparedRule solutionRules pr
Parameters:
SolutionRuleComparison
pr : PrescriptionRule
Returns: HashId * ProductComponent[] array * DoseRule option * RenalRule[] * SolutionRule[]
|
Returns the parts of a prescription rule that are compared: the dose rule id, the products of each component, the renal rules and, when solutionRules is Counted, the solution rules. The products are compared because the patient selects the reconstitution of a product. The dose rule itself is compared only when a renal rule applies, because a renal rule changes the limits. A dose rule changed for a conflict between its limits is still the same rule. The patient is left out, since it differs between any two patients.
|
|
Returns the names of the components of the dose rule where neither the component limit nor any substance limit has a value.
|
|
Get all departments of an array of PrescriptionRules.
|
|
|
|
|
|
|
|
The filter options with no values.
|
Full Usage:
filter isAdditive doseRules solutionRules renalRules predilutions routeMapping filter
Parameters:
GPK -> bool
doseRules : DoseRule array
solutionRules : SolutionRule[]
renalRules : RenalRule[]
predilutions : ProductPredilution[]
routeMapping : RouteMapping array
filter : DoseFilter
Returns: Result<PrescriptionRule array, Message list>
|
Returns the prescription rules for the filter. isAdditive finds the additives, the components that a component selection can leave out. The products of a dose rule are reconstituted and then pre-diluted with the predilutions.
|
|
The filter options of an array of PrescriptionRules.
|
|
Get all pharmaceutical forms of an array of PrescriptionRules.
|
|
Get all frequencies of an array of PrescriptionRules.
|
|
Get all genders of an array of PrescriptionRules.
|
|
Get all generics of an array of PrescriptionRules.
|
|
|
|
Get all DoseRules of an array of PrescriptionRules.
|
Full Usage:
getForPatient isAdditive doseRules solutionRules renalRules predilutions routeMapping patientData
Parameters:
GPK -> bool
doseRules : DoseRule array
solutionRules : SolutionRule[]
renalRules : RenalRule[]
predilutions : ProductPredilution[]
routeMapping : RouteMapping array
patientData : PatientData
Returns: Result<PrescriptionRule array, Message list>
|
Get all matching PrescriptionRules for a given Patient.
|
|
|
|
Get all indications of an array of PrescriptionRules.
|
Full Usage:
isAdditiveComponent isAdditive cl
Parameters:
GPK -> bool
cl : ComponentLimit
Returns: bool
|
Returns true when isAdditive is true for the GPK of a product of the component.
|
Full Usage:
isPrescribable patientData pr
Parameters:
PatientData
pr : PrescriptionRule
Returns: bool
|
Returns true when the patient has every measurement, the weight or the BSA, that the per kg and per m2 bounds of the dose limits, the solution rules and the renal rules of the prescription rule need.
|
Full Usage:
limitsComponent patientData solRule name
Parameters:
PatientData
solRule : SolutionRule
name : string
Returns: bool
|
Returns true when the first dilution limit of the component has a maximum quantity or a list of quantities. When the patient has the value for the adjust unit of the solution rule, a maximum quantity per adjust unit also counts. The order uses only that dilution limit. A minimum alone does not limit the component.
|
Full Usage:
optionalComponents isAdditive cls
Parameters:
GPK -> bool
cls : ComponentLimit[]
Returns: string[]
|
Returns the names of the optional components: the additives after the first component.
|
|
Get all patients of an array of PrescriptionRules.
|
|
Get all routes of an array of PrescriptionRules.
|
Full Usage:
sameRules solutionRules atContext current
Parameters:
SolutionRuleComparison
atContext : PrescriptionRule array
current : PrescriptionRule array
Returns: bool
|
Returns true when the rules for the current patient equal the rules at the context. Returns false when there are no rules for the current patient.
|
Full Usage:
selectComponents isAdditive selection cls
Parameters:
GPK -> bool
selection : ComponentSelection
cls : ComponentLimit[]
Returns: ComponentLimit[]
|
Returns all component limits for AllComponents. For a selection, returns the components that are not optional and the selected optional components.
|
Full Usage:
solutionRulesByGeneric solutionRules
Parameters:
SolutionRule[]
Returns: string -> SolutionRule array
|
Returns a lookup of the solution rules by generic. The generic names are compared as String.equalsCapInsens compares them, in lower case and trimmed; a generic without solution rules gets an empty array.
|
Full Usage:
toMarkdown getLink prs
Parameters:
LinkProvider
prs : PrescriptionRule[]
Returns: string
|
Returns the prescription rules as markdown, after the patient data of the first rule. getLink makes the source links; Source.noLinks makes none. An empty array raises an exception.
|
Full Usage:
withLimitingSolutionRules pr
Parameters:
PrescriptionRule
Returns: PrescriptionRule option
|
Keeps the solution rules with a dose count of at least 1 that limit every component without a limit, for the patient of the prescription rule. Returns None when no solution rule is left, and the rule unchanged when all components have a limit. Each solution rule gives its own scenario, so any other solution rule would give an order with a component without any limit.
|
GenPRES