SourceLoader Module
Fetches the medication index of the Nederlands Kinderformularium and parses the JSON into a list of medications. A failed fetch returns an error with the reason.
Functions and values
| Function or value |
Description
|
Full Usage:
fetchNKFMedications ()
Parameters:
unit
Returns: Result<NKFMedication list, Message list>
|
Fetches the NKF medication index from nkfUrl.
|
Full Usage:
fetchNKFMedicationsFrom url
Parameters:
string
Returns: Result<NKFMedication list, Message list>
|
Fetches the NKF medication index from the url, or returns an error with the reason. The url is a parameter so tests can make the fetch fail.
|
|
The fetch timeout, far below the 100 second HttpClient default, because a connection that hangs stalls the whole resource load for a link that is only an annotation.
|
Full Usage:
nkfUrl
Returns: string
|
The NKF medication index, as JSON.
|
GenPRES