Api Module
Creates the cached resource provider for a spreadsheet and reloads its cache, gives access to the loaded resources of a provider, and filters dose rules, solution rules and prescription rules for a patient.
Types
| Type | Description |
|
|
Functions and values
| Function or value |
Description
|
Full Usage:
filterDoseRules provider filter doseRules
Parameters:
IResourceProvider
filter : DoseFilter
doseRules : DoseRule array
Returns: DoseRule array
|
|
Full Usage:
filterPredilutions provider pat solutionRules
Parameters:
IResourceProvider
pat : PatientData
solutionRules : SolutionRule[]
Returns: ProductPredilution array
|
Returns the predilution rules of the provider for the solution rules and the patient, as SolutionRule.filterPredilutions selects them.
|
Full Usage:
filterPrescriptionRules provider filter
Parameters:
IResourceProvider
filter : DoseFilter
Returns: Result<PrescriptionRule array, Message list>
|
|
Full Usage:
filterSolutionRules provider filter solutionRules
Parameters:
IResourceProvider
filter : SolutionFilter
solutionRules : SolutionRule[]
Returns: SolutionRule array
|
Returns the solution rules that match the filter, with the route mapping of the provider.
|
Full Usage:
get key provider
Parameters:
ResourceKey<'T>
provider : IResourceProvider
Returns: 'T
Type parameters: 'T |
Returns the registered resource for a typed key.
|
Full Usage:
getCachedProviderWithDataUrlId logger dataUrlId
Parameters:
Logger
dataUrlId : string
Returns: IResourceProvider
|
|
|
|
Full Usage:
getGStandProvider provider
Parameters:
IResourceProvider
Returns: GStandProvider
|
|
Full Usage:
getNKFLinkProvider provider
Parameters:
IResourceProvider
Returns: LinkProvider
|
Returns the link lookup for the Nederlands Kinderformularium, used by DoseRule.Print.toMarkdown. When the resource load failed, Get raises KeyNotFoundException and this returns Source.getLink Set.empty [] instead, so a missing link never fails a request. A single Get call avoids the race of an IsLoaded check followed by Get while a reload fails.
|
Full Usage:
getPatientDataResources provider
Parameters:
IResourceProvider
Returns: CorePatientDataResources option
|
Returns the resources the patient data is completed with: the normal-value tables, the calculation weights and heights, and the eGFR band options. None when the normal-value rows did not parse.
|
Full Usage:
getPrescriptionRules provider
Parameters:
IResourceProvider
Returns: PatientData -> Result<PrescriptionRule[], Message list>
|
Returns the prescription rules of the patient. The rules come from the cache of the load when the provider holds a cache, gives the solution rules, renal rules, route mappings, additive lookup and product predilutions the cache was built from, and gives the dose rules or the stand-alone dose rules of that load. Otherwise the rules are built on every call. A reload between the reads, or a provider that wraps another, can give other rules.
|
Full Usage:
getProductPredilutions provider
Parameters:
IResourceProvider
Returns: ProductPredilution[]
|
Returns the product predilutions: the predilution rules, each with the substances of its diluent.
|
|
|
Full Usage:
getRouteMapping provider
Parameters:
IResourceProvider
Returns: RouteMapping[]
|
|
Full Usage:
getRuleSets provider pat
Parameters:
IResourceProvider
pat : PatientData
Returns: RuleSet array
|
Reads the rule sets from the rule set data of the provider on every call, so a reload of the resources is seen. Each rule set has only the rules that apply to the patient.
|
Full Usage:
getSolutionRules provider
Parameters:
IResourceProvider
Returns: SolutionRule[]
|
|
|
|
|
Returns a lookup that tells whether the Formulary marks the product with a GPK as an additive.
|
|
Creates a warning that no prescription rule matches the filter, with its generic, route and form.
|
|
|
GenPRES