Source Module
Declares the type of a Kinderformularium entry and the type of a link provider, converts a source to text, finds the Kinderformularium entry of a generic for a route, and builds the Markdown link to the Kinderformularium or the Farmacotherapeutisch Kompas for a generic.
Types
| Type | Description |
|
Returns the external formulary link for a source, the route of the rule and a generic label, or None when there is none. A function type, so DoseRule.Print stays pure and the resources load the NKF index. |
|
|
One Nederlands Kinder Formularium (NKF) entry: the generic name and the id its URL is built from. |
Functions and values
| Function or value |
Description
|
Full Usage:
getLink routeWords meds source route gen
Parameters:
Set<string>
meds : NKFMedication list
source : Source
route : string
gen : GenericLabel
Returns: string option
|
Returns the Markdown link for the source NKF or FTK, the route of the rule and the generic label, with the name of the source as the text, or None for another source or a generic without a link. Only the NKF link reads routeWords, meds and the route, so an empty list, used when the NKF index could not be fetched, loses only the NKF links.
|
|
|
|
Returns the name of a source as the formulary writes it: Kinderformularium for NKF, Farmacotherapeutisch Kompas for FTK, Lokaal for an empty source, and the text of any other source.
|
|
Returns the words in the parentheses of an NKF name, as oraal, en and intraveneus for "aciclovir (oraal en intraveneus)".
|
Full Usage:
nkfBaseName name
Parameters:
string
Returns: string
|
Returns the NKF name without the parts in parentheses, as "adrenaline" for "adrenaline (epinefrine)".
|
Full Usage:
nkfGeneric name
Parameters:
string
Returns: string
|
Returns the NKF name with the generics of a combination joined by "/" instead of "+".
|
Full Usage:
noLinks arg1 arg2 arg3
Parameters:
Source
arg1 : string
arg2 : GenericLabel
Returns: string option
|
A link provider that never finds a link, for scripts and tests without external links. The resources use getLink with an empty index instead when the NKF fetch fails, which keeps the FTK links.
|
|
|
|
|
Full Usage:
tryFindNKFMedication routeWords meds route gen
Parameters:
Set<string>
meds : NKFMedication list
route : string
gen : string
Returns: NKFMedication option
|
Returns the NKF entry of the generic name: the entry with the generic as its whole name, else the single entry with the generic as its name without the parts in parentheses when its parentheses name no route of routeWords, else the single one of those entries that has the route as a word in its parentheses. Returns None when no single entry is found.
|
GenPRES