Logo GenPRES

Dosage Module

Creates a dosage with start, single, rate and total dose ranges and a frequency, converts the units and turns the dosage into text.

Models the dosage of a substance. The name of a dosage is the name of the substance.

Per dosage the following DoseRange items can be defined:
  • StartDosagedosage at the start
  • SingleDosagedosage per administration
  • RateDosagedosage rate, has a rate unit
  • TotalDosagedosage per time period, has a Frequency
The frequency is defined by a list of possible frequencies per time period and/or a minimal interval

Nested modules

Modules Description

Dto

Holds the Dto of a dosage and the conversions to and from the Dto.

Optics

Holds the getter and setter for the name of a dosage, the setters for the rules and for whether the dosage is high risk, the lenses, getters and setters for the frequency, and the lenses on the limits and units of the start, single, rate and total dose ranges.

Functions and values

Function or value Description

convertRateUnitTo u ds

Full Usage: convertRateUnitTo u ds

Parameters:
    u : Unit - The unit to change to
    ds : Dosage - The Dosage to change

Returns: Dosage

Change the rate unit of a Dosage.

u : Unit

The unit to change to

ds : Dosage

The Dosage to change

Returns: Dosage

convertSubstanceUnitTo u ds

Full Usage: convertSubstanceUnitTo u ds

Parameters:
    u : Unit - The unit to change to
    ds : Dosage - The Dosage to change

Returns: Dosage

Change the substance unit of a Dosage.

u : Unit

The unit to change to

ds : Dosage

The Dosage to change

Returns: Dosage

create nm start single (arg4, arg4) (arg5, arg5) rls

Full Usage: create nm start single (arg4, arg4) (arg5, arg5) rls

Parameters:
Returns: Dosage

Creates a Dosage. HighRisk defaults to false; it is set from the source G-Standaard DoseRules in GStand.getDosage.

nm : string
start : DoseRange
single : DoseRange
arg3 : DoseRange
arg4 : RateUnit
arg5 : DoseRange
arg6 : Frequency
rls : Rule list
Returns: Dosage

createFrequency frs tu mi

Full Usage: createFrequency frs tu mi

Parameters:
Returns: Frequency

Creates the Frequency for a TotalDosage.

frs : Frequencies
tu : TimeUnit
mi : Option<ValueUnit>
Returns: Frequency

empty

Full Usage: empty

Returns: Dosage

An empty Dosage.

Returns: Dosage

emptyFrequency

Full Usage: emptyFrequency

Returns: Frequency

An empty Frequency.

Returns: Frequency

freqsToStr freqs

Full Usage: freqsToStr freqs

Parameters:
Returns: string

Get the string representation of a Frequency.

freqs : Frequency
Returns: string

toString rules arg2

Full Usage: toString rules arg2

Parameters:
Returns: string

Get the string representation of a Dosage.

rules : bool
arg1 : Dosage
Returns: string

Type something to start searching.