Logo GenPRES

Check Module

Checks the limits and frequencies of a dose rule against the G-Standaard dose rules and grades each difference.

Types

Type Description

CheckConfig

The settings of checkDoseRuleWith: the upper margin and the handling of the rate checks.

Comparison

The outcome of comparing a test range with a reference range.

Dosage

DoseRange

GStandDoseRule

GStandProvider

Returns the G-Standaard dose rules for the patient data, the generic, the form and the route.

PatientDosage

RateCheckMode

How the rate checks are handled. The G-Standaard dose check does not cover the administration rate.

Severity

The grade of a dose-check signal, after the G-Standaard dose-check guideline. Within is a pass; every other case is a signal.

Functions and values

Function or value Description

ageInMonths patientData

Full Usage: ageInMonths patientData

Parameters:
Returns: float option

The age of the patient in months that the G-Standaard dose rules are looked up with. Returns None for patient data without an age.

patientData : PatientData
Returns: float option

canonTimeUnit u

Full Usage: canonTimeUnit u

Parameters:
    u : string

Returns: string
u : string
Returns: string

checkAdjustUnit mm1 mm2

Full Usage: checkAdjustUnit mm1 mm2

Parameters:
Returns: Unit option
mm1 : MinMax
mm2 : MinMax
Returns: Unit option

checkAllWith log getDosageRules pat drs

Full Usage: checkAllWith log getDosageRules pat drs

Parameters:
Returns: string array

Checks all dose rules and returns the distinct messages of the failed checks. Calls log with the index and the dose rule before each check.

log : int -> DoseRule -> unit
getDosageRules : GStandProvider
pat : PatientData
drs : DoseRule[]
Returns: string array

checkConfigDef

Full Usage: checkConfigDef

Returns: CheckConfig
Returns: CheckConfig

checkDoseRuleWith cfg getDosageRules patientData dr

Full Usage: checkDoseRuleWith cfg getDosageRules patientData dr

Parameters:
Returns: (type)
cfg : CheckConfig
getDosageRules : GStandProvider
patientData : PatientData
dr : DoseRule
Returns: (type)

checkDoseRuleWithProvider getDosageRules patientData dr

Full Usage: checkDoseRuleWithProvider getDosageRules patientData dr

Parameters:
Returns: (type)

Checks a dose rule against the G-Standaard dose rules from getDosageRules, with the default settings.

getDosageRules : GStandProvider
patientData : PatientData
dr : DoseRule
Returns: (type)

checkInRangeOf margin sn refRange testRange

Full Usage: checkInRangeOf margin sn refRange testRange

Parameters:
Returns: Comparison

Compares a test range with a reference range, with its maximum raised by the factor margin when margin is Some. The highest limit of the test range is compared with the maximum and the lowest limit with the minimum, and each message shows the reference limit as it is, with the margin when it is a maximum. Either range empty gives NotApplicable.

margin : RationalX option
sn : string
refRange : MinMax
testRange : MinMax
Returns: Comparison

compareRanges margin sn refRange testRange

Full Usage: compareRanges margin sn refRange testRange

Parameters:
Returns: Comparison

Compares a test range with a reference range, with its maximum raised by the factor margin when margin is Some. Ranges whose units cannot be compared give CannotCheck; any other exception is a defect and is not caught.

margin : RationalX option
sn : string
refRange : MinMax
testRange : MinMax
Returns: Comparison

createDoseRulesWithMapping routeMapping patientData gen frm rte

Full Usage: createDoseRulesWithMapping routeMapping patientData gen frm rte

Parameters:
Returns: DoseRule seq
routeMapping : RouteMapping array
patientData : PatientData
gen : string
frm : string
rte : string
Returns: DoseRule seq

createMapping r

Full Usage: createMapping r

Parameters:
    r : (type)

Returns: (type)
r : (type)
Returns: (type)

filterPatient pat pdsg

Full Usage: filterPatient pat pdsg

Parameters:
Returns: bool
pat : PatientCategory
pdsg : PatientDosage
Returns: bool

freqMsg aantalDiff eenheidDiff

Full Usage: freqMsg aantalDiff eenheidDiff

Parameters:
    aantalDiff : bool
    eenheidDiff : bool

Returns: string

Describes how a frequency differs from the G-Standaard frequency: the count, the time unit, or both. The G-Standaard text number is left out on purpose.

aantalDiff : bool
eenheidDiff : bool
Returns: string

freqWithinReference unitsInterchangeable aantalDiff genform gstand

Full Usage: freqWithinReference unitsInterchangeable aantalDiff genform gstand

Parameters:
Returns: bool

Returns true when every frequency in genform is in the G-Standaard frequencies gstand, or when the time units are interchangeable and the counts are equal. Only this direction is checked, not gstand in genform.

unitsInterchangeable : bool
aantalDiff : bool
genform : ValueUnit
gstand : ValueUnit
Returns: bool

gStandProvider routeMapping

Full Usage: gStandProvider routeMapping

Parameters:
Returns: GStandProvider

Makes a GStandProvider that maps the route with routeMapping and reads the G-Standaard dose rules.

routeMapping : RouteMapping array
Returns: GStandProvider

gradeComparisons cannotCheck norm abs

Full Usage: gradeComparisons cannotCheck norm abs

Parameters:
Returns: (Severity option * string)[]

Grades a test range from its comparison with the norm range and with the absolute range, as one signal per side that is breached. Above the absolute maximum is OverAbsolute, also when the norm range cannot be checked; above the norm maximum is AdvisoryOverNorm and below the norm minimum UnderNorm. Otherwise a comparison that cannot be checked gives IncomparableUnits with the message cannotCheck, so that a check that was not done never shows as Within. Two empty ranges give no signal.

cannotCheck : string
norm : Comparison
abs : Comparison
Returns: (Severity option * string)[]

interchangeGroups

Full Usage: interchangeGroups

Returns: Set<string> list

The groups of frequency time units that count as equal, such as per 4 weken and per maand. Per 12 weken and per 3 maanden are not equal on purpose.

Returns: Set<string> list

interchangeable a b

Full Usage: interchangeable a b

Parameters:
    a : string
    b : string

Returns: bool
a : string
b : string
Returns: bool

mapRouteWithMapping routeMapping s

Full Usage: mapRouteWithMapping routeMapping s

Parameters:
Returns: string
routeMapping : RouteMapping array
s : string
Returns: string

marginText margin

Full Usage: marginText margin

Parameters:
Returns: string

The text that says a limit is raised by the factor margin, such as " (+20%)".

margin : RationalX
Returns: string

matchWithZIndex getDosageRules patientData dr

Full Usage: matchWithZIndex getDosageRules patientData dr

Parameters:
Returns: (type)
getDosageRules : GStandProvider
patientData : PatientData
dr : DoseRule
Returns: (type)

maximizeDosages dosages

Full Usage: maximizeDosages dosages

Parameters:
Returns: Dosage option
dosages : Dosage list
Returns: Dosage option

monthsMinMaxToDays

Full Usage: monthsMinMaxToDays

Returns: MinMax -> MinMax

Converts an age MinMax in months to days with fractionalMonthsToDays, so a ZForm age in months can be intersected with a GenFORM age in days. Each limit stays inclusive or exclusive.

Returns: MinMax -> MinMax

normDoseRange vuOpt

Full Usage: normDoseRange vuOpt

Parameters:
Returns: MinMax

Makes the range an order of a norm dose can take: from the norm dose times normMinFactor to the norm dose times normMaxFactor. No norm dose gives an empty range.

vuOpt : ValueUnit option
Returns: MinMax

pickAdjust weightMM bsaMM convWeight convBSA

Full Usage: pickAdjust weightMM bsaMM convWeight convBSA

Parameters:
Returns: MinMax

Picks the per m2 range when present, else the per kg range, else an empty range. The picked range gets its units from convBSA or convWeight.

weightMM : MinMax
bsaMM : MinMax
convWeight : MinMax -> MinMax
convBSA : MinMax -> MinMax
Returns: MinMax

rangeUnit mm

Full Usage: rangeUnit mm

Parameters:
Returns: Unit option

Returns the full unit, a combined unit included, of the minimum or else the maximum of a range. Returns None for an empty range.

mm : MinMax
Returns: Unit option

rangesComparable refRange testRange

Full Usage: rangesComparable refRange testRange

Parameters:
Returns: bool

Returns true when the unit groups of the two ranges match, such as mg/kg/day and mg/kg/day. An empty range counts as comparable, so the checks for an empty range still apply.

refRange : MinMax
testRange : MinMax
Returns: bool

rateScopeLabel mode msg

Full Usage: rateScopeLabel mode msg

Parameters:
Returns: string option
mode : RateCheckMode
msg : string
Returns: string option

setAdjustAndOrTimeUnit adjUn tu mm

Full Usage: setAdjustAndOrTimeUnit adjUn tu mm

Parameters:
Returns: MinMax
adjUn : Unit option
tu : Unit option
mm : MinMax
Returns: MinMax

unitToString

Full Usage: unitToString

Returns: Unit -> string
Returns: Unit -> string

withMargin margin mm

Full Usage: withMargin margin mm

Parameters:
Returns: MinMax

Raises the maximum of a range by the factor margin. The minimum is not changed.

margin : RationalX
mm : MinMax
Returns: MinMax

Type something to start searching.