Logo GenPRES

MedicationText Module

Writes a medication as YAML text and reads the text back, through the medication Dto. A text that cannot be read returns one error with its line and column.

Functions and values

Function or value Description

deserializer

Full Usage: deserializer

Returns: IDeserializer

Reads a text into the Dto; an unknown key is an error.

Returns: IDeserializer

fromString s

Full Usage: fromString s

Parameters:
    s : string

Returns: Result<Medication, DtoError list>

Reads a medication from a YAML text. Returns every error with the path of its field. A text that cannot be read returns one error with the line and column from the YAML reader.

s : string
Returns: Result<Medication, DtoError list>

serializer

Full Usage: serializer

Returns: ISerializer

Leaves a null and an empty array out, quotes a string another reader would read as a number, a boolean or a null, and indents a sequence under its key.

Returns: ISerializer

toString med

Full Usage: toString med

Parameters:
Returns: string

Writes the medication as YAML text.

med : Medication
Returns: string

Type something to start searching.